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; } } }
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; } }