Experiment with only showing media type box for DIC

This commit is contained in:
Matt Nadareski
2025-09-25 08:32:06 -04:00
parent ee7cde6360
commit 89145df0fa
2 changed files with 20 additions and 0 deletions

View File

@@ -113,6 +113,9 @@ namespace MPF.UI.Windows
// Set the UI color scheme according to the options
ApplyTheme();
// Hide or show the media type box based on program
SetMediaTypeVisibility();
// Check for updates, if necessary
if (MainViewModel.Options.CheckForUpdatesOnStartup)
CheckForUpdates(showIfSame: false);
@@ -343,6 +346,16 @@ namespace MPF.UI.Windows
optionsWindow.Show();
}
/// <summary>
/// Set media type combo box visibility based on current program
/// </summary>
public void SetMediaTypeVisibility()
{
MediaTypeComboBox!.Visibility = MainViewModel.CurrentProgram == InternalProgram.DiscImageCreator
? Visibility.Visible
: Visibility.Hidden;
}
/// <summary>
/// Set the UI color scheme according to the options
/// </summary>
@@ -530,7 +543,10 @@ namespace MPF.UI.Windows
public void DumpingProgramComboBoxSelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (MainViewModel.CanExecuteSelectionChanged)
{
MainViewModel.ChangeDumpingProgram();
SetMediaTypeVisibility();
}
}
/// <summary>