Ejemplo n.º 1
0
 private void BtnHome_Click(object sender, EventArgs e)
 {
     Core.JogHome(TbSpeed.Value);
 }
Ejemplo n.º 2
0
 private void Home_Click(object sender, UserControls.Move2DControl.HomeEventArgs e)
 {
     Core.JogSpeed = (int)e.F;
     Core.JogHome();
 }
Ejemplo n.º 3
0
 private void BtnHome_Click(object sender, EventArgs e)
 {
     Core.JogHome();
 }
Ejemplo n.º 4
0
        private bool PerformAction(HotKey.Actions action)
        {
            switch (action)
            {
            case HotKey.Actions.ConnectDisconnect:
                mCore.HKConnectDisconnect(); break;

            case HotKey.Actions.Connect:
                mCore.HKConnect(); break;

            case HotKey.Actions.Disconnect:
                mCore.HKDisconnect(); break;

            case HotKey.Actions.OpenFile:
                mCore.OpenFile(Application.OpenForms[0]); break;

            case HotKey.Actions.ReopenLastFile:
                mCore.ReOpenFile(Application.OpenForms[0]); break;

            case HotKey.Actions.SaveFile:
                mCore.SaveProgram(); break;

            case HotKey.Actions.ExecuteFile:
                mCore.RunProgram(); break;

            case HotKey.Actions.HelpOnline:
                mCore.HelpOnLine(); break;

            case HotKey.Actions.Reset:
                mCore.GrblReset(); break;

            case HotKey.Actions.Homing:
                mCore.GrblHoming(); break;

            case HotKey.Actions.Unlock:
                mCore.GrblUnlock(); break;

            case HotKey.Actions.PauseJob:
                mCore.FeedHold(); break;

            case HotKey.Actions.ResumeJob:
                mCore.CycleStartResume(); break;

            case HotKey.Actions.SetNewZero:
                mCore.SetNewZero(); break;

            case HotKey.Actions.JogHome:
                mCore.JogHome(); break;

            case HotKey.Actions.JogN:
                mCore.Jog(GrblCore.JogDirection.N); break;

            case HotKey.Actions.JogNE:
                mCore.Jog(GrblCore.JogDirection.NE); break;

            case HotKey.Actions.JogE:
                mCore.Jog(GrblCore.JogDirection.E); break;

            case HotKey.Actions.JogSE:
                mCore.Jog(GrblCore.JogDirection.SE); break;

            case HotKey.Actions.JogS:
                mCore.Jog(GrblCore.JogDirection.S); break;

            case HotKey.Actions.JogSW:
                mCore.Jog(GrblCore.JogDirection.SW); break;

            case HotKey.Actions.JogW:
                mCore.Jog(GrblCore.JogDirection.W); break;

            case HotKey.Actions.JogNW:
                mCore.Jog(GrblCore.JogDirection.NW); break;

            case HotKey.Actions.CustomButton1:
                mCore.HKCustomButton(0); break;

            case HotKey.Actions.CustomButton2:
                mCore.HKCustomButton(1); break;

            case HotKey.Actions.CustomButton3:
                mCore.HKCustomButton(2); break;

            case HotKey.Actions.CustomButton4:
                mCore.HKCustomButton(3); break;

            case HotKey.Actions.CustomButton5:
                mCore.HKCustomButton(4); break;

            case HotKey.Actions.CustomButton6:
                mCore.HKCustomButton(5); break;

            case HotKey.Actions.CustomButton7:
                mCore.HKCustomButton(6); break;

            case HotKey.Actions.CustomButton8:
                mCore.HKCustomButton(7); break;

            case HotKey.Actions.CustomButton9:
                mCore.HKCustomButton(8); break;

            case HotKey.Actions.CustomButton10:
                mCore.HKCustomButton(9); break;

            default:
                break;
            }

            //ConnectDisconnect = 10, Connect = 11, Disconnect = 12,
            //OpenFile = 20, ReopenLastFile = 21, SaveFile = 22, ExecuteFile = 23,
            //HelpOnline = 30,
            //Reset = 100, Homing = 101, Unlock = 102,  PauseJob = 103, ResumeJob = 104, SetNewZero = 105,
            //JogHome = 1000, JogN = 1001, JogNE = 1002, JogE = 1003, JogSE = 1004, JogS = 1005, JogSO = 1006, JogO = 1007, JogNO = 1008,
            //CustomButton1 = 2000, CustomButton2 = 2001, CustomButton3 = 2002, CustomButton4 = 2003, CustomButton5 = 2004, CustomButton6 = 2005, CustomButton7 = 2006, CustomButton8 = 2007, CustomButton9 = 2008, CustomButton10 = 2009


            return(true);
        }