private void SetText(string text) { if (this.custStatusBox.InvokeRequired) { while (!this.custStatusBox.IsHandleCreated) { if (this.custStatusBox.Disposing || this.custStatusBox.IsDisposed) return; } SetTextback d = new SetTextback(SetText); this.custStatusBox.Invoke(d, new Object[] { text }); } else { this.custStatusBox.Text += text + "\r\n"; } }
private void SetText(string text) { if (this.txtReport.InvokeRequired) { while (!this.txtReport.IsHandleCreated) { if (this.txtReport.Disposing || this.txtReport.IsDisposed) return; } SetTextback d = new SetTextback(SetText); this.txtReport.Invoke(d, new Object[] { text }); } else { this.txtReport.Text += text + "\r\n"; } //DateTime.Now.ToString("[yyyy-mm-dd hh:mm:ss]\t") + text + "\r\n"; } }