Пример #1
0
 /// <summary>
 /// The log service_ message logged.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="e">
 /// The e.
 /// </param>
 private void LogService_MessageLogged(object sender, LogEventArgs e)
 {
     if (this.lastReadIndex < e.Log.MessageIndex)
     {
         Execute.OnUIThreadAsync(
             () =>
                 {
                     this.lastReadIndex = e.Log.MessageIndex;
                     this.log.AppendLine(e.Log.Content);
                     this.OnLogMessageReceived(e);
                     this.NotifyOfPropertyChange("ActivityLog");
                 });
     }
 }
Пример #2
0
 /// <summary>
 /// Trigger a faster / smoother way of updating the log window.
 /// </summary>
 /// <param name="e">
 /// The e.
 /// </param>
 protected virtual void OnLogMessageReceived(LogEventArgs e)
 {
     var onLogMessageReceived = this.LogMessageReceived;
     if (onLogMessageReceived != null)
     {
         onLogMessageReceived.Invoke(this, e);
     }
 }