mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Hides download settings when using a local ISO
Updates the UI to conditionally hide the Windows language and media type controls. These settings are only applicable when downloading a new image and are irrelevant when a local ISO file is provided. This change simplifies the user interface and prevents confusion by only showing options relevant to the selected action.
This commit is contained in:
@@ -345,7 +345,7 @@
|
||||
</StackPanel>
|
||||
<ComboBox x:Name="cmbWindowsArch" Grid.Row="3" Grid.Column="1" Margin="5" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left" ToolTip="String value of 'x86' or 'x64'. This is used to identify which architecture of Windows to download. Default is 'x64'."/>
|
||||
<!-- (4) Windows Lang -->
|
||||
<StackPanel Grid.Row="4" Grid.Column="0" Orientation="Horizontal" Margin="0,5">
|
||||
<StackPanel x:Name="WindowsLangStackPanel" Grid.Row="4" Grid.Column="0" Orientation="Horizontal" Margin="0,5">
|
||||
<TextBlock Text="Windows Language" VerticalAlignment="Center" ToolTip="String value in language-region format (e.g., 'en-us'). This is used to identify which language of media to download. Default is 'en-us'."/>
|
||||
</StackPanel>
|
||||
<ComboBox x:Name="cmbWindowsLang" Grid.Row="4" Grid.Column="1" Margin="5" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left" ToolTip="String value in language-region format (e.g., 'en-us'). This is used to identify which language of media to download. Default is 'en-us'."/>
|
||||
@@ -355,7 +355,7 @@
|
||||
</StackPanel>
|
||||
<ComboBox x:Name="cmbWindowsSKU" Grid.Row="5" Grid.Column="1" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Stretch" ToolTip="Edition of Windows 10/11 to be installed. Accepted values are: 'Home', 'Home N', 'Home Single Language', 'Education', 'Education N', 'Pro', 'Pro N', 'Pro Education', 'Pro Education N', 'Pro for Workstations', 'Pro N for Workstations', 'Enterprise', 'Enterprise N'."/>
|
||||
<!-- (6) Media Type -->
|
||||
<StackPanel Grid.Row="6" Grid.Column="0" Orientation="Horizontal" Margin="0,5">
|
||||
<StackPanel x:Name="MediaTypeStackPanel" Grid.Row="6" Grid.Column="0" Orientation="Horizontal" Margin="0,5">
|
||||
<TextBlock Text="Media Type" VerticalAlignment="Center" ToolTip="String value of either 'business' or 'consumer'. This is used to identify which media type to download. Default is 'consumer'."/>
|
||||
</StackPanel>
|
||||
<ComboBox x:Name="cmbMediaType" Grid.Row="6" Grid.Column="1" Margin="5" Width="120" VerticalAlignment="Center" HorizontalAlignment="Left" ToolTip="String value of either 'business' or 'consumer'. This is used to identify which media type to download. Default is 'consumer'."/>
|
||||
|
||||
@@ -9,8 +9,10 @@ function Initialize-UIControls {
|
||||
$State.Controls.btnBrowseISO = $window.FindName('btnBrowseISO')
|
||||
$State.Controls.cmbWindowsArch = $window.FindName('cmbWindowsArch')
|
||||
$State.Controls.cmbWindowsLang = $window.FindName('cmbWindowsLang')
|
||||
$State.Controls.WindowsLangStackPanel = $window.FindName('WindowsLangStackPanel')
|
||||
$State.Controls.cmbWindowsSKU = $window.FindName('cmbWindowsSKU')
|
||||
$State.Controls.cmbMediaType = $window.FindName('cmbMediaType')
|
||||
$State.Controls.MediaTypeStackPanel = $window.FindName('MediaTypeStackPanel')
|
||||
$State.Controls.txtOptionalFeatures = $window.FindName('txtOptionalFeatures')
|
||||
$State.Controls.featuresPanel = $window.FindName('stackFeaturesContainer')
|
||||
$State.Controls.chkDownloadDrivers = $window.FindName('chkDownloadDrivers')
|
||||
|
||||
@@ -564,6 +564,20 @@ function Get-WindowsSettingsCombos {
|
||||
[psobject]$State
|
||||
)
|
||||
|
||||
# Determine visibility for download-specific controls based on ISO path
|
||||
$visibility = if (-not [string]::IsNullOrEmpty($isoPath) -and $isoPath.EndsWith('.iso', [System.StringComparison]::OrdinalIgnoreCase)) {
|
||||
'Collapsed'
|
||||
}
|
||||
else {
|
||||
'Visible'
|
||||
}
|
||||
|
||||
# Set visibility for Language and Media Type controls
|
||||
$State.Controls.WindowsLangStackPanel.Visibility = $visibility
|
||||
$State.Controls.cmbWindowsLang.Visibility = $visibility
|
||||
$State.Controls.MediaTypeStackPanel.Visibility = $visibility
|
||||
$State.Controls.cmbMediaType.Visibility = $visibility
|
||||
|
||||
# Update Release combo first
|
||||
Update-WindowsReleaseCombo -isoPath $isoPath -State $State
|
||||
|
||||
|
||||
Reference in New Issue
Block a user