示例#1
0
        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();
        }
示例#2
0
 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();
 }
示例#3
0
        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();
        }
示例#4
0
        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();
        }