Exemplo n.º 1
0
/********************************************************************
* Control 2nd grbl via 2nd COM
* _serial_form2, _2ndGRBL_form
********************************************************************/
        private void control2ndGRBLToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (_2ndGRBL_form == null)
            {
                _2ndGRBL_form = new Control2ndGRBL(_serial_form2);
                if (_serial_form2 == null)
                {
                    _serial_form2 = new ControlSerialForm("COM Tool changer", 2);
                    _serial_form2.Show(this);
                }
                _2ndGRBL_form.set2ndSerial(_serial_form2);
                _serial_form.set2ndSerial(_serial_form2);
                _2ndGRBL_form.FormClosed += formClosed_2ndGRBLForm;
            }
            else
            {
                _2ndGRBL_form.Visible = false;
            }
            _2ndGRBL_form.Show(this);
            _2ndGRBL_form.WindowState = FormWindowState.Normal;
        }
Exemplo n.º 2
0
 private void formClosed_2ndGRBLForm(object sender, FormClosedEventArgs e)
 {
     _2ndGRBL_form = null;
 }