mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-04-01 17:12:09 +00:00
simplify logic
This commit is contained in:
parent
8daaf5e060
commit
9ae4c593a8
@ -27,13 +27,9 @@ function Initialize-InstallAppEntry {
|
|||||||
$border.Tag = $Appkey
|
$border.Tag = $Appkey
|
||||||
$border.ToolTip = $App.description
|
$border.ToolTip = $App.description
|
||||||
$border.Add_MouseUp({
|
$border.Add_MouseUp({
|
||||||
if ($_.ChangedButton -eq [System.Windows.Input.MouseButton]::Left) {
|
if ($_.ChangedButton -eq [System.Windows.Input.MouseButton]::Right) {
|
||||||
$childCheckbox = ($this.Child.Children | Where-Object {$_.Template.TargetType -eq [System.Windows.Controls.Checkbox]})[0]
|
Invoke-WPFPresets -imported $true -checkboxfilterpattern "WPFInstall*";
|
||||||
$childCheckBox.isChecked = -not $childCheckbox.IsChecked
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
$border.Add_MouseRightButtonUp({
|
|
||||||
Invoke-WPFPresets -imported $true -checkboxfilterpattern "WPFInstall*";
|
|
||||||
$childCheckbox = ($this.Child.Children | Where-Object {$_.Template.TargetType -eq [System.Windows.Controls.Checkbox]})[0]
|
$childCheckbox = ($this.Child.Children | Where-Object {$_.Template.TargetType -eq [System.Windows.Controls.Checkbox]})[0]
|
||||||
$childCheckBox.isChecked = -not $childCheckbox.IsChecked
|
$childCheckBox.isChecked = -not $childCheckbox.IsChecked
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user