/// <summary> Log data to the terminal window. </summary> /// <param name="msgtype"> The type of message to be written. </param> /// <param name="msg"> The string containing the message to be shown. </param> private void Log_Clear() { Infor_richTextBox.Invoke(new EventHandler(delegate { Infor_richTextBox.Clear(); })); }
private void Log(LogMsgType msgtype, string msg) { Infor_richTextBox.Invoke(new EventHandler(delegate { Infor_richTextBox.SelectedText = string.Empty; Infor_richTextBox.SelectionFont = new Font(Infor_richTextBox.SelectionFont, FontStyle.Bold); Infor_richTextBox.SelectionColor = LogMsgTypeColor[(int)msgtype]; Infor_richTextBox.AppendText(msg); Infor_richTextBox.ScrollToCaret(); })); }