Example #1
0
 private void CloseMenuItem_Click(object sender, EventArgs e)
 {
     if (this.ActiveMdiChild is LogForm)
     {
         logging.Close();
         logging.Dispose();
         logging = null;
     }
     else if (this.ActiveMdiChild != null)
     {
         this.ActiveMdiChild.Close();
     }
 }
Example #2
0
 private void CloseMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (this.ActiveMdiChild is LogForm)
         {
             logging.Close();
             logging.Dispose();
             logging = null;
         }
         else
         {
             using (Viewer child = (Viewer)this.ActiveMdiChild)
             {
                 child.Close();
             }
             System.GC.Collect();
         }
     }
     catch
     {
     }
 }
Example #3
0
 private void ToggleLogging()
 {
     if (logging == null)
     {
         logging             = new LogForm();
         logging.MdiParent   = this;
         logging.WindowState = FormWindowState.Maximized;
         logging.Show();
     }
     else
     {
         logging.Close();
         logging.Dispose();
         logging = null;
     }
     LoggingToolStripMenuItem.Checked = (logging != null);
 }
Example #4
0
 public override async Task StopAsync()
 {
     Global.MainForm.Invoke(() => { _form.Close(); });
     await StopGuardAsync();
 }