mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-08-09 17:41:14 +10:00
Replace install progress overlay with shared indicator (#4844)
* Use shared progress for app workflows * Remove legacy install progress overlay * Document shared app progress indicator * Address progress review feedback * Track all Win11 ISO progress * Restore Win11 Creator work on relaunch
This commit is contained in:
@@ -61,6 +61,7 @@ function Invoke-WinUtilISOWriteUSB {
|
||||
}
|
||||
|
||||
$sync["WPFWin11ISOWriteUSBButton"].IsEnabled = $false
|
||||
$sync["Win11ISOProcessRunning"] = $true
|
||||
Write-Win11ISOLog "Starting USB write to Disk $diskNum..."
|
||||
|
||||
$runspace = [Management.Automation.Runspaces.RunspaceFactory]::CreateRunspace()
|
||||
@@ -86,9 +87,10 @@ function Invoke-WinUtilISOWriteUSB {
|
||||
|
||||
function SetProgress($label, $pct) {
|
||||
$sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{
|
||||
$sync.progressBarTextBlock.Text = $label
|
||||
$sync.progressBarTextBlock.ToolTip = $label
|
||||
$sync.ProgressBar.Value = [Math]::Max($pct, 5)
|
||||
$sync["WPFTweaksProgressBar"].Visibility = "Visible"
|
||||
$sync["WPFTweaksProgressLabel"].Text = $label
|
||||
$sync["WPFTweaksProgressLabel"].ToolTip = $label
|
||||
$sync["WPFTweaksProgressValue"].Value = [Math]::Max($pct, 5)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -255,10 +257,12 @@ function Invoke-WinUtilISOWriteUSB {
|
||||
})
|
||||
} finally {
|
||||
Start-Sleep -Milliseconds 800
|
||||
$sync["Win11ISOProcessRunning"] = $false
|
||||
$sync["WPFWin11ISOStatusLog"].Dispatcher.Invoke([action]{
|
||||
$sync.progressBarTextBlock.Text = ""
|
||||
$sync.progressBarTextBlock.ToolTip = ""
|
||||
$sync.ProgressBar.Value = 0
|
||||
$sync["WPFTweaksProgressBar"].Visibility = "Collapsed"
|
||||
$sync["WPFTweaksProgressLabel"].Text = ""
|
||||
$sync["WPFTweaksProgressLabel"].ToolTip = ""
|
||||
$sync["WPFTweaksProgressValue"].Value = 0
|
||||
$sync["WPFWin11ISOWriteUSBButton"].IsEnabled = $true
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user