/// <summary> /// 將消息添加到消息列表中 /// </summary> /// <param name="message"></param> public void WriteToConsole(string message) { if (TxtConsole.InvokeRequired) { TxtConsole.Invoke(new Action <string>((string msg) => TxtConsole.AppendText(message + Environment.NewLine)), message); return; } TxtConsole.AppendText(message + Environment.NewLine); }
void CS_ConsoleLog(string Text) { if (TxtConsole.InvokeRequired) { TxtConsole.Invoke(new LogD(CS_ConsoleLog), Text); } else { TxtConsole.Text = Text + "\r\n" + TxtConsole.Text; } }