Condiitionally disable L1 for single-layer discs

This commit is contained in:
Matt Nadareski
2020-02-18 11:34:57 -08:00
parent c397701818
commit 08b5b4a1aa

View File

@@ -27,6 +27,7 @@ namespace DICUI.Windows
PopulateCategories();
PopulateRegions();
PopulateLanguages();
DisableFieldsIfNeeded();
}
public void Refresh()
@@ -118,6 +119,22 @@ namespace DICUI.Windows
LanguagesComboBox.SelectedIndex = 0;
}
/// <summary>
/// Disable fields that aren't applicable to the current disc
/// </summary>
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)