private void ButtonAddNumberConversion_OnClick(object sender, RoutedEventArgs e) { try { var window = new DCSBIOSComparatorWindow(); window.ShowDialog(); if (window.DialogResult == true) { _dcsbiosDecoder.Add(window.DCSBIOSComparator); ShowDecoders(); } SetFormState(); } catch (Exception ex) { Common.ShowErrorMessageBox(ex); } }
private void ButtonEditNumberConversion_OnClick(object sender, RoutedEventArgs e) { try { var window = new DCSBIOSComparatorWindow((DCSBIOSNumberToText)DataGridDecoders.SelectedItems[0]); window.ShowDialog(); if (window.DialogResult == true) { _dcsbiosDecoder.Remove((DCSBIOSNumberToText)DataGridDecoders.SelectedItems[0]); _dcsbiosDecoder.Add(window.DCSBIOSComparator); SetIsDirty(); ShowDecoders(); } SetFormState(); } catch (Exception ex) { Common.ShowErrorMessageBox(ex); } }