Пример #1
0
        private void DeleteMonitorPage()
        {
            if (this.listViewMonitor.SelectedItems.Count < 1)
            {
                return;
            }
            MInterfaceMonitorPage p = this.listViewMonitor.SelectedItems[0].Tag as MInterfaceMonitorPage;

            if (_mInterface.MonitorPages.Contains(p))
            {
                _mInterface.MonitorPages.Remove(p);
            }
            RefreshMonitorPageList();
        }
Пример #2
0
 public FormMInterfaceMonitor(MInterfaceMonitorPage mp)
 {
     InitializeComponent();
     _monitorPage = mp;
     if (_monitorPage == null)
     {
         _monitorPage = new MInterfaceMonitorPage();
         this.Text    = "Add Monitor Page";
     }
     else
     {
         this.Text = "Edit Monitor Page";
     }
     LoadSetting();
 }
Пример #3
0
        private void AddMonitorPage()
        {
            FormMInterfaceMonitor frm = new FormMInterfaceMonitor(null);

            if (frm.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }
            MInterfaceMonitorPage p = frm.MonitorPage;

            if (p == null)
            {
                return;
            }
            _mInterface.MonitorPages.Add(p);
            RefreshMonitorPageList();
        }
Пример #4
0
        private void EditMonitorPage()
        {
            if (this.listViewMonitor.SelectedItems.Count < 1)
            {
                return;
            }
            MInterfaceMonitorPage p = this.listViewMonitor.SelectedItems[0].Tag as MInterfaceMonitorPage;

            if (p == null)
            {
                return;
            }
            FormMInterfaceMonitor frm = new FormMInterfaceMonitor(p);

            if (frm.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }
            RefreshMonitorPageList();
        }