/******************************************************************** * DIY control pad - take commands and Probe-results from outside * _diyControlPad ********************************************************************/ private void DIYControlopen(object sender, EventArgs e) { if (_diyControlPad == null) { _diyControlPad = new ControlDIYControlPad(); _diyControlPad.FormClosed += formClosed_DIYControlForm; _diyControlPad.RaiseStreamEvent += OnRaiseDIYCommandEvent; } else { _diyControlPad.Visible = false; } _diyControlPad.Show(this); _diyControlPad.WindowState = FormWindowState.Normal; }
private void formClosed_DIYControlForm(object sender, FormClosedEventArgs e) { _diyControlPad = null; }