private void DeleteSection() { if (this.listViewSection.SelectedItems.Count < 1) { return; } MInterfaceConfigSection s = this.listViewSection.SelectedItems[0].Tag as MInterfaceConfigSection; if (_configPage.Sections.Contains(s)) { _configPage.Sections.Remove(s); } RefreshSectionList(); }
public FormMInterfaceConfigSection(MInterfaceConfigSection cs) { InitializeComponent(); _configSection = cs; if (_configSection == null) { _configSection = new MInterfaceConfigSection(); this.Text = "Add Configuration Section"; } else { this.Text = "Edti Configuration Section"; } LoadSetting(); }
private void AddSection() { FormMInterfaceConfigSection frm = new FormMInterfaceConfigSection(null); if (frm.ShowDialog(this) != DialogResult.OK) { return; } MInterfaceConfigSection s = frm.ConfigSection; if (s == null) { return; } _configPage.Sections.Add(s); RefreshSectionList(); }
private void EditSection() { if (this.listViewSection.SelectedItems.Count < 1) { return; } MInterfaceConfigSection s = this.listViewSection.SelectedItems[0].Tag as MInterfaceConfigSection; if (s == null) { return; } FormMInterfaceConfigSection frm = new FormMInterfaceConfigSection(s); if (frm.ShowDialog(this) != DialogResult.OK) { return; } RefreshSectionList(); }