Inheritance: System.EventArgs
Ejemplo n.º 1
0
        private void ChatOnNewMessage(object sender, EngagementActivity e)
        {
            if (!Dispatcher.CheckAccess()) // Only run with dispatcher
            {
                Dispatcher.Invoke(new Action(() => ChatOnNewMessage(sender, e)));
                return;
            }
            // Only run event handler if the dispatcher is not shutting down.
            if (!Dispatcher.HasShutdownStarted)
            {
                ChatPanelViewer.ScrollToBottom();
                if (_lastMessage.Day != DateTime.Now.Day)
                {
                    Logger.Debug("Rolling over into new day, adjusting times in " + _engagementWindow.Engagement.SecondParty.Party.Username);
                    // This is to make sure that all the items 'friendly dates' remain correct on midnight rollover
                    ChatPanel.Items.Refresh();
                }
                _lastMessage = DateTime.Now;

            }
        }
Ejemplo n.º 2
0
 public void OnActivity(EngagementActivity args)
 {
     args.Engagement.ActivityOccured(args);
     if (_appContext.IsShuttingDown) return;
     EngagementActivityEvent handler = NewActivity;
     if (handler != null) handler(this, args);
 }
Ejemplo n.º 3
0
 public void ActivityOccured(EngagementActivity args)
 {
     IsUnread = true;
     Interactions.CurrentOrNewInteraction.RecordActivity(args);
 }
Ejemplo n.º 4
0
 internal void RecordActivity(EngagementActivity activity)
 {
     Activities.Add(activity);
     LastActivity = DateTime.Now;
     Logger.Debug("[" + Id + "] Recorded activity " + activity);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Called if there is new activity on an engagement, so we can prompt the user
 /// </summary>
 /// <param name="sender">sender</param>
 /// <param name="args">what is the activity</param>
 internal void EngagementManagerOnNewActivity(object sender, EngagementActivity args)
 {
     if (_appContext.IsShuttingDown)
         return;
     Show();
     RefreshRosters();
 }
Ejemplo n.º 6
0
 public void ActivityOccured(EngagementActivity args)
 {
     IsUnread = true;
     Interactions.CurrentOrNewInteraction.RecordActivity(args);
 }