mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-06-28 09:04:47 -05:00
Complete Winget Install Overhaul and Progress Bar in GUI (#2466)
* Compile Winutil * first draft for Progress bar in GUI * small optimizations to the loading bar * Optimize the Winget Installation Function to make it more maintainable * Apply loading bar to Tweaks * Update colors * Add docs * Fix value range for the taskbar item * Remove winutil.ps1 from PR * Documention and fix an oversight in the uninstall logic * Reduce even more repeaded code --------- Co-authored-by: Marterich <Marterich@users.noreply.github.com>
This commit is contained in:
@ -35,15 +35,14 @@ function Invoke-WPFtweaksbutton {
|
||||
} else {
|
||||
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 -overlay "logo" })
|
||||
}
|
||||
$cnt = 0
|
||||
# Execute other selected tweaks
|
||||
foreach ($tweak in $Tweaks) {
|
||||
Write-Debug "This is a tweak to run $tweak count: $cnt"
|
||||
Invoke-WinUtilTweaks $tweak
|
||||
$cnt += 1
|
||||
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($cnt/$Tweaks.Count) })
|
||||
|
||||
for ($i = 0; $i -lt $Tweaks.Count; $i++){
|
||||
Set-WinUtilProgressBar -Label "Applying $($tweaks[$i])" -Percent ($i / $Tweaks.Count * 100)
|
||||
Invoke-WinUtilTweaks $tweaks[$i]
|
||||
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($i/$Tweaks.Count) })
|
||||
}
|
||||
|
||||
Set-WinUtilProgressBar -Label "Tweaks finished" -Percent 100
|
||||
$sync.ProcessRunning = $false
|
||||
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "None" -overlay "checkmark" })
|
||||
Write-Host "================================="
|
||||
|
Reference in New Issue
Block a user