mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-06-30 18:12:33 -05:00
add a lot of error handling
This commit is contained in:
@ -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]
|
||||
|
Reference in New Issue
Block a user