add a lot of error handling

This commit is contained in:
MyDrift
2024-11-06 22:16:01 +01:00
parent 5c2d5fae1e
commit a4fccd3c85
3 changed files with 24 additions and 6 deletions

View File

@ -192,7 +192,13 @@ function Invoke-WPFUIElements {
$sync[$entryInfo.Name] = $checkBox
$sync[$entryInfo.Name].IsChecked = Get-WinUtilToggleStatus $entryInfo.Name
$sync[$entryInfo.Name].IsChecked = (Get-WinUtilToggleStatus $entryInfo.Name)
if ($sync[$entryInfo.Name].IsChecked) {
write-host "$($entryInfo.Name) is checked" -ForegroundColor Blue
} else {
write-host "$($entryInfo.Name) is not checked" -ForegroundColor Red
}
$sync[$entryInfo.Name].Add_Checked({
[System.Object]$Sender = $args[0]