mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 22:55:52 -06:00
acc2b5b243
* Comment Spacing, Indentation, and Capitalization * Comment Grammar and Spacing Makes grammar in comments better and more consistent Adds space before comment and centers word in `Write-Host` commands * More Grammar and Formatting * Add some comments * Populate PlaceHolder comments in functions Files I found that has issues: Get-WinUtilRegistry.ps1 Install-WinUtilWinget.ps1 Invoke-WinUtilDarkMode.ps1 Remove-WinUtilAPPX.ps1 Test-WinUtilPackageManager.ps1 Update-WinUtilProgramWinget.ps1 Invoke-WPFUpdatessecurity.ps1 * Tweak a few more comments * Tweak another write-host statement * Undo Catch statement adjustment It's outside of the scope of this pull request
24 lines
616 B
PowerShell
24 lines
616 B
PowerShell
function Invoke-WPFToggle {
|
|
|
|
<#
|
|
|
|
.SYNOPSIS
|
|
Invokes the scriptblock for the given toggle
|
|
|
|
.PARAMETER Button
|
|
The name of the toggle to invoke
|
|
|
|
#>
|
|
|
|
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)}
|
|
|
|
}
|
|
} |