Exemplo n.º 1
0
        public void GoToXYZ(int x = Int32.MinValue, int y = Int32.MinValue, int z = Int32.MinValue, int w = Int32.MinValue)
        {
            MainWindow.do_steps var_do_steps = new MainWindow.do_steps();

            if (z > Int32.MinValue)
                var_do_steps.m_uSteps[Z_POS] = z - m_cur_pos.z;
            if (x > Int32.MinValue)
                var_do_steps.m_uSteps[X_POS] = x - m_cur_pos.x;
            if (y > Int32.MinValue)
                var_do_steps.m_uSteps[Y_POS] = y - m_cur_pos.y;
            if (w > Int32.MinValue)
                var_do_steps.m_uSteps[W_POS] = w - m_cur_pos.w;

            string s;
            s = String.Format("Z:{0},X:{1},Y:{2}",
                var_do_steps.m_uSteps[Z_POS],
                var_do_steps.m_uSteps[X_POS],
                var_do_steps.m_uSteps[Y_POS]);
            Debug.WriteLine(s);

            SetStepsToController(var_do_steps);
        }
 void PassSteps(int x = 0, int y = 0, int z = 0, int w = 0, bool update_pos = true)
 {
     MainWindow wnd = MainWindow.GetMainWnd();
     MainWindow.do_steps var_do_steps = new MainWindow.do_steps();
     var_do_steps.m_uSteps[MainWindow.Z_POS] = z;
     var_do_steps.m_uSteps[MainWindow.X_POS] = x;
     var_do_steps.m_uSteps[MainWindow.Y_POS] = y;
     var_do_steps.m_uSteps[MainWindow.W_POS] = w;
     wnd.SetStepsToController(var_do_steps, update_pos);
 }
Exemplo n.º 3
0
 public void GoToBW(int b, int w)
 {
     MainWindow.do_steps var_do_steps = new MainWindow.do_steps();
     var_do_steps.m_uSteps[Y_POS] = b - m_cur_pos.y;
     var_do_steps.m_uSteps[W_POS] = w - m_cur_pos.w;
     SetStepsToController(var_do_steps);
 }