mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-06-30 18:12:33 -05:00
move logic to json template
- remove Invoke-WPFToggle.ps1 - generalize Get-WinUtilToggleStatus - add bingsearch reg key for testing - use Invoke-WinUtilTweaks for actions - replace Add-Click with checked & unchecked to make undo work
This commit is contained in:
@ -192,11 +192,16 @@ function Invoke-WPFUIElements {
|
||||
|
||||
$sync[$entryInfo.Name] = $checkBox
|
||||
|
||||
$sync[$entryInfo.Name].IsChecked = Get-WinUtilToggleStatus $sync[$entryInfo.Name].Name
|
||||
$sync[$entryInfo.Name].IsChecked = Get-WinUtilToggleStatus $entryInfo.Name
|
||||
|
||||
$sync[$entryInfo.Name].Add_Click({
|
||||
$sync[$entryInfo.Name].Add_Checked({
|
||||
[System.Object]$Sender = $args[0]
|
||||
Invoke-WPFToggle $Sender.name
|
||||
Invoke-WinUtilTweaks $sender.name
|
||||
})
|
||||
|
||||
$sync[$entryInfo.Name].Add_Unchecked({
|
||||
[System.Object]$Sender = $args[0]
|
||||
Invoke-WinUtiltweaks $sender.name -undo $true
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user