mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-02-04 15:00:09 +00:00
23 lines
776 B
PowerShell
23 lines
776 B
PowerShell
function Invoke-WPFToggle {
|
|
|
|
<#
|
|
|
|
.DESCRIPTION
|
|
Meant to make creating toggle switches easier. There is a section below in the gui that will assign this function to every switch.
|
|
This way you can dictate what each button does from this function.
|
|
|
|
Input will be the name of the toggle that is checked.
|
|
#>
|
|
|
|
Param ([string]$Button)
|
|
|
|
#Use this to get the name of the button
|
|
#[System.Windows.MessageBox]::Show("$Button","Chris Titus Tech's Windows Utility","OK","Info")
|
|
|
|
Switch -Wildcard ($Button){
|
|
|
|
"WPFToggleDarkMode" {Invoke-WinUtilDarkMode -DarkMoveEnabled $(Get-WinUtilToggleStatus WPFToggleDarkMode)}
|
|
"WPFToggleBingSearch" {Invoke-WinUtilBingSearch $(Get-WinUtilToggleStatus WPFToggleBingSearch)}
|
|
|
|
}
|
|
} |