private void StartWorker() { _runner = new Runner(); if (_project != null) { var result = _runner.Run(_project); if (this?.ParentForm?.Visible == true && ParentConsole == false) { if (result.HasErrors) { new LoplaErrors(result.ToString()).ShowDialog(); } } else { Console.WriteLine(result.ToString()); } _windowsDraw.Dispose(); } PostRun(); OnLoplaDone?.Invoke(this, new EventArgs()); }
public void Stop() { PostRun(); try { var closed = _loplaThread.Join(1000); if (closed == false) { // SIGTERM _loplaThread.Interrupt(); } } catch { } OnLoplaDone?.Invoke(this, new EventArgs()); }