static void Main() { System.Windows.Forms.Application.EnableVisualStyles(); System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false); AlarmMonitorContext _context = new AlarmMonitorContext(); PanelPresenter panelPresenter = new PanelPresenter(_context); FrmPanel frmPanel = new FrmPanel(_context); System.Windows.Forms.Application.Run(frmPanel); }
private void butEditpanel_Click(object sender, EventArgs e) { ProtocolPanel panel = GetSelectedProtocol(); if (panel != null) { FrmPanel frm = new FrmPanel(panel, _mdiparent); if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { BindPanels(); } } }
private void butNewpanel_Click(object sender, EventArgs e) { ProtocolPanel panel = new ProtocolPanel(); panel.Protocol = _protocol; FrmPanel frm = new FrmPanel(panel, _mdiparent); if (frm.ShowDialog() == System.Windows.Forms.DialogResult.OK) { _protocol.ProtocolPanels.Add(panel); BindPanels(); } }