void Shutdown() { using (new Wait()) { this.horzSplitter.Panel2.Controls.Remove(logTextBox); logTextBox.Dispose(); this.statusStrip.Items.Remove(progress); progress.Dispose(); A.SetStatus(Status.Closing); background.Shutdown(); UpdateStatusBar(); statusStrip.Invalidate(); statusStrip.Update(); bool visible = false; if (parseGraph != null) { visible = parseGraph.Visible; parseGraph.Close(); parseGraph = null; } Settings.Set("showParseGraph", visible); Settings.SaveSettings(true); for (int i = 0; i < 10; i++) { T.Sleep(500); T.Debug("waiting for background to stop"); if (Background.status == BackgroundStatus.Stopped) { break; } } } }
void ShowParseGraph() { if (parseGraph == null) { parseGraph = new LayoutGraphParse(this); } parseGraph.ShowGraph(); }