mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-06-04 22:27:28 +00:00
Remove Write-Debug (#4498)
* Update Invoke-WinUtilCurrentSystem.ps1 * Update Invoke-WinUtilFontScaling.ps1 * Update Invoke-WinUtilTweaks.ps1 * Update Reset-WPFCheckBoxes.ps1 * Update Set-Preferences.ps1 * Update Update-WinUtilSelections.ps1 * Update Invoke-WPFSelectedCheckboxesUpdate.ps1 * Update Invoke-WPFtweaksbutton.ps1 * Update main.ps1 * Update main.ps1 * Update main.ps1 * Update main.ps1 * Update main.ps1 * Merge branch 'main' into Remove-Write-Debug
This commit is contained in:
@@ -23,14 +23,6 @@ function Reset-WPFCheckBoxes {
|
||||
|
||||
$CheckBoxesToCheck = $sync.selectedApps + $sync.selectedTweaks + $sync.selectedFeatures
|
||||
$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)"
|
||||
|
||||
if ($CheckBoxesToCheck -ne "") {
|
||||
$debugMsg = "CheckBoxes to Check are: "
|
||||
$CheckBoxesToCheck | ForEach-Object { $debugMsg += "$_, " }
|
||||
$debugMsg = $debugMsg -replace (',\s*$', '')
|
||||
Write-Debug "$debugMsg"
|
||||
}
|
||||
|
||||
foreach ($CheckBox in $CheckBoxes) {
|
||||
$checkboxName = $CheckBox.Key
|
||||
@@ -43,11 +35,9 @@ function Reset-WPFCheckBoxes {
|
||||
if ($CheckBoxesToCheck -contains $checkboxName) {
|
||||
# If it exists, set IsChecked to true
|
||||
$sync.$checkboxName.IsChecked = $true
|
||||
Write-Debug "$checkboxName is checked"
|
||||
} else {
|
||||
# If it doesn't exist, set IsChecked to false
|
||||
$sync.$checkboxName.IsChecked = $false
|
||||
Write-Debug "$checkboxName is not checked"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +58,6 @@ function Reset-WPFCheckBoxes {
|
||||
foreach ($toggle in $allToggles) {
|
||||
if ($importedToggles -contains $toggle.Key) {
|
||||
$sync[$toggle.Key].IsChecked = $true
|
||||
Write-Debug "Restoring toggle: $($toggle.Key) = checked"
|
||||
}
|
||||
# Toggles not present in the import are intentionally left untouched;
|
||||
# their current UI state already reflects the real system state.
|
||||
|
||||
Reference in New Issue
Block a user