restructure, fix, additions

This commit is contained in:
MyDrift
2024-07-14 02:20:26 +02:00
parent 27792dc8a3
commit 503f8a7f09
14 changed files with 100 additions and 18 deletions

View File

@ -24,10 +24,17 @@ function Invoke-WPFundoall {
param($Tweaks, $DebugPreference)
$sync.ProcessRunning = $true
# $sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value $using:Tweaks.Count })
if ($Tweaks.count -eq 1){
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Indeterminate" -value 0.01 })
} else {
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -state "Normal" -value 0.01 })
}
$cnt = 0
Foreach ($tweak in $tweaks){
Invoke-WinUtilTweaks $tweak -undo $true
$cnt += 1
$sync.form.Dispatcher.Invoke([action]{ Set-WinUtilTaskbaritem -value ($cnt/$Tweaks.Count) })
}
$sync.ProcessRunning = $false