Exemplo n.º 1
0
        public void XyzDisplay(bool force = false)
        {
            if (!(force || ((mCController != null) && mCController.SerialPortIsOpen()) || simMode.Checked))
            {
                return;
            }
            Invoke(new Action(() =>
            {
                labelX.Text = CoortToString(AbsWorkCoorts.x);
                labelY.Text = CoortToString(AbsWorkCoorts.y);
                labelZ.Text = CoortToString(AbsWorkCoorts.z);

                AbsWorkCoortsToCur();

                buttonCurWorkX.Text = CoortToString(CurWorkCoorts.x);
                buttonCurWorkY.Text = CoortToString(CurWorkCoorts.y);
                buttonCurWorkZ.Text = CoortToString(CurWorkCoorts.z);

                if (Drawer != null)
                {
                    Drawer.AddPoint(AbsWorkCoorts.x, AbsWorkCoorts.y, AbsWorkCoorts.z);
                }
            }));
        }
 private void DrawingBoard_MouseDown(object sender, MouseEventArgs e)
 {
     _mouseDown = true;
     _drawer.ResetPoints();
     _drawer.AddPoint(e.Location.X, e.Location.Y);
 }