예제 #1
0
 private void alterStatusLabel(ToolStripStatusLabel lbl, string val)
 {
     if (StatusStrip1.InvokeRequired == true)
     {
         StatusStrip1.BeginInvoke(new Action(() => alterStatusLabel(lbl, val)));
     }
     else
     {
         lbl.Text = val;
     }
 }
예제 #2
0
 private void SetStatusBar(string text)
 {
     if (StatusStrip1.InvokeRequired)
     {
         var del = new Action(() => SetStatusBar(text));
         StatusStrip1.BeginInvoke(del);
     }
     else
     {
         StatusLabel.Text = text;
         StatusStrip1.Update();
     }
 }
예제 #3
0
 private void SetServerTime(string serverTime)
 {
     if (StatusStrip1.InvokeRequired)
     {
         var del = new Action(() => SetServerTime(serverTime));
         StatusStrip1.BeginInvoke(del);
     }
     else
     {
         DateTimeLabel.Text = serverTime;
         StatusStrip1.Update();
     }
 }
예제 #4
0
 private void ConnectStatus(string text, Color foreColor, Color backColor, string toolTipText)
 {
     if (StatusStrip1.InvokeRequired)
     {
         var del = new Action(() => ConnectStatus(text, foreColor, backColor, toolTipText));
         StatusStrip1.BeginInvoke(del);
     }
     else
     {
         ConnStatusLabel.Text        = text;
         ConnStatusLabel.ToolTipText = toolTipText;
         ConnStatusLabel.ForeColor   = foreColor;
         StatusStrip1.BackColor      = backColor;
         StatusStrip1.Update();
     }
 }