// This method will be called when the thread is started. public void DoWork() { RepetierEditor ed = Main.main.editor; string text = ed.getContent(1) + ed.getContent(0) + ed.getContent(2); visual = new GCodeVisual(); visual.ParseText(text, true); visual.Reduce(); //visual.stats(); Main.main.newVisual = visual; Main.main.jobPreviewThreadFinished = true; Main.main.previewThread = null; }
// This method will be called when the thread is started. public void DoWork() { RepetierEditor ed = Main.main.editor; string text = ed.getContent(1) + ed.getContent(0) + ed.getContent(2); Stopwatch sw = new Stopwatch(); sw.Start(); visual = new GCodeVisual(); visual.ParseText(text, true); visual.Reduce(); //visual.stats(); Main.main.newVisual = visual; Main.main.jobPreviewThreadFinished = true; Main.main.previewThread = null; sw.Stop(); //Main.conn.log("Update time:" + sw.ElapsedMilliseconds, false, 3); }