Inheritance: System.EventArgs
コード例 #1
0
ファイル: ChatWindow.xaml.cs プロジェクト: gwupe/Gwupe
        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;

            }
        }
コード例 #2
0
ファイル: EngagementManager.cs プロジェクト: gwupe/Gwupe
 public void OnActivity(EngagementActivity args)
 {
     args.Engagement.ActivityOccured(args);
     if (_appContext.IsShuttingDown) return;
     EngagementActivityEvent handler = NewActivity;
     if (handler != null) handler(this, args);
 }
コード例 #3
0
ファイル: Engagement.cs プロジェクト: gwupe/Gwupe
 public void ActivityOccured(EngagementActivity args)
 {
     IsUnread = true;
     Interactions.CurrentOrNewInteraction.RecordActivity(args);
 }
コード例 #4
0
ファイル: Interaction.cs プロジェクト: gwupe/Gwupe
 internal void RecordActivity(EngagementActivity activity)
 {
     Activities.Add(activity);
     LastActivity = DateTime.Now;
     Logger.Debug("[" + Id + "] Recorded activity " + activity);
 }
コード例 #5
0
ファイル: Dashboard.xaml.cs プロジェクト: gwupe/Gwupe
 /// <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();
 }
コード例 #6
0
 public void ActivityOccured(EngagementActivity args)
 {
     IsUnread = true;
     Interactions.CurrentOrNewInteraction.RecordActivity(args);
 }