private void button1_Click(object sender, EventArgs e) { Debug.Assert(_logForm.InvokeRequired); _logForm.BeginInvoke(delegate { if (!_logForm.Visible) { _logForm.Show(); } _logForm.Activate(); }); }
private void ShowLogForm(string logPath) { if (logForm != null) { logForm.Activate(); } else { logForm = new LogForm(logPath); logForm.Show(); logForm.Activate(); logForm.FormClosed += (s, e) => { logForm.Dispose(); logForm = null; Utils.ReleaseMemory(true); }; } }
private void CheckIODMenuItem_Click(object sender, EventArgs e) { try { this.Cursor = Cursors.WaitCursor; Browser child = (Browser)this.ActiveMdiChild; if (child != null) { if (logging == null) { ToggleLogging(); } logging.Activate(); bool passed = child.VerifyIOD(); //System.Windows.Forms.MessageBox.Show(String.Format("Verify IOD {0}", passed ? "Passed!" : "Failed! See log for details.")); } } finally { this.Cursor = Cursors.Default; } }