mirror of
https://github.com/ChrisTitusTech/winutil
synced 2026-04-05 22:28:31 +00:00
Hightlight FOSS Apps (#4065)
* add foss tag functionality * update applications * update * update * fix * update * update * fix formatting
This commit is contained in:
@@ -63,5 +63,12 @@ function Invoke-WPFButton {
|
||||
"WPFWinUtilUninstallPSProfile" {Invoke-WinUtilUninstallPSProfile}
|
||||
"WPFWinUtilSSHServer" {Invoke-WPFSSHServer}
|
||||
"WPFselectedAppsButton" {$sync.selectedAppsPopup.IsOpen = -not $sync.selectedAppsPopup.IsOpen}
|
||||
"WPFToggleFOSSHighlight" {
|
||||
if ($sync.WPFToggleFOSSHighlight.IsChecked) {
|
||||
$sync.Form.Resources["FOSSColor"] = [Windows.Media.SolidColorBrush]::new([Windows.Media.Color]::FromRgb(76, 175, 80)) # #4CAF50
|
||||
} else {
|
||||
$sync.Form.Resources["FOSSColor"] = $sync.Form.Resources["MainForegroundColor"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,20 +176,32 @@ function Invoke-WPFUIElements {
|
||||
$itemsControl.Items.Add($dockPanel) | Out-Null
|
||||
|
||||
$sync[$entryInfo.Name] = $checkBox
|
||||
|
||||
$sync[$entryInfo.Name].IsChecked = (Get-WinUtilToggleStatus $entryInfo.Name)
|
||||
|
||||
$sync[$entryInfo.Name].Add_Checked({
|
||||
[System.Object]$Sender = $args[0]
|
||||
Invoke-WPFSelectedCheckboxesUpdate -type "Add" -checkboxName $Sender.name
|
||||
Invoke-WinUtilTweaks $Sender.name
|
||||
})
|
||||
|
||||
$sync[$entryInfo.Name].Add_Unchecked({
|
||||
[System.Object]$Sender = $args[0]
|
||||
Invoke-WPFSelectedCheckboxesUpdate -type "Remove" -checkboxName $Sender.name
|
||||
Invoke-WinUtiltweaks $Sender.name -undo $true
|
||||
})
|
||||
if ($entryInfo.Name -eq "WPFToggleFOSSHighlight") {
|
||||
if ($entryInfo.Checked -eq $true) {
|
||||
$sync[$entryInfo.Name].IsChecked = $true
|
||||
}
|
||||
|
||||
$sync[$entryInfo.Name].Add_Checked({
|
||||
Invoke-WPFButton -Button "WPFToggleFOSSHighlight"
|
||||
})
|
||||
$sync[$entryInfo.Name].Add_Unchecked({
|
||||
Invoke-WPFButton -Button "WPFToggleFOSSHighlight"
|
||||
})
|
||||
} else {
|
||||
$sync[$entryInfo.Name].IsChecked = (Get-WinUtilToggleStatus $entryInfo.Name)
|
||||
|
||||
$sync[$entryInfo.Name].Add_Checked({
|
||||
[System.Object]$Sender = $args[0]
|
||||
Invoke-WPFSelectedCheckboxesUpdate -type "Add" -checkboxName $Sender.name
|
||||
Invoke-WinUtilTweaks $Sender.name
|
||||
})
|
||||
|
||||
$sync[$entryInfo.Name].Add_Unchecked({
|
||||
[System.Object]$Sender = $args[0]
|
||||
Invoke-WPFSelectedCheckboxesUpdate -type "Remove" -checkboxName $Sender.name
|
||||
Invoke-WinUtiltweaks $Sender.name -undo $true
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
"ToggleButton" {
|
||||
|
||||
Reference in New Issue
Block a user