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