private void OnShowToolHierarchy(object sender, EventArgs e) { string label = sender.ToString(); string database; if (label.StartsWith("Database 2")) { database = textBoxDatabase2.Text; } else { database = textBoxDatabase1.Text; } string info = DatabaseUtils.getToolHierarchy(database); // Create, show, or set visible the overview dialog as appropriate if (textDlg == null) { MainForm app = (MainForm)FindForm().FindForm(); textDlg = new ScrolledRichTextDialog( Utils.Utils.getDpiAdjustedSize(app, new Size(600, 400)), info); textDlg.Text = "Tool Hierarchy"; textDlg.Show(); } else { textDlg.Visible = true; } }