Example #1
0
 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();
 }
Example #2
0
		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();
		}
Example #3
0
 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();
 }
Example #4
0
		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();
		}