示例#1
0
 private void CloseWindow()
 {
     if (this.InvokeRequired)
     {
         CloseWindowCallback callback = new CloseWindowCallback(CloseWindow);
         this.Invoke(callback);
     }
     else
     {
         this.Close();
     }
 }
示例#2
0
 private void CloseWindow()
 {
     // 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.appProgressBar.InvokeRequired)
     {
         CloseWindowCallback d = new CloseWindowCallback(CloseWindow);
         this.Invoke(d);
     }
     else
     {
         this.Close();
     }
 }
示例#3
0
 private void CloseWindow()
 {
     try
     {
         if (this.InvokeRequired)
         {
             CloseWindowCallback d = new CloseWindowCallback(CloseWindow);
             this.Invoke(d);
         }
         else
         {
             this.Closing -= new System.ComponentModel.CancelEventHandler(this.Form1_Closing);
             this.Close();
             Application.Exit();
         }
     }
     catch
     { }
 }
示例#4
0
 private void CloseWindow()
 {
     // 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.appProgressBar.InvokeRequired)
     {
         CloseWindowCallback d = new CloseWindowCallback(CloseWindow);
         this.Invoke(d);
     }
     else
     {
         this.Close();
     }
 }