Ejemplo n.º 1
0
        public void LoadConversations(User user)
        {
            Cursor = Cursors.WaitCursor;

            List<Conversation> conversations = _manager.GetConversation(user).OrderBy(x => x.Title).ToList();

            _lstConversations.DataSource = null;
            _lstConversations.DataSource = conversations;
            _lstConversations.DisplayMember = "Title";
            _lstConversations.ValueMember = "Id";

            _lstConversations.SetSelected(0, true);

            Cursor = Cursors.Default;
        }
Ejemplo n.º 2
0
        public List<Conversation> GetConversation(User user)
        {
            List<Conversation> conversations = new List<Conversation>();

            foreach (var item in _messengers.Values)
            {
                if (user.Messenger == item.MessengerType)
                {
                    var c = item.GetConversation(user.Username);
                    conversations.AddRange(c);
                }
            }

            return conversations;
        }
Ejemplo n.º 3
0
 private void UcUserList1_SelectedUserChanged(User user)
 {
     ucConversationList1.LoadConversations(user);
 }