Ejemplo n.º 1
0
 private void _parent_NewMessageArrived(object sender, Server.NewConversationMessageArrivedEventArgs e)
 {
     if (SelectedConversation != null && e.Message.ConversationId == SelectedConversation.Id)
     {
         MessageList.ClearMessages();
         MessageList.AddMessages(SelectedConversation.Messages);
     }
 }
Ejemplo n.º 2
0
        private void MemberList_ClearFilter(object sender, System.EventArgs e)
        {
            MemberList.Members.ForEach(obj => obj.Filtered = false);

            MessageList.ClearMessages();
            MessageList.AddMessages(ConversationList.SelectedConversation.Messages);

            MemberList.Members.ForEach(obj => obj.Filtering = false);
        }
Ejemplo n.º 3
0
        private void MemberList_AddFilter(object sender, System.EventArgs e)
        {
            MemberListItem memberItem = (MemberListItem)sender;

            memberItem.Filtered = true;

            if (!_filteredPersons.Any())
            {
                MemberList.Members.ForEach(obj => obj.Filtering = true);
            }

            _filteredPersons.Add(memberItem.Person);

            MessageList.ClearMessages();
            MessageList.AddMessages(ConversationList.SelectedConversation.Messages.FindAll(obj => _filteredPersons.Contains(obj.Author)));
        }
Ejemplo n.º 4
0
        private void ConversationList_SelectedConversationChanged(object sender, SelectedConversationChangedEventArgs e)
        {
            SelectedConversation = e.Conversation;

            if (MessageList == null)
            {
                return;
            }

            MessageList.ClearMessages();
            MessageList.AddMessages(SelectedConversation.Messages);

            MemberList.ClearMembers();

            foreach (PersonModel member in SelectedConversation.Members)
            {
                MemberList.AddMemberToList(member, SelectedConversation.ColorDictionary[member]);
            }

            MessageListContainer.ScrollToBottom();
            MemberList.Visibility = Visibility.Visible;

            if (_newEmailButton != null)
            {
                if (MemberList.Members.Count == 1)
                {
                    _newEmailButton.Visibility = Visibility.Collapsed;
                    _newPhoneButton.Visibility = Visibility.Collapsed;
                }
                else
                {
                    if (_parent.EmailClients != null && _parent.EmailClients.Any(obj => obj.ImapClient != null))
                    {
                        _newEmailButton.Visibility = Visibility.Visible;
                    }

                    _newPhoneButton.Visibility = Visibility.Visible;
                }
            }
        }