private void EditControl() { var dcsBIOSInput = (DCSBIOSInput)DataGridValues.SelectedItem; var dcsBiosInputWindow = new DCSBiosInputWindow(_header, dcsBIOSInput); if (dcsBiosInputWindow.ShowDialog() == true) { _dcsbiosInputs.Remove(dcsBIOSInput); var tmpdcsBiosInput = dcsBiosInputWindow.DCSBiosInput; _dcsbiosInputs.Add(tmpdcsBiosInput); SetIsDirty(); ShowItems(); } ShowItems(); SetFormState(); }
private void AddNewControl() { var dcsBiosInputWindow = new DCSBiosInputWindow(string.Empty); dcsBiosInputWindow.ShowDialog(); if (dcsBiosInputWindow.DialogResult.HasValue && dcsBiosInputWindow.DialogResult.Value) { var dcsBiosInput = dcsBiosInputWindow.DCSBiosInput; // 1 appropriate text to textbox // 2 update bindings _dcsbiosInputs.Add(dcsBiosInput); SetIsDirty(); } SetFormState(); ShowItems(); }
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); SetIsDirty(); 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); SetIsDirty(); } SetFormState(); ShowItems(); } catch (Exception ex) { Common.ShowErrorMessageBox(1016, ex); } }