Ejemplo n.º 1
0
        public GCodeJob()
        {
            InitializeComponent();

            this.grblState.State    = GrblStates.Unknown;
            this.grblState.Substate = 0;

            this.GCodeView.DragEnter          += new DragEventHandler(UserUI_DragEnter);
            this.GCodeView.DragDrop           += new DragEventHandler(UserUI_DragDrop);
            this.GCodeView.AutoGenerateColumns = false;

            this.btnStart.Click  += new EventHandler(btnStart_Click);
            this.btnStop.Click   += new EventHandler(btnStop_Click);
            this.btnHold.Click   += new EventHandler(btnHold_Click);
            this.btnRewind.Click += new EventHandler(btnRewind_Click);

            this.MPGMode       = false;
            this.ActiveControl = this.GCodeView;

            this.poller  = new PollGrbl();
            this.polling = new Thread(new ThreadStart(poller.run));
            polling.Start();
            System.Threading.Thread.Sleep(100);
            //      while (!polling.IsAlive);
        }