Remove unnecessary $_.Handled Properties

This commit is contained in:
Marterich
2025-03-31 21:56:34 +02:00
parent ff9a590ede
commit e8de0356ec

View File

@ -491,44 +491,36 @@ $sync["Form"].Add_Activated({
$sync["ThemeButton"].Add_Click({ $sync["ThemeButton"].Add_Click({
Write-Debug "ThemeButton clicked" Write-Debug "ThemeButton clicked"
Invoke-WPFPopup -PopupActionTable @{ "Settings" = "Hide"; "Theme" = "Toggle" } Invoke-WPFPopup -PopupActionTable @{ "Settings" = "Hide"; "Theme" = "Toggle" }
$_.Handled = $false
}) })
$sync["AutoThemeMenuItem"].Add_Click({ $sync["AutoThemeMenuItem"].Add_Click({
Write-Debug "About clicked" Write-Debug "About clicked"
Invoke-WPFPopup -Action "Hide" -Popups @("Theme") Invoke-WPFPopup -Action "Hide" -Popups @("Theme")
Invoke-WinutilThemeChange -theme "Auto" Invoke-WinutilThemeChange -theme "Auto"
$_.Handled = $false
}) })
$sync["DarkThemeMenuItem"].Add_Click({ $sync["DarkThemeMenuItem"].Add_Click({
Write-Debug "Dark Theme clicked" Write-Debug "Dark Theme clicked"
Invoke-WPFPopup -Action "Hide" -Popups @("Theme") Invoke-WPFPopup -Action "Hide" -Popups @("Theme")
Invoke-WinutilThemeChange -theme "Dark" Invoke-WinutilThemeChange -theme "Dark"
$_.Handled = $false
}) })
$sync["LightThemeMenuItem"].Add_Click({ $sync["LightThemeMenuItem"].Add_Click({
Write-Debug "Light Theme clicked" Write-Debug "Light Theme clicked"
Invoke-WPFPopup -Action "Hide" -Popups @("Theme") Invoke-WPFPopup -Action "Hide" -Popups @("Theme")
Invoke-WinutilThemeChange -theme "Light" Invoke-WinutilThemeChange -theme "Light"
$_.Handled = $false
}) })
$sync["SettingsButton"].Add_Click({ $sync["SettingsButton"].Add_Click({
Write-Debug "SettingsButton clicked" Write-Debug "SettingsButton clicked"
Invoke-WPFPopup -PopupActionTable @{ "Settings" = "Toggle"; "Theme" = "Hide" } Invoke-WPFPopup -PopupActionTable @{ "Settings" = "Toggle"; "Theme" = "Hide" }
$_.Handled = $false
}) })
$sync["ImportMenuItem"].Add_Click({ $sync["ImportMenuItem"].Add_Click({
Write-Debug "Import clicked" Write-Debug "Import clicked"
Invoke-WPFPopup -Action "Hide" -Popups @("Settings") Invoke-WPFPopup -Action "Hide" -Popups @("Settings")
Invoke-WPFImpex -type "import" Invoke-WPFImpex -type "import"
$_.Handled = $false
}) })
$sync["ExportMenuItem"].Add_Click({ $sync["ExportMenuItem"].Add_Click({
Write-Debug "Export clicked" Write-Debug "Export clicked"
Invoke-WPFPopup -Action "Hide" -Popups @("Settings") Invoke-WPFPopup -Action "Hide" -Popups @("Settings")
Invoke-WPFImpex -type "export" Invoke-WPFImpex -type "export"
$_.Handled = $false
}) })
$sync["AboutMenuItem"].Add_Click({ $sync["AboutMenuItem"].Add_Click({
Write-Debug "About clicked" Write-Debug "About clicked"