示例#1
0
 /// <summary>
 /// Thread safe application reload
 /// </summary>
 private void ReloadApplication()
 {
     // InvokeRequired required compares the thread ID of the
     // calling thread to the thread ID of the creating thread.
     // If these threads are different, it returns true.
     if (this.InvokeRequired)
     {
         ReloadApplicationCallback callback = new ReloadApplicationCallback(ReloadApplication);
         Invoke(callback, null);
     }
     else
     {
         AppContext.AppForm.ReloadApplication();
     }
 }
示例#2
0
		/// <summary>
		/// Thread safe application reload
		/// </summary>
		private void ReloadApplication()
		{
			// InvokeRequired required compares the thread ID of the
			// calling thread to the thread ID of the creating thread.
			// If these threads are different, it returns true.
			if (this.InvokeRequired)
			{
				ReloadApplicationCallback callback = new ReloadApplicationCallback(ReloadApplication);
				Invoke(callback, null);
			}
			else
			{
				AppContext.AppForm.ReloadApplication();
			}
		}