private void CloseNotifyForm() { if (notifyForm != null) { if (notifyForm.InvokeRequired) { try { notifyForm.Invoke((MethodInvoker)delegate { notifyForm.Close(); }); } catch (Exception e) { LogMessage.Log(e.Message); } } else { notifyForm.Close(); } notifyForm = null; } }
private void ShowNotifyForm(Object obj) { TagInfo ti = obj as TagInfo; if (ti != null) { int max = (Int32)ti.Object1; notifyForm = new ProgressNotification((ti.Text == String.Empty) ? "Processing Information..." : ti.Text, "Please wait...", max); exitLoop = false; if (notifyForm.ShowDialog() == DialogResult.Abort) exitLoop = true; } }