mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Modified the drivers tab
This commit is contained in:
committed by
rbalsleyMSFT
parent
31e66c7213
commit
8c0ed525b3
@@ -492,6 +492,27 @@ $window.Add_Loaded({
|
||||
if ($cmbMake.Items.Count -gt 0) {
|
||||
$cmbMake.SelectedIndex = 0
|
||||
}
|
||||
|
||||
$chkDownloadDrivers = $window.FindName('chkDownloadDrivers')
|
||||
$spMakeModelSection = $window.FindName('spMakeModelSection')
|
||||
|
||||
# Control visibility when checkbox is checked/unchecked
|
||||
$chkDownloadDrivers.Add_Checked({
|
||||
$spMakeModelSection.Visibility = [System.Windows.Visibility]::Visible
|
||||
})
|
||||
$chkDownloadDrivers.Add_Unchecked({
|
||||
$spMakeModelSection.Visibility = [System.Windows.Visibility]::Collapsed
|
||||
})
|
||||
|
||||
$script:chkDownloadDrivers = [System.Windows.Controls.CheckBox]$window.FindName('chkDownloadDrivers')
|
||||
$script:spMakeModelSection = [System.Windows.Controls.StackPanel]$window.FindName('spMakeModelSection')
|
||||
|
||||
$script:chkDownloadDrivers.Add_Checked({
|
||||
$script:spMakeModelSection.Visibility = [System.Windows.Visibility]::Visible
|
||||
})
|
||||
$script:chkDownloadDrivers.Add_Unchecked({
|
||||
$script:spMakeModelSection.Visibility = [System.Windows.Visibility]::Collapsed
|
||||
})
|
||||
})
|
||||
|
||||
# Show the window
|
||||
|
||||
@@ -132,8 +132,7 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/> <!-- Existing row for Install Drivers -->
|
||||
<RowDefinition Height="Auto"/> <!-- New row for Make -->
|
||||
<RowDefinition Height="Auto"/> <!-- New row for Model -->
|
||||
<RowDefinition Height="Auto"/> <!-- New single row for Make/Model -->
|
||||
<RowDefinition Height="Auto"/> <!-- New row for PEDrivers Folder -->
|
||||
<RowDefinition Height="Auto"/> <!-- New row for Drivers Folder -->
|
||||
<RowDefinition Height="Auto"/> <!-- New row for Copy Drivers -->
|
||||
@@ -160,32 +159,46 @@
|
||||
ToolTip="Check to download drivers automatically." />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Make Row (Row 2) -->
|
||||
<StackPanel Grid.Row="2" Grid.Column="0" Orientation="Horizontal" Margin="5">
|
||||
<TextBlock x:Name="txtMakeLabel" Text="Make:" VerticalAlignment="Center" />
|
||||
<Image x:Name="imgMakeInfo" Source="$infoImagePath" Width="16" Height="16" Margin="5,0,0,0" Cursor="Arrow"
|
||||
ToolTip="Select the device manufacturer." />
|
||||
<!-- New container for Make & Model fields -->
|
||||
<StackPanel Grid.Row="2" Grid.ColumnSpan="2" x:Name="spMakeModelSection" Visibility="Collapsed" Margin="5">
|
||||
<Grid Margin="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="150"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Make -->
|
||||
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" Margin="0">
|
||||
<TextBlock x:Name="txtMakeLabel" Text="Make:" VerticalAlignment="Center" />
|
||||
<Image x:Name="imgMakeInfo" Source="$infoImagePath" Width="16" Height="16" Margin="5,0,0,0" Cursor="Arrow"
|
||||
ToolTip="Select the device manufacturer." />
|
||||
</StackPanel>
|
||||
<ComboBox x:Name="cmbMake" Grid.Row="0" Grid.Column="1" Margin="0"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
|
||||
|
||||
<!-- Model -->
|
||||
<StackPanel Grid.Row="1" Grid.Column="0" Orientation="Horizontal" Margin="0">
|
||||
<TextBlock x:Name="txtModelLabel" Text="Model:" VerticalAlignment="Center"/>
|
||||
<Image x:Name="imgModelInfo" Source="$infoImagePath" Width="16" Height="16" Margin="5,0,0,0" Cursor="Arrow"
|
||||
ToolTip="Enter the device model." />
|
||||
</StackPanel>
|
||||
<TextBox x:Name="cmbModel" Grid.Row="1" Grid.Column="1" Margin="0"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Stretch"/>
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
<!-- Move ComboBox to Grid.Column=1 and set HorizontalAlignment to Stretch -->
|
||||
<ComboBox x:Name="cmbMake" Grid.Row="2" Grid.Column="1" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Stretch" />
|
||||
|
||||
<!-- Model Row (Row 3) -->
|
||||
<StackPanel Grid.Row="3" Grid.Column="0" Orientation="Horizontal" Margin="5">
|
||||
<TextBlock x:Name="txtModelLabel" Text="Model:" VerticalAlignment="Center"/>
|
||||
<Image x:Name="imgModelInfo" Source="$infoImagePath" Width="16" Height="16" Margin="5,0,0,0" Cursor="Arrow"
|
||||
ToolTip="Enter the device model." />
|
||||
</StackPanel>
|
||||
<!-- Replace ComboBox with TextBox and set HorizontalAlignment to Stretch -->
|
||||
<TextBox x:Name="cmbModel" Grid.Row="3" Grid.Column="1" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Stretch" />
|
||||
|
||||
<!-- PE Drivers Folder (Row 4) -->
|
||||
<StackPanel Grid.Row="4" Grid.Column="0" Orientation="Horizontal" Margin="5">
|
||||
<StackPanel Grid.Row="3" Grid.Column="0" Orientation="Horizontal" Margin="5">
|
||||
<TextBlock Text="PE Drivers Folder:" VerticalAlignment="Center"/>
|
||||
<Image x:Name="imgPEDriversFolderInfo" Source="$infoImagePath" Width="16" Height="16" Margin="5,0,0,0" Cursor="Arrow"
|
||||
Focusable="True"
|
||||
ToolTip="Specify the path to the PE Drivers folder." />
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="4" Grid.Column="1" Margin="5">
|
||||
<Grid Grid.Row="3" Grid.Column="1" Margin="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
@@ -195,13 +208,13 @@
|
||||
</Grid>
|
||||
|
||||
<!-- Drivers Folder (Row 5) -->
|
||||
<StackPanel Grid.Row="5" Grid.Column="0" Orientation="Horizontal" Margin="5">
|
||||
<StackPanel Grid.Row="4" Grid.Column="0" Orientation="Horizontal" Margin="5">
|
||||
<TextBlock Text="Drivers Folder:" VerticalAlignment="Center"/>
|
||||
<Image x:Name="imgDriversFolderInfo" Source="$infoImagePath" Width="16" Height="16" Margin="5,0,0,0" Cursor="Arrow"
|
||||
Focusable="True"
|
||||
ToolTip="Specify the path to the Drivers folder." />
|
||||
</StackPanel>
|
||||
<Grid Grid.Row="5" Grid.Column="1" Margin="5">
|
||||
<Grid Grid.Row="4" Grid.Column="1" Margin="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
@@ -211,14 +224,14 @@
|
||||
</Grid>
|
||||
|
||||
<!-- Copy Drivers (Row 6) -->
|
||||
<StackPanel Grid.Row="6" Grid.Column="0" Orientation="Horizontal" Margin="5">
|
||||
<StackPanel Grid.Row="5" Grid.Column="0" Orientation="Horizontal" Margin="5">
|
||||
<CheckBox x:Name="chkCopyDrivers" Content="Copy Drivers" Margin="0,0,5,0"/>
|
||||
<Image x:Name="imgCopyDriversInfo" Source="$infoImagePath" Width="16" Height="16" Cursor="Arrow"
|
||||
Focusable="True" ToolTip="Check to copy local Drivers folder to the build." />
|
||||
</StackPanel>
|
||||
|
||||
<!-- Copy PE Drivers (Row 7) -->
|
||||
<StackPanel Grid.Row="7" Grid.Column="0" Orientation="Horizontal" Margin="5">
|
||||
<StackPanel Grid.Row="6" Grid.Column="0" Orientation="Horizontal" Margin="5">
|
||||
<CheckBox x:Name="chkCopyPEDrivers" Content="Copy PE Drivers" Margin="0,0,5,0"/>
|
||||
<Image x:Name="imgCopyPEDriversInfo" Source="$infoImagePath" Width="16" Height="16" Cursor="Arrow"
|
||||
Focusable="True" ToolTip="Check to copy local PE Drivers folder to the build." />
|
||||
|
||||
Reference in New Issue
Block a user