Example #1
0
        public void updateChatList(AddressBook.Item item)
        {
            var chatRoomViewModel = new ChatRoomViewModel();

            chatRoomViewModel.addressInfo = item;
            chatRoomViewModel.id          = item.UserName;
            chatRoomViewModels.Add(chatRoomViewModel);
        }
Example #2
0
 public ChatViewModel()
 {
     chatRoomViewModels = new ObservableCollection <ChatRoomViewModel>();
     foreach (var item in App.addressBook.items)
     {
         var chatRoomViewModel = new ChatRoomViewModel();
         chatRoomViewModel.addressInfo = item;
         chatRoomViewModel.id          = item.UserName;
         //chatRoomViewModel.msgList = new List<Message>();
         chatRoomViewModels.Add(chatRoomViewModel);
     }
 }