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(); }
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(); }
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(); }
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(); }