public static void CloseProgress() { if (_queueCount <= 1) { if (_instance.InvokeRequired) { _instance.Invoke(new MethodInvoker(() => { _instance.Hide(); _instance.HideTrayIcon(); Application.DoEvents(); })); } else { _instance.Hide(); _instance.HideTrayIcon(); _instance.Dispose(); _instance = null; } } if (_queueCount > 0) { _queueCount--; } Application.DoEvents(); }
public static void ShowProgress() { if (_instance == null) _instance = new FormStart(); if (_instance.InvokeRequired) _instance.Invoke(new MethodInvoker(() => { _instance.Show(); Application.DoEvents(); })); else _instance.Show(); _queueCount++; Application.DoEvents(); }
public static void ShowProgress() { if (_instance == null) { _instance = new FormStart(); } if (_instance.InvokeRequired) { _instance.Invoke(new MethodInvoker(() => { _instance.Show(); Application.DoEvents(); })); } else { _instance.Show(); } _queueCount++; Application.DoEvents(); }
public static void CloseProgress() { if (_queueCount <= 1) { if (_instance.InvokeRequired) _instance.Invoke(new MethodInvoker(() => { _instance.Hide(); _instance.HideTrayIcon(); Application.DoEvents(); })); else { _instance.Hide(); _instance.HideTrayIcon(); _instance.Dispose(); _instance = null; } } if (_queueCount > 0) _queueCount--; Application.DoEvents(); }