mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-06-28 09:04: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:
21
functions/private/Show-WPFInstallAppBusy.ps1
Normal file
21
functions/private/Show-WPFInstallAppBusy.ps1
Normal file
@ -0,0 +1,21 @@
|
||||
function Show-WPFInstallAppBusy {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
Displays a busy overlay in the install app area of the WPF form.
|
||||
This is used to indicate that an install or uninstall is in progress.
|
||||
Dynamically updates the size of the overlay based on the app area on each invocation.
|
||||
.PARAMETER text
|
||||
The text to display in the busy overlay. Defaults to "Installing apps...".
|
||||
#>
|
||||
param (
|
||||
$text = "Installing apps..."
|
||||
)
|
||||
$sync.form.Dispatcher.Invoke([action]{
|
||||
$sync.InstallAppAreaOverlay.Visibility = [Windows.Visibility]::Visible
|
||||
$sync.InstallAppAreaOverlay.Width = $($sync.InstallAppAreaScrollViewer.ActualWidth * 0.4)
|
||||
$sync.InstallAppAreaOverlay.Height = $($sync.InstallAppAreaScrollViewer.ActualWidth * 0.4)
|
||||
$sync.InstallAppAreaOverlayText.Text = $text
|
||||
$sync.InstallAppAreaBorder.IsEnabled = $false
|
||||
$sync.InstallAppAreaScrollViewer.Effect.Radius = 5
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user