mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-04-05 22:28:31 +00:00
Decoupled UI and data (#4051)
* Decoupled UI and data * Fix bad variable naming * Fix mistype * Fix mistype v2 Editing from mobile is hard
This commit is contained in:
@@ -181,12 +181,14 @@ function Invoke-WPFUIElements {
|
||||
|
||||
$sync[$entryInfo.Name].Add_Checked({
|
||||
[System.Object]$Sender = $args[0]
|
||||
Invoke-WinUtilTweaks $sender.name
|
||||
Invoke-WPFSelectedCheckboxesUpdate -type "Add" -checkboxName $Sender.name
|
||||
Invoke-WinUtilTweaks $Sender.name
|
||||
})
|
||||
|
||||
$sync[$entryInfo.Name].Add_Unchecked({
|
||||
[System.Object]$Sender = $args[0]
|
||||
Invoke-WinUtiltweaks $sender.name -undo $true
|
||||
Invoke-WPFSelectedCheckboxesUpdate -type "Remove" -checkboxName $Sender.name
|
||||
Invoke-WinUtiltweaks $Sender.name -undo $true
|
||||
})
|
||||
}
|
||||
|
||||
@@ -355,6 +357,16 @@ function Invoke-WPFUIElements {
|
||||
|
||||
$itemsControl.Items.Add($horizontalStackPanel) | Out-Null
|
||||
$sync[$entryInfo.Name] = $checkBox
|
||||
|
||||
$sync[$entryInfo.Name].Add_Checked({
|
||||
[System.Object]$Sender = $args[0]
|
||||
Invoke-WPFSelectedCheckboxesUpdate -type "Add" -checkboxName $Sender.name
|
||||
})
|
||||
|
||||
$sync[$entryInfo.Name].Add_Unchecked({
|
||||
[System.Object]$Sender = $args[0]
|
||||
Invoke-WPFSelectedCheckboxesUpdate -type "Remove" -checkbox $Sender.name
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user