public void set2ndSerial(ControlSerialForm handle = null) { _serial_form2 = handle; if (handle != null) { _serial_form2.RaisePosEvent += OnRaisePosEvent; } }
public Control2ndGRBL(ControlSerialForm handle = null) { CultureInfo ci = new CultureInfo(Properties.Settings.Default.language); Thread.CurrentThread.CurrentCulture = ci; Thread.CurrentThread.CurrentUICulture = ci; InitializeComponent(); set2ndSerial(handle); }
public void set2ndSerial(ControlSerialForm handle = null) { _serial_form2 = handle; if (handle != null) { _serial_form2.RaisePosEvent += OnRaisePosEvent; Logger.Trace("add handler RaisePosEvent"); } }
public Control2ndGRBL(ControlSerialForm handle = null) { Logger.Trace("++++++ Control2ndGRBL START ++++++"); CultureInfo ci = new CultureInfo(Properties.Settings.Default.guiLanguage); Thread.CurrentThread.CurrentCulture = ci; Thread.CurrentThread.CurrentUICulture = ci; InitializeComponent(); set2ndSerial(handle); }
public void set2ndSerial(ControlSerialForm handle = null) { _serial_form2 = handle; if (handle != null) { useSerial2 = true; if (log2ndGrbl) { Logger.Trace("set2ndSerial {0}", handle); } } }
public ControlSerialForm(string txt, int nr, ControlSerialForm handle = null) { iamSerial = nr; updateLogging(); Logger.Info("====== SerialForm {0} {1} START ======", iamSerial, txt); formTitle = txt; set2ndSerial(handle); InitializeComponent(); mParserState.reset(); CultureInfo ci = new CultureInfo(Properties.Settings.Default.guiLanguage); Thread.CurrentThread.CurrentCulture = ci; Thread.CurrentThread.CurrentUICulture = ci; this.Icon = Properties.Resources.Icon; this.Invalidate(); timerSerial.Elapsed += timerSerial_Tick; timerSerial.Interval = 1000; }
/******************************************************************** * 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; }