mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2025-07-11 23:53:52 -05:00
Fix some logic issue in 'Invoke-WPFPresets.ps1' Public Function
This commit is contained in:
@ -17,7 +17,7 @@ function Invoke-WPFPresets {
|
|||||||
|
|
||||||
param (
|
param (
|
||||||
[Parameter(position=0)]
|
[Parameter(position=0)]
|
||||||
[string]$preset,
|
[string]$preset = "",
|
||||||
|
|
||||||
[Parameter(position=1)]
|
[Parameter(position=1)]
|
||||||
[bool]$imported = $false,
|
[bool]$imported = $false,
|
||||||
@ -35,7 +35,7 @@ function Invoke-WPFPresets {
|
|||||||
$CheckBoxes = ($sync.GetEnumerator()).where{ $_.Value -is [System.Windows.Controls.CheckBox] -and $_.Name -notlike "WPFToggle*" -and $_.Name -like "$checkboxfilterpattern"}
|
$CheckBoxes = ($sync.GetEnumerator()).where{ $_.Value -is [System.Windows.Controls.CheckBox] -and $_.Name -notlike "WPFToggle*" -and $_.Name -like "$checkboxfilterpattern"}
|
||||||
Write-Debug "Getting checkboxes to set, number of checkboxes: $($CheckBoxes.Count)"
|
Write-Debug "Getting checkboxes to set, number of checkboxes: $($CheckBoxes.Count)"
|
||||||
|
|
||||||
if ($CheckBoxesToCheck -ne $null) {
|
if ($CheckBoxesToCheck -ne "") {
|
||||||
$debugMsg = "CheckBoxes to Check are: "
|
$debugMsg = "CheckBoxes to Check are: "
|
||||||
$CheckBoxesToCheck | ForEach-Object { $debugMsg += "$_, " }
|
$CheckBoxesToCheck | ForEach-Object { $debugMsg += "$_, " }
|
||||||
$debugMsg = $debugMsg -replace (',\s*$', '')
|
$debugMsg = $debugMsg -replace (',\s*$', '')
|
||||||
|
Reference in New Issue
Block a user