mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Convert UI sections to expandable controls
Transitions the General Build Options, Build USB Drive Options, and Post-Build Cleanup settings panels into Expander controls to improve interface organization and space management. Removes dynamic visibility toggling for the USB settings section from the backend scripts, allowing the expander to remain visible while child settings are controlled by the primary enable checkbox.
This commit is contained in:
@@ -203,18 +203,17 @@ function Register-EventHandlers {
|
||||
})
|
||||
|
||||
# Build USB Drive Settings Event Handlers
|
||||
# The USB Expander is always visible; the checkbox controls child settings only
|
||||
$State.Controls.chkBuildUSBDriveEnable.Add_Checked({
|
||||
param($eventSource, $routedEventArgs)
|
||||
$window = [System.Windows.Window]::GetWindow($eventSource)
|
||||
$localState = $window.Tag
|
||||
$localState.Controls.usbSection.Visibility = 'Visible'
|
||||
$localState.Controls.chkSelectSpecificUSBDrives.IsEnabled = $true
|
||||
})
|
||||
$State.Controls.chkBuildUSBDriveEnable.Add_Unchecked({
|
||||
param($eventSource, $routedEventArgs)
|
||||
$window = [System.Windows.Window]::GetWindow($eventSource)
|
||||
$localState = $window.Tag
|
||||
$localState.Controls.usbSection.Visibility = 'Collapsed'
|
||||
$localState.Controls.chkSelectSpecificUSBDrives.IsEnabled = $false
|
||||
$localState.Controls.chkSelectSpecificUSBDrives.IsChecked = $false
|
||||
$localState.Controls.lstUSBDrives.Items.Clear()
|
||||
|
||||
@@ -372,7 +372,6 @@ function Initialize-UIDefaults {
|
||||
$State.Controls.chkRemoveUpdates.IsChecked = $State.Defaults.generalDefaults.RemoveUpdates
|
||||
$State.Controls.chkRemoveDownloadedESD.IsChecked = $State.Defaults.generalDefaults.RemoveDownloadedESD
|
||||
$State.Controls.chkVerbose.IsChecked = $State.Defaults.generalDefaults.Verbose
|
||||
$State.Controls.usbSection.Visibility = if ($State.Controls.chkBuildUSBDriveEnable.IsChecked) { 'Visible' } else { 'Collapsed' }
|
||||
$State.Controls.usbSelectionPanel.Visibility = if ($State.Controls.chkSelectSpecificUSBDrives.IsChecked) { 'Visible' } else { 'Collapsed' }
|
||||
$State.Controls.chkSelectSpecificUSBDrives.IsEnabled = $State.Controls.chkBuildUSBDriveEnable.IsChecked
|
||||
$State.Controls.chkPromptExternalHardDiskMedia.IsEnabled = $State.Controls.chkAllowExternalHardDiskMedia.IsChecked
|
||||
|
||||
Reference in New Issue
Block a user