protected virtual void OnLogAdded(LoggerEventArgs e) { LoggerEventHandler handler = LogAdded; if (handler != null) { handler(this, e); } }
void _logger_LogAdded(object sender, LoggerEventArgs a) { try { if (txtBoxErrorLog.InvokeRequired) { // Need to invoke txtBoxErrorLog.Invoke(new MethodInvoker(delegate() { txtBoxErrorLog.Text = a.LogDetails; })); } else { txtBoxErrorLog.Text = a.LogDetails; } } catch (Exception ex) { txtBoxErrorLog.Text = ex.Message; } }
protected virtual void OnLogAdded(LoggerEventArgs e) { LoggerEventHandler handler = LogAdded; if (handler != null) { handler(this, e); } }
void _logger_LogAdded(object sender, LoggerEventArgs a) { try { if (txtBoxErrorLog.InvokeRequired) { // Need to invoke txtBoxErrorLog.Invoke(new MethodInvoker(delegate() { txtBoxErrorLog.Text = a.LogDetails; })); } else { txtBoxErrorLog.Text = a.LogDetails; } } catch (Exception ex) { txtBoxErrorLog.Text = ex.Message; } }