mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-06-28 00:54:47 -05:00
Add overlay and block app list during install/uninstall (#3385)
* Implement app installation progress overlay and refactor progress bar handling * Add overlay background color settings and ensure minimum progress bar value * Add busy overlay functionality and progress bar updates for installation process * Refactor busy overlay implementation to dynamically adjust size based on app area dimensions
This commit is contained in:
@ -15,7 +15,7 @@ function Invoke-WPFButton {
|
||||
# Use this to get the name of the button
|
||||
#[System.Windows.MessageBox]::Show("$Button","Chris Titus Tech's Windows Utility","OK","Info")
|
||||
if (-not $sync.ProcessRunning) {
|
||||
Set-WinUtilProgressBar -label "" -percent 0 -hide $true
|
||||
Set-WinUtilProgressBar -label "" -percent 0
|
||||
}
|
||||
|
||||
Switch -Wildcard ($Button) {
|
||||
|
@ -34,6 +34,8 @@ function Invoke-WPFInstall {
|
||||
|
||||
try {
|
||||
$sync.ProcessRunning = $true
|
||||
Show-WPFInstallAppBusy -text "Installing apps..."
|
||||
|
||||
if($packagesWinget.Count -gt 0) {
|
||||
Install-WinUtilWinget
|
||||
Install-WinUtilProgramWinget -Action Install -Programs $packagesWinget
|
||||
@ -43,6 +45,7 @@ function Invoke-WPFInstall {
|
||||
Install-WinUtilChoco
|
||||
Install-WinUtilProgramChoco -Action Install -Programs $packagesChoco
|
||||
}
|
||||
Hide-WPFInstallAppBusy
|
||||
Write-Host "==========================================="
|
||||
Write-Host "-- Installs have finished ---"
|
||||
Write-Host "==========================================="
|
||||
|
@ -41,6 +41,7 @@ function Invoke-WPFUnInstall {
|
||||
|
||||
try {
|
||||
$sync.ProcessRunning = $true
|
||||
Show-WPFInstallAppBusy -text "Uninstalling apps..."
|
||||
|
||||
# Uninstall all selected programs in new window
|
||||
if($packagesWinget.Count -gt 0) {
|
||||
@ -49,7 +50,7 @@ function Invoke-WPFUnInstall {
|
||||
if($packagesChoco.Count -gt 0) {
|
||||
Install-WinUtilProgramChoco -Action Uninstall -Programs $packagesChoco
|
||||
}
|
||||
|
||||
Hide-WPFInstallAppBusy
|
||||
Write-Host "==========================================="
|
||||
Write-Host "-- Uninstalls have finished ---"
|
||||
Write-Host "==========================================="
|
||||
|
Reference in New Issue
Block a user