private void addCommand(string text) { if (this.tbxStatus.InvokeRequired) { addCommandCallback d = new addCommandCallback(addCommand); this.Invoke(d, new object[] { text }); } else { this.tbxStatus.Text += text + Environment.NewLine; } }
private void addCommand(string text) { try { if (this.tbxStatus.InvokeRequired) { addCommandCallback d = new addCommandCallback(addCommand); this.Invoke(d, new object[] { text }); } else { this.tbxStatus.Text += text + Environment.NewLine; } } catch (Exception e) { addCommand("# Error set text tbxStatus \n\n" + e); } }