コード例 #1
0
ファイル: ProgressDialog.cs プロジェクト: morkl/fdotoolbox
 /// <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
ファイル: Form1.cs プロジェクト: jaron780/RconTool
 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
ファイル: ProgressDialog.cs プロジェクト: stophun/fdotoolbox
 /// <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
ファイル: fmMain.cs プロジェクト: Zortrox/RitoAPI
 // 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;
     }
 }