示例#1
0
 public void CloseThis(string text)
 {
     // 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)
     {
         CloseThisCallback d = new CloseThisCallback(CloseThis);
         this.Invoke(d, new object[] { text });
     }
     else
     {
         this.downloadForm.Close();
         this.Close();
     }
 }
示例#2
0
        public void CloseThis(string text)
        {
            // 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)
            {
                CloseThisCallback d = new CloseThisCallback(CloseThis);
                this.Invoke(d, new object[] { text });
            }
            else
            {
                try
                {
                    this.progressTracker.CloseThis(null);
                }
                catch
                {
                    ;
                }

                this.Close();
            }
        }