Пример #1
0
        /// <summary>
        /// Handle the conversation being deleted from the client.
        /// </summary>
        private void OnConversationDeleted(object sender, InboxEventArgs args)
        {
            Platform.UIThread(this, delegate
            {
                InboxConversation conversation = args.Conversation;
                int selectedRow = SelectedRow;
                bool deletingCurrent = (selectedRow != -1) && (conversation == _conversations[selectedRow]);

                _conversations.Remove(conversation);

                InitialiseList();
                RefreshList();

                if (deletingCurrent)
                {
                    if (selectedRow == _conversations.Count)
                    {
                        --selectedRow;
                    }
                    if (selectedRow < 0)
                    {
                        ShowEmptyMessage();
                    }
                    else
                    {
                        SelectedRow = selectedRow;
                    }
                }
            });
        }
Пример #2
0
 /// <summary>
 /// Inbox has updated, so redraw the node and the count on the node, and also
 /// let the main form update the count on the shortcut bar.
 /// </summary>
 private void OnConversationChanged(object sender, InboxEventArgs args)
 {
     Platform.UIThread(this, delegate
     {
         frmList.InvalidateNode(_messagesTree.Nodes[0]);
         MainForm.UpdateTotalUnreadCount();
     });
 }
Пример #3
0
 /// <summary>
 /// Handle a change to a conversation.
 /// </summary>
 private void OnConversationChanged(object sender, InboxEventArgs args)
 {
     Platform.UIThread(this, delegate
     {
         InboxConversation selectedMessage = SelectedMessage;
         RefreshList();
         RestoreSelection(selectedMessage);
     });
 }