private void alterStatusLabel(ToolStripStatusLabel lbl, string val) { if (StatusStrip1.InvokeRequired == true) { StatusStrip1.BeginInvoke(new Action(() => alterStatusLabel(lbl, val))); } else { lbl.Text = val; } }
private void SetStatusBar(string text) { if (StatusStrip1.InvokeRequired) { var del = new Action(() => SetStatusBar(text)); StatusStrip1.BeginInvoke(del); } else { StatusLabel.Text = text; StatusStrip1.Update(); } }
private void SetServerTime(string serverTime) { if (StatusStrip1.InvokeRequired) { var del = new Action(() => SetServerTime(serverTime)); StatusStrip1.BeginInvoke(del); } else { DateTimeLabel.Text = serverTime; StatusStrip1.Update(); } }
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(); } }