示例#1
0
 private void WriteStatusText(string text, Color?color = null)
 {
     if (this.InvokeRequired)
     {
         var del = new delegateStringColor(WriteStatusText);
         this.Invoke(del, new Object[] { text, color });
     }
     else
     {
         labelStatus.Text = text;
         if (color != null && color.HasValue)
         {
             labelStatus.ForeColor = color.Value;
         }
     }
 }
示例#2
0
 private void WriteStatusText(string text, Color? color = null)
 {
     if (this.InvokeRequired)
     {
         var del = new delegateStringColor(WriteStatusText);
         this.Invoke(del, new Object[] { text, color });
     }
     else
     {
         labelStatus.Text = text;
         if (color != null && color.HasValue)
             labelStatus.ForeColor = color.Value;
     }
 }