mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
Add 'Bring Your Own Applications' checkbox and update visibility logic based on installation options
This commit is contained in:
@@ -942,6 +942,17 @@ $window.Add_Loaded({
|
||||
$script:wingetPanel.Visibility = 'Collapsed'
|
||||
})
|
||||
|
||||
# Bring Your Own Applications checkbox should only show if Install Applications is checked
|
||||
$script:chkBringYourOwnApps = $window.FindName('chkBringYourOwnApps')
|
||||
$script:chkBringYourOwnApps.Visibility = if ($script:chkInstallApps.IsChecked) { 'Visible' } else { 'Collapsed' }
|
||||
$script:chkInstallApps.Add_Checked({
|
||||
$script:chkBringYourOwnApps.Visibility = 'Visible'
|
||||
})
|
||||
$script:chkInstallApps.Add_Unchecked({
|
||||
$script:chkBringYourOwnApps.IsChecked = $false
|
||||
$script:chkBringYourOwnApps.Visibility = 'Collapsed'
|
||||
})
|
||||
|
||||
# Show/Hide Winget panel based on checkbox state
|
||||
$script:chkInstallWingetApps.Add_Checked({
|
||||
$script:wingetPanel.Visibility = 'Visible'
|
||||
@@ -1043,7 +1054,6 @@ $window.Add_Loaded({
|
||||
|
||||
# Show search panel after successful Winget validation
|
||||
$script:btnCheckWingetModule.Add_Click({
|
||||
# ...existing code...
|
||||
try {
|
||||
# Check Winget CLI first
|
||||
$cliStatus = Test-WingetCLI
|
||||
@@ -1060,7 +1070,13 @@ $window.Add_Loaded({
|
||||
}
|
||||
}
|
||||
catch {
|
||||
# ...existing error handling code...
|
||||
Update-WingetVersionFields -wingetText "Error" -moduleText "Error"
|
||||
[System.Windows.MessageBox]::Show(
|
||||
"Error checking winget components: $_",
|
||||
"Error",
|
||||
"OK",
|
||||
"Error"
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -602,7 +602,7 @@
|
||||
<!-- Winget Search Panel -->
|
||||
<StackPanel x:Name="wingetSearchPanel"
|
||||
Visibility="Collapsed"
|
||||
Margin="25,10,5,5">
|
||||
Margin="25,10,5,20">
|
||||
|
||||
<TextBlock Text="Winget Search"
|
||||
FontWeight="Bold"
|
||||
@@ -655,6 +655,11 @@
|
||||
ToolTip="Clear all applications from the list"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<CheckBox x:Name="chkBringYourOwnApps"
|
||||
Content="Bring Your Own Applications"
|
||||
Margin="5"
|
||||
ToolTip="Enable to bring your own applications during the build process"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
|
||||
Reference in New Issue
Block a user