mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Refactors CU checkbox logic to core handlers
Moves the event handling logic for the "Latest CU" and "Preview CU" checkboxes from the main UI script into the core handlers module. This change centralizes UI event handling, improving code organization and maintainability. The new implementation is also more robust, accessing state via the window's `Tag` property rather than a global script variable.
This commit is contained in:
@@ -189,18 +189,6 @@ $window.Add_Loaded({
|
||||
}
|
||||
|
||||
# CU interplay (Keep existing logic)
|
||||
$script:uiState.Controls.chkLatestCU.Add_Checked({
|
||||
$script:uiState.Controls.chkPreviewCU.IsEnabled = $false
|
||||
})
|
||||
$script:uiState.Controls.chkLatestCU.Add_Unchecked({
|
||||
$script:uiState.Controls.chkPreviewCU.IsEnabled = $true
|
||||
})
|
||||
$script:uiState.Controls.chkPreviewCU.Add_Checked({
|
||||
$script:uiState.Controls.chkLatestCU.IsEnabled = $false
|
||||
})
|
||||
$script:uiState.Controls.chkPreviewCU.Add_Unchecked({
|
||||
$script:uiState.Controls.chkLatestCU.IsEnabled = $true
|
||||
})
|
||||
# Set initial state based on defaults
|
||||
$script:uiState.Controls.chkPreviewCU.IsEnabled = -not $script:uiState.Controls.chkLatestCU.IsChecked
|
||||
$script:uiState.Controls.chkLatestCU.IsEnabled = -not $script:uiState.Controls.chkPreviewCU.IsChecked
|
||||
|
||||
Reference in New Issue
Block a user