private void DisplayStageMessageReceiving(string text) { if (lbProgressReceiving.InvokeRequired) { ProcessTextHandler d = new ProcessTextHandler(DisplayStageMessageReceiving); this.Invoke(d, new object[] { text }); } else { lbProgressReceiving.Text = text; } }
private void DisplayStageMessage(string text) { if (barLabelSending.Label.InvokeRequired) { ProcessTextHandler d = new ProcessTextHandler(DisplayStageMessage); this.Invoke(d, new object[] { text }); } else { barLabelSending.Label.Text = text; } }
/// <summary> /// Provide async/threaded call upon box for Trace and Debug /// </summary> /// <param name="text"></param> private void ProcessTextDelegate(string text) { if (box.InvokeRequired) { ProcessTextHandler d = new ProcessTextHandler(ProcessTextDelegate); // Action<string> d = ProcessTextDelegate; box.Invoke(d, new object[] { text }); } else { box.AppendText(text); } }
/// <summary> /// Display text asynchroneously in edStatus /// </summary> /// <param name="s"></param> private void UpdateStatusLogText(string s) { if (s == null) { return; } if (edStatus.InvokeRequired) { ProcessTextHandler d = new ProcessTextHandler(UpdateStatusLogText); this.Invoke(d, new object[] { s }); } else { // statusLabel.Text = s; edStatus.AppendText(DateTime.Now.ToLongTimeString() + ": " + s + Environment.NewLine); } }