Пример #1
0
 /// <summary>
 /// Sets the title of the progress dialog
 /// </summary>
 /// <param name="title">The title.</param>
 public static void SetTitle(string title)
 {
     if (instance.InvokeRequired) //if another thread called this method
     {
         SetTitleCallback s = new SetTitleCallback(SetTitle);
         instance.Invoke(s, title);
     }
     else
     {
         instance.Text = title;
     }
 }
Пример #2
0
 public void SetTitle(string text)
 {
     if (InvokeRequired)
     {
         SetTitleCallback d = new SetTitleCallback(SetTitle);
         this.Invoke(d, new object[] { text });
     }
     else
     {
         Text = text;
     }
 }
Пример #3
0
 // Allows setting the application title from seperate threads
 private void SetTitle(string s)
 {
     if (this.InvokeRequired)
     {
         SetTitleCallback d = new SetTitleCallback(SetTitle);
         this.Invoke(d, new object[] { s });
     }
     else
     {
         this.Text = s;
     }
 }
Пример #4
0
 public void SetTitle(string title, string subtitle)
 {
     // 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 || this.labelHead.InvokeRequired)
     {
         SetTitleCallback titleCallback = new SetTitleCallback(SetTitle);
         this.Invoke(titleCallback, new object[] { title, subtitle });
     }
     else
     {
         this.Text           = title;
         this.labelHead.Text = subtitle;
     }
 }
Пример #5
0
 /// <summary>
 /// Sets the title of the progress dialog
 /// </summary>
 /// <param name="title">The title.</param>
 public static void SetTitle(string title)
 {
     if (instance.InvokeRequired) //if another thread called this method
     {
         SetTitleCallback s = new SetTitleCallback(SetTitle);
         instance.Invoke(s, title);
     }
     else
     {
         instance.Text = title;
     }
 }
Пример #6
0
 // Allows setting the application title from seperate threads
 private void SetTitle(string s)
 {
     if (this.InvokeRequired)
     {
         SetTitleCallback d = new SetTitleCallback(SetTitle);
         this.Invoke(d, new object[] { s });
     }
     else
     {
         this.Text = s;
     }
 }