private void button5_Click(object sender, System.EventArgs e) { var msg = new LogMessage(this, textBox1.Text, new LockRecursionException()); Thread t = new Thread(() => { Thread.Sleep(1000); MessageBus.SendMessage(msg); }); t.Start(); }
public void Init(LogMessage logMessage) { tbTimeStamp.Text = logMessage.TimeStamp.ToString("HH:mm:ss"); tbLevel.Text = logMessage.LogLevel.ToString(); tbText.Text = logMessage.Text; var exception = logMessage.Exception; if (exception != null) { tbType.Text = exception.GetType().FullName; tbMessage.Text = exception.Message; tbStackTrace.Text = exception.StackTrace; } Name = tbTimeStamp.Text; Summary = tbLevel.Text; }