Exemplo n.º 1
0
 /// <summary>
 /// Error message handler.
 /// </summary>
 private void AddError(object sender, ErrorEventArgs e)
 {
     Application.Current.Dispatcher.BeginInvoke(
         DispatcherPriority.Background,
         new Action(() =>
     {
         Messages.Add("[" + DateTime.Now.ToString("h:mm:ss tt") + "] ERROR: " + e.Message);
         MessagePane.ScrollIntoView(MessagePane.Items[MessagePane.Items.Count - 1]);
     }
                    )
         );
 }