Remove unnecessary whitespace indentation in 'main.ps1' script

This commit is contained in:
Mr.k 2024-10-25 12:36:37 +03:00
parent 2b2b11e4f2
commit 411bc66d7e
No known key found for this signature in database

View File

@ -31,23 +31,20 @@ $sync.runspace.Open()
# Create classes for different exceptions # Create classes for different exceptions
class WingetFailedInstall : Exception { class WingetFailedInstall : Exception {
[string]$additionalData [string]$additionalData
WingetFailedInstall($Message) : base($Message) {} WingetFailedInstall($Message) : base($Message) {}
} }
class ChocoFailedInstall : Exception { class ChocoFailedInstall : Exception {
[string]$additionalData [string]$additionalData
ChocoFailedInstall($Message) : base($Message) {} ChocoFailedInstall($Message) : base($Message) {}
} }
class GenericException : Exception { class GenericException : Exception {
[string]$additionalData [string]$additionalData
GenericException($Message) : base($Message) {} GenericException($Message) : base($Message) {}
} }
$inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^<Win.*', '<Window' $inputXML = $inputXML -replace 'mc:Ignorable="d"', '' -replace "x:N", 'N' -replace '^<Win.*', '<Window'
@ -543,8 +540,8 @@ $sync["AutoThemeMenuItem"].Add_Click({
$sync.ThemePopup.IsOpen = $false $sync.ThemePopup.IsOpen = $false
Invoke-WinutilThemeChange -theme "Auto" Invoke-WinutilThemeChange -theme "Auto"
$_.Handled = $false $_.Handled = $false
}) })
# Define event handlers for menu items # Define event handlers for menu items
$sync["DarkThemeMenuItem"].Add_Click({ $sync["DarkThemeMenuItem"].Add_Click({
if ($sync.ThemePopup -eq $null) { if ($sync.ThemePopup -eq $null) {
Write-Host "Theme Popup is null, this's not allowed to happen in the first place. Please double check your UI code." -ForegroundColor Red Write-Host "Theme Popup is null, this's not allowed to happen in the first place. Please double check your UI code." -ForegroundColor Red
@ -552,7 +549,7 @@ $sync["DarkThemeMenuItem"].Add_Click({
$sync.ThemePopup.IsOpen = $false $sync.ThemePopup.IsOpen = $false
Invoke-WinutilThemeChange -theme "Dark" Invoke-WinutilThemeChange -theme "Dark"
$_.Handled = $false $_.Handled = $false
}) })
# Define event handlers for menu items # Define event handlers for menu items
$sync["LightThemeMenuItem"].Add_Click({ $sync["LightThemeMenuItem"].Add_Click({
if ($sync.ThemePopup -eq $null) { if ($sync.ThemePopup -eq $null) {
@ -561,7 +558,7 @@ $sync["LightThemeMenuItem"].Add_Click({
$sync.ThemePopup.IsOpen = $false $sync.ThemePopup.IsOpen = $false
Invoke-WinutilThemeChange -theme "Light" Invoke-WinutilThemeChange -theme "Light"
$_.Handled = $false $_.Handled = $false
}) })
# Define event handler for button click # Define event handler for button click