private void transformEnd()
 {
     VisuGCode.getGCodeLines(fCTBCode.Lines);                    // get code path
     VisuGCode.calcDrawingArea();                                // calc ruler dimension
     VisuGCode.drawMachineLimit(toolTable.getToolCordinates());
     pictureBox1.Invalidate();                                   // resfresh view
     update_GCode_Depending_Controls();                          // update GUI controls
     updateControls();                                           // update control enable
     this.Cursor = Cursors.Default;
 }
 private void loadHeightMap(object sender, EventArgs e)
 {
     if (_heightmap_form.mapIsLoaded)
     {
         VisuGCode.drawHeightMap(_heightmap_form.Map);
         VisuGCode.createMarkerPath();
         VisuGCode.calcDrawingArea();
         pictureBox1.BackgroundImage = null;
         pictureBox1.Invalidate();
         isHeightMapApplied          = false;
         _heightmap_form.mapIsLoaded = false;
     }
 }
Beispiel #3
0
 private void transformEnd()
 {
     VisuGCode.getGCodeLines(fCTBCode.Lines, null, null);        // get code path
     VisuGCode.calcDrawingArea();                                // calc ruler dimension
     VisuGCode.drawMachineLimit(toolTable.getToolCordinates());
     pictureBox1.Invalidate();                                   // resfresh view
     update_GCode_Depending_Controls();                          // update GUI controls
     timerUpdateControlSource = "transformEnd";
     updateControls();                                           // update control enable
     enableCmsCodeBlocks(VisuGCode.codeBlocksAvailable());
     this.Cursor = Cursors.Default;
     setEditMode(false);
 }
 // handle event from create Height Map form
 private void getGCodeScanHeightMap(object sender, EventArgs e)
 {
     if (!isStreaming && _serial_form.serialPortOpen)
     {
         if (_heightmap_form.scanStarted)
         {
             string[] commands = _heightmap_form.getCode.ToString().Split('\r');
             _serial_form.isHeightProbing = true;
             foreach (string cmd in commands)            // fill up send queue
             {
                 if (machineStatus == grblState.alarm)
                 {
                     break;
                 }
                 sendCommand(cmd);
             }
             VisuGCode.drawHeightMap(_heightmap_form.Map);
             VisuGCode.createMarkerPath();
             VisuGCode.calcDrawingArea();
             pictureBox1.BackgroundImage = null;
             pictureBox1.Invalidate();
             if (_diyControlPad != null)
             {
                 _diyControlPad.isHeightProbing = true;
             }
             Properties.Settings.Default.counterUseHeightMap += 1;
         }
         else
         {
             _serial_form.stopStreaming();
             if (_diyControlPad != null)
             {
                 _diyControlPad.isHeightProbing = false;
             }
         }
         isHeightMapApplied = false;
     }
 }