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