From c7043ff0fbce83ec75661ce872f7cdd4bd5c1bf7 Mon Sep 17 00:00:00 2001 From: Carter <60557606+Carterpersall@users.noreply.github.com> Date: Tue, 17 May 2022 09:31:18 -0500 Subject: [PATCH] A few grammar, wording, and formatting tweaks (#6) * A few grammar tweaks and sort services - Made a few grammar and wording tweaks - Install Tab1 -> Tab 1 - Install - Tweaks Buttons -> Tweak Buttons - Service tweaks to Manual -> Set Services to Manual - Improve $services - The behavior of $services has not changed, just the formatting and grammar - Alphabetize the services to make any service easier to find - Improve the grammar and formatting of the comments next to the services - Capitalizes the first letter - Makes sure there is a space between # and the first word - Makes the spacing of each comment consistent so they all appear on the same column * Fix winget indentation - Fixed the Indentation on the winget buttons * If-statement and indentation - Made the format of all If-Statements consistent - if(statement){}else{} -> If (statement) {} else {} - Improve formatting and indentation --- winutil.ps1 | 365 ++++++++++++++++++++++++++-------------------------- 1 file changed, 181 insertions(+), 184 deletions(-) diff --git a/winutil.ps1 b/winutil.ps1 index 0ea7c47e..92d7e8df 100644 --- a/winutil.ps1 +++ b/winutil.ps1 @@ -253,15 +253,16 @@ $inputXML = $inputXML -replace 'mc:Ignorable="d"','' -replace "x:N",'N' -replace [xml]$XAML = $inputXML #Read XAML - $reader=(New-Object System.Xml.XmlNodeReader $xaml) - try{$Form=[Windows.Markup.XamlReader]::Load( $reader )} +$reader=(New-Object System.Xml.XmlNodeReader $xaml) +try{$Form=[Windows.Markup.XamlReader]::Load( $reader )} catch [System.Management.Automation.MethodInvocationException] { Write-Warning "We ran into a problem with the XAML code. Check the syntax for this control..." write-host $error[0].Exception.Message -ForegroundColor Red - if ($error[0].Exception.Message -like "*button*"){ - write-warning "Ensure your <button in the `$inputXML does NOT have a Click=ButtonClick property. PS can't handle this`n`n`n`n"} + If ($error[0].Exception.Message -like "*button*") { + write-warning "Ensure your <button in the `$inputXML does NOT have a Click=ButtonClick property. PS can't handle this`n`n`n`n" + } } -catch{#if it broke some other way 😀 +catch{# If it broke some other way 😀 Write-Host "Unable to load Windows.Markup.XamlReader. Double-check syntax and ensure .net is installed." } @@ -272,7 +273,7 @@ catch{#if it broke some other way