private void GloveboxIdComboBox_SelectedIndexChanged(object sender, EventArgs e) { model = new holdup_config_rec(NC.App.DB.HoldupConfigParameters.Get((string)GloveboxIdComboBox.SelectedItem)); // expect and use strings NumRowsTextBox.Text = model.num_rows.ToString(); NumColsTextBox.Text = model.num_columns.ToString(); DistanceTextBox.Text = model.distance.ToString("F1"); }
private void OKBtn_Click(object sender, EventArgs e) { if (target == null) { return; } holdup_config_rec m = null; try { m = NC.App.DB.HoldupConfigParameters.Get(target.glovebox_id); } catch (InvalidOperationException) // id not there, it's new { } if (null != m) { if (NC.App.DB.HoldupConfigParameters.Delete(target)) // removes from DB then from in-memory list, just like isotopics { target = null; RefreshHCCombo(); } } }
public IDDGloveboxEdit() { InitializeComponent(); model = new holdup_config_rec(); RefreshHCCombo(pick: false); }
public IDDGloveboxEdit() { InitializeComponent(); model = new holdup_config_rec(); RefreshHCCombo(pick:false); }
private void OKBtn_Click(object sender, EventArgs e) { if (target == null) return; holdup_config_rec m = null; try { m = NC.App.DB.HoldupConfigParameters.Get(target.glovebox_id); } catch (InvalidOperationException) // id not there, it's new { } if (null != m) { if (NC.App.DB.HoldupConfigParameters.Delete(target)) // removes from DB then from in-memory list, just like isotopics { target = null; RefreshHCCombo(); } } }
private void GloveboxIdComboBox_SelectedIndexChanged(object sender, EventArgs e) { target = NC.App.DB.HoldupConfigParameters.Get(((ComboBox)sender).Text); }