private void EditButton_OnClick(object sender, RoutedEventArgs e) { try { var dcsBIOSInput = (DCSBIOSInput)DataGridValues.SelectedItem; var dcsBiosInputWindow = new DCSBiosInputWindow(_dcsAirframe, _header, dcsBIOSInput); if (dcsBiosInputWindow.ShowDialog() == true) { _dcsbiosInputs.Remove(dcsBIOSInput); var tmpdcsBiosInput = dcsBiosInputWindow.DCSBiosInput; _dcsbiosInputs.Add(tmpdcsBiosInput); _isDirty = true; ShowItems(); } ShowItems(); SetFormState(); } catch (Exception ex) { Common.ShowErrorMessageBox(1072, ex); } }
private void NewControlButton_OnClick(object sender, RoutedEventArgs e) { try { DCSBiosInputWindow dcsBiosInputWindow; dcsBiosInputWindow = new DCSBiosInputWindow(); dcsBiosInputWindow.ShowDialog(); if (dcsBiosInputWindow.DialogResult.HasValue && dcsBiosInputWindow.DialogResult.Value) { var dcsBiosInput = dcsBiosInputWindow.DCSBiosInput; //1 appropriate text to textbox //2 update bindings _dcsbiosInputs.Add(dcsBiosInput); _isDirty = true; } SetFormState(); ShowItems(); } catch (Exception ex) { Common.ShowErrorMessageBox(1016, ex); } }