Exemplo n.º 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;
     }
 }
Exemplo n.º 2
0
 public void SetTitle(string text)
 {
     if (InvokeRequired)
     {
         SetTitleCallback d = new SetTitleCallback(SetTitle);
         this.Invoke(d, new object[] { text });
     }
     else
     {
         Text = text;
     }
 }
Exemplo n.º 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;
     }
 }
Exemplo n.º 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;
     }
 }
Exemplo n.º 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;
     }
 }
Exemplo n.º 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;
     }
 }