private void PrepareEntityViewer()
 {
     if (entityViewer != null)
     {
         return;
     }
     entityViewer = new frmSchemeViewer(triggerHtmlFilePath);
     entityViewer.Show();
     entityViewer.FormClosing += EntityViewer_FormClosing;
 }
 private void hideEntityViewerToolStripMenuItem_Click(object sender, EventArgs e)
 {
     entityViewerEnabled = !entityViewerEnabled;
     hideEntityViewerToolStripMenuItem.Text = (entityViewerEnabled ? "Hide" : "Show") + " Scheme Viewer";
     if (entityViewerEnabled || entityViewer == null)
     {
         return;
     }
     entityViewer.Close();
     entityViewer = null;
 }
 private void EntityViewer_FormClosing(object sender, FormClosingEventArgs e)
 {
     entityViewer = null;
 }