public void AddEntry(string msg) { msg = string.Format("{0} {1}\n", DateTime.Now, msg.Trim()); this.log += msg; NewLogEntryEventArgs e = new NewLogEntryEventArgs(msg); OnNewLogEntry(e); }
private void NewLogEntry(object sender, NewLogEntryEventArgs e) { if (this.InvokeRequired) { this.BeginInvoke((MethodInvoker) delegate { NewLogEntry(sender, e); }); return; } AppendLog(e.Msg); Program.Log.Clear(); }
protected virtual void OnNewLogEntry(NewLogEntryEventArgs e) { NewLogEntry?.Invoke(this, e); }