private void LoggerHandler(ExecutionLoggerEventType type, string message) { if (OnLogger != null) { OnLogger(type, message); } }
public override void Event(ExecutionLoggerEventType type, object data) { Events.Add(new LoggedEvent { Data = data, Type = type }); }
public override void Event(ExecutionLoggerEventType type, object data) { string message = type.ToString() + ": " + data + "\r\n"; if (_textBox.InvokeRequired) { _textBox.Invoke(new Action(() => { _textBox.AppendText(message); })); } else { _textBox.AppendText(message); } }
public override void Event(ExecutionLoggerEventType type, object data) { if (type == ExecutionLoggerEventType.Error) { if (_owner.InvokeRequired) { _owner.Invoke(new Action(() => { MessageBox.Show(_owner, (string)data, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); })); } else { MessageBox.Show(_owner, (string)data, "Ошибка", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
public override void Event(ExecutionLoggerEventType type, object data) { if (type == ExecutionLoggerEventType.UserInfo) { UserInfoData info = (UserInfoData)data; int imageIndex = (int)info.State; _listBox.Invoke(new Action(() => { if (_listBox.Items.ContainsKey(info.Guid)) { _listBox.Items[info.Guid].ImageIndex = imageIndex; } else { _listBox.Items.Add(info.Guid, info.Message, imageIndex); } })); } }
public void AddLogEvent(ExecutionLoggerEventType type, string message) { IterateLoggers((logger) => { logger.Event(type, message); }); }
public override void Event(ExecutionLoggerEventType type, object data) { string message = type.ToString().PadRight(11) + "; " + DateTime.Now.ToString() + "; " + _sessionName + data + "\r\n"; WriteString(message); }
public void AddLogEvent(ExecutionLoggerEventType type, string message) { IterateLoggers((logger)=>{ logger.Event(type, message); }); }
public abstract void Event(ExecutionLoggerEventType type, object data);