private void applyHeightMap(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; if (!isHeightMapApplied) { loadHeightMap(sender, e); codeBeforeHeightMap.Clear(); foreach (string codeline in fCTBCode.Lines) { if (codeline.Length > 0) { codeBeforeHeightMap.AppendLine(codeline); } } VisuGCode.getGCodeLines(fCTBCode.Lines); fCTBCode.Text = VisuGCode.applyHeightMap(fCTBCode.Lines, _heightmap_form.Map); update_GCode_Depending_Controls(); _heightmap_form.setBtnApply(isHeightMapApplied); isHeightMapApplied = true; } else { fCTBCode.Text = codeBeforeHeightMap.ToString(); update_GCode_Depending_Controls(); _heightmap_form.setBtnApply(isHeightMapApplied); isHeightMapApplied = false; } Cursor.Current = Cursors.Default; }
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 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); }
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { BackgroundWorker worker = sender as BackgroundWorker; e.Result = VisuGCode.getGCodeLines(tmpGCode, worker, e); }