Пример #1
0
/********************************************************************
* Streaming - Override Controls for grbl 0.9 or 1.1 - probably obsolet
* _streaming_form, _streaming_form2
********************************************************************/
        private void controlStreamingToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (grbl.isVersion_0)
            {
                if (_streaming_form2 != null)
                {
                    _streaming_form2.Visible = false;
                }
                if (_streaming_form == null)
                {
                    _streaming_form                     = new ControlStreamingForm();
                    _streaming_form.FormClosed         += formClosed_StreamingForm;
                    _streaming_form.RaiseOverrideEvent += OnRaiseOverrideEvent;      // assign  event
                    _streaming_form.show_value_FR(actualFR);
                    _streaming_form.show_value_SS(actualSS);
                }
                else
                {
                    _streaming_form.Visible = false;
                }
                _streaming_form.Show(this);
                _streaming_form.WindowState = FormWindowState.Normal;
            }
            else
            {
                if (_streaming_form != null)
                {
                    _streaming_form.Visible = false;
                }
                if (_streaming_form2 == null)
                {
                    _streaming_form2                     = new ControlStreamingForm2();
                    _streaming_form2.FormClosed         += formClosed_StreamingForm;
                    _streaming_form2.RaiseOverrideEvent += OnRaiseOverrideMessage;      // assign  event
                }
                else
                {
                    _streaming_form2.Visible = false;
                }
                _streaming_form2.Show(this);
                _streaming_form2.WindowState = FormWindowState.Normal;
            }
        }
Пример #2
0
 private void formClosed_StreamingForm(object sender, FormClosedEventArgs e)
 {
     _streaming_form = null; _streaming_form2 = null;
 }