mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-02-04 23:10:10 +00:00
Comment Spacing, Indentation, and Capitalization (#1084)
* 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
This commit is contained in:
@@ -1,32 +1,32 @@
|
||||
function Get-WinUtilVariables {
|
||||
|
||||
<#
|
||||
|
||||
.SYNOPSIS
|
||||
Gets every form object of the provided type
|
||||
|
||||
.OUTPUTS
|
||||
List containing every object that matches the provided type
|
||||
|
||||
#>
|
||||
param (
|
||||
[Parameter()]
|
||||
[string[]]$Type
|
||||
[ValidateSet("CheckBox", "Button")]
|
||||
[string]$Type
|
||||
)
|
||||
|
||||
$keys = $sync.keys | Where-Object { $_ -like "WPF*" }
|
||||
$keys = $sync.keys | Where-Object {$psitem -like "WPF*"}
|
||||
|
||||
if ($Type) {
|
||||
if($type){
|
||||
$output = $keys | ForEach-Object {
|
||||
Try {
|
||||
$objType = $sync["$psitem"].GetType().Name
|
||||
if ($Type -contains $objType) {
|
||||
Try{
|
||||
if ($sync["$psitem"].GetType() -like "*$type*"){
|
||||
Write-Output $psitem
|
||||
}
|
||||
}
|
||||
Catch {
|
||||
<#I am here so errors don't get outputted for a couple variables that don't have the .GetType() attribute#>
|
||||
}
|
||||
Catch{<#I am here so errors don't get outputted for a couple variables that don't have the .GetType() attribute#>}
|
||||
}
|
||||
return $output
|
||||
return $output
|
||||
}
|
||||
return $keys
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user