2023-03-07 12:28:00 -08:00
|
|
|
function Invoke-WPFButton {
|
|
|
|
|
|
|
|
|
|
<#
|
2023-10-19 17:12:55 -05:00
|
|
|
|
|
|
|
|
.SYNOPSIS
|
|
|
|
|
Invokes the function associated with the clicked button
|
|
|
|
|
|
|
|
|
|
.PARAMETER Button
|
|
|
|
|
The name of the button that was clicked
|
|
|
|
|
|
2023-03-07 12:28:00 -08:00
|
|
|
#>
|
|
|
|
|
|
2023-10-19 17:12:55 -05:00
|
|
|
Param ([string]$Button)
|
|
|
|
|
|
|
|
|
|
# Use this to get the name of the button
|
2023-03-07 12:28:00 -08:00
|
|
|
#[System.Windows.MessageBox]::Show("$Button","Chris Titus Tech's Windows Utility","OK","Info")
|
2024-08-06 23:35:17 +03:00
|
|
|
if (-not $sync.ProcessRunning) {
|
2025-06-26 19:11:38 +02:00
|
|
|
Set-WinUtilProgressBar -label "" -percent 0
|
2024-07-31 04:13:30 +02:00
|
|
|
}
|
2024-08-06 15:50:36 -05:00
|
|
|
|
2024-08-06 23:35:17 +03:00
|
|
|
Switch -Wildcard ($Button) {
|
2023-03-07 12:28:00 -08:00
|
|
|
"WPFTab?BT" {Invoke-WPFTab $Button}
|
2024-08-29 04:02:59 +03:00
|
|
|
"WPFInstall" {Invoke-WPFInstall}
|
|
|
|
|
"WPFUninstall" {Invoke-WPFUnInstall}
|
2023-03-07 12:28:00 -08:00
|
|
|
"WPFInstallUpgrade" {Invoke-WPFInstallUpgrade}
|
2026-02-06 10:26:29 -06:00
|
|
|
"WPFCollapseAllCategories" {Invoke-WPFToggleAllCategories -Action "Collapse"}
|
|
|
|
|
"WPFExpandAllCategories" {Invoke-WPFToggleAllCategories -Action "Expand"}
|
2024-08-29 04:02:59 +03:00
|
|
|
"WPFStandard" {Invoke-WPFPresets "Standard" -checkboxfilterpattern "WPFTweak*"}
|
|
|
|
|
"WPFMinimal" {Invoke-WPFPresets "Minimal" -checkboxfilterpattern "WPFTweak*"}
|
|
|
|
|
"WPFClearTweaksSelection" {Invoke-WPFPresets -imported $true -checkboxfilterpattern "WPFTweak*"}
|
2025-05-12 22:45:57 +02:00
|
|
|
"WPFClearInstallSelection" {Invoke-WPFPresets -imported $true -checkboxfilterpattern "WPFInstall*"}
|
2023-03-07 12:28:00 -08:00
|
|
|
"WPFtweaksbutton" {Invoke-WPFtweaksbutton}
|
2024-06-25 21:37:34 +02:00
|
|
|
"WPFOOSUbutton" {Invoke-WPFOOSU}
|
2024-07-08 22:22:26 +02:00
|
|
|
"WPFAddUltPerf" {Invoke-WPFUltimatePerformance -State "Enable"}
|
|
|
|
|
"WPFRemoveUltPerf" {Invoke-WPFUltimatePerformance -State "Disable"}
|
2023-03-07 12:28:00 -08:00
|
|
|
"WPFundoall" {Invoke-WPFundoall}
|
|
|
|
|
"WPFFeatureInstall" {Invoke-WPFFeatureInstall}
|
2025-05-05 17:20:20 +02:00
|
|
|
"WPFPanelDISM" {Invoke-WPFSystemRepair}
|
2023-03-07 12:28:00 -08:00
|
|
|
"WPFPanelAutologin" {Invoke-WPFPanelAutologin}
|
2025-08-01 17:40:35 +02:00
|
|
|
"WPFPanelComputer" {Invoke-WPFControlPanel -Panel $button}
|
|
|
|
|
"WPFPanelControl" {Invoke-WPFControlPanel -Panel $button}
|
|
|
|
|
"WPFPanelNetwork" {Invoke-WPFControlPanel -Panel $button}
|
|
|
|
|
"WPFPanelPower" {Invoke-WPFControlPanel -Panel $button}
|
|
|
|
|
"WPFPanelPrinter" {Invoke-WPFControlPanel -Panel $button}
|
|
|
|
|
"WPFPanelRegion" {Invoke-WPFControlPanel -Panel $button}
|
2025-10-06 09:51:48 -05:00
|
|
|
"WPFPanelRestore" {Invoke-WPFControlPanel -Panel $button}
|
2025-08-01 17:40:35 +02:00
|
|
|
"WPFPanelSound" {Invoke-WPFControlPanel -Panel $button}
|
|
|
|
|
"WPFPanelSystem" {Invoke-WPFControlPanel -Panel $button}
|
|
|
|
|
"WPFPanelTimedate" {Invoke-WPFControlPanel -Panel $button}
|
|
|
|
|
"WPFPanelUser" {Invoke-WPFControlPanel -Panel $button}
|
2025-09-05 09:52:20 -05:00
|
|
|
"WPFUpdatesdefault" {Invoke-WPFUpdatesdefault}
|
2023-03-07 12:28:00 -08:00
|
|
|
"WPFFixesUpdate" {Invoke-WPFFixesUpdate}
|
2023-11-28 16:11:11 -06:00
|
|
|
"WPFFixesWinget" {Invoke-WPFFixesWinget}
|
2024-02-02 16:22:08 -06:00
|
|
|
"WPFRunAdobeCCCleanerTool" {Invoke-WPFRunAdobeCCCleanerTool}
|
2023-07-13 15:46:00 -05:00
|
|
|
"WPFFixesNetwork" {Invoke-WPFFixesNetwork}
|
2023-03-07 12:28:00 -08:00
|
|
|
"WPFUpdatesdisable" {Invoke-WPFUpdatesdisable}
|
|
|
|
|
"WPFUpdatessecurity" {Invoke-WPFUpdatessecurity}
|
2024-11-06 16:46:56 -08:00
|
|
|
"WPFWinUtilShortcut" {Invoke-WPFShortcut -ShortcutToAdd "WinUtil" -RunAsAdmin $true}
|
2023-05-09 13:14:27 -05:00
|
|
|
"WPFGetInstalled" {Invoke-WPFGetInstalled -CheckBox "winget"}
|
|
|
|
|
"WPFGetInstalledTweaks" {Invoke-WPFGetInstalled -CheckBox "tweaks"}
|
2024-01-12 00:34:41 -06:00
|
|
|
"WPFCloseButton" {Invoke-WPFCloseButton}
|
2024-11-06 16:46:56 -08:00
|
|
|
"WPFWinUtilInstallPSProfile" {Invoke-WinUtilInstallPSProfile}
|
|
|
|
|
"WPFWinUtilUninstallPSProfile" {Invoke-WinUtilUninstallPSProfile}
|
2025-01-10 13:39:21 -06:00
|
|
|
"WPFWinUtilSSHServer" {Invoke-WPFSSHServer}
|
2025-05-12 22:45:57 +02:00
|
|
|
"WPFselectedAppsButton" {$sync.selectedAppsPopup.IsOpen = -not $sync.selectedAppsPopup.IsOpen}
|
2023-03-07 12:28:00 -08:00
|
|
|
}
|
2024-08-06 23:35:17 +03:00
|
|
|
}
|