private void livMetricSets_ItemActivate(object sender, System.EventArgs e) { MetricSetItem msi = (MetricSetItem)lsvMetricSets.FocusedItem; FormMetricSet mset = new FormMetricSet(msi); mset.ShowDialog(this); XmlConfig.Config.SaveConfig(); }
private void tsbEdit_Click(object sender, EventArgs e) { MetricSetItem msi = (MetricSetItem)lsvMetricSets.FocusedItem; if (msi != null) { FormMetricSet mset = new FormMetricSet(msi); mset.ShowDialog(this); XmlConfig.Config.SaveConfig(); } }
private void tsbNew_Click(object sender, EventArgs e) { MetricSetItem msi = (MetricSetItem)lsvMetricSets.FocusedItem; msi = new MetricSetItem(); FormMetricSet mset = new FormMetricSet(msi); if (mset.ShowDialog(this) == DialogResult.OK) { this.lsvMetricSets.Items.Add(msi); XmlConfig.Config.AddMetricSet(msi.MetricSet); XmlConfig.Config.SaveConfig(); } }