Example #1
0
 private void LoggerHandler(ExecutionLoggerEventType type, string message)
 {
     if (OnLogger != null)
     {
         OnLogger(type, message);
     }
 }
Example #2
0
 public override void Event(ExecutionLoggerEventType type, object data)
 {
     Events.Add(new LoggedEvent
                     {
                         Data = data,
                         Type = type
                     });
 }
Example #3
0
 public override void Event(ExecutionLoggerEventType type, object data)
 {
     Events.Add(new LoggedEvent
     {
         Data = data,
         Type = type
     });
 }
Example #4
0
 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);
     }
 }
Example #5
0
        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);
            }
        }
Example #6
0
 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);
         }
     }
 }
Example #7
0
 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);
         }
     }
 }
Example #8
0
 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);
             }
         }));
     }
 }
Example #9
0
 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);
             }
         }));
     }
 }
Example #10
0
 public void AddLogEvent(ExecutionLoggerEventType type, string message)
 {
     IterateLoggers((logger) => {
         logger.Event(type, message);
     });
 }
Example #11
0
 public override void Event(ExecutionLoggerEventType type, object data)
 {
     string message = type.ToString().PadRight(11) + "; " + DateTime.Now.ToString() + "; " + _sessionName + data + "\r\n";
     WriteString(message);
 }
Example #12
0
 public void AddLogEvent(ExecutionLoggerEventType type, string message)
 {
     IterateLoggers((logger)=>{
         logger.Event(type, message);
     });
 }
Example #13
0
 public abstract void Event(ExecutionLoggerEventType type, object data);
Example #14
0
        public override void Event(ExecutionLoggerEventType type, object data)
        {
            string message = type.ToString().PadRight(11) + "; " + DateTime.Now.ToString() + "; " + _sessionName + data + "\r\n";

            WriteString(message);
        }
Example #15
0
 public abstract void Event(ExecutionLoggerEventType type, object data);
Example #16
0
 private void LoggerHandler(ExecutionLoggerEventType type, string message)
 {
     if (OnLogger != null)
     {
         OnLogger(type, message);
     }
 }