From 08b5b4a1aa8022d0d14c5d3e6cb9b0764e2d3459 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 18 Feb 2020 11:34:57 -0800 Subject: [PATCH] Condiitionally disable L1 for single-layer discs --- DICUI/Windows/DiscInformationWindow.xaml.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/DICUI/Windows/DiscInformationWindow.xaml.cs b/DICUI/Windows/DiscInformationWindow.xaml.cs index f6821343..19287bb9 100644 --- a/DICUI/Windows/DiscInformationWindow.xaml.cs +++ b/DICUI/Windows/DiscInformationWindow.xaml.cs @@ -27,6 +27,7 @@ namespace DICUI.Windows PopulateCategories(); PopulateRegions(); PopulateLanguages(); + DisableFieldsIfNeeded(); } public void Refresh() @@ -118,6 +119,22 @@ namespace DICUI.Windows LanguagesComboBox.SelectedIndex = 0; } + /// + /// Disable fields that aren't applicable to the current disc + /// + private void DisableFieldsIfNeeded() + { + // Only disable for single-layer discs + if (_submissionInfo.SizeAndChecksums.Layerbreak == default(long)) + { + L1MasteringRingTextBox.IsReadOnly = true; + L1MasteringSIDTextBox.IsReadOnly = true; + L1ToolstampTextBox.IsReadOnly = true; + L1MouldSIDTextBox.IsReadOnly = true; + L1AdditionalMouldTextBox.IsReadOnly = true; + } + } + #region Event Handlers private void OnClosed(object sender, EventArgs e)