Пример #1
0
 public void RemoveItems(SideItem item)
 {
     App.Current.Dispatcher.BeginInvoke((Action) delegate()
     {
         SideItems.Remove(item);
         ChatVMFactory.DeleteViewModel(item.RoomName);
     });
 }
Пример #2
0
        public SideItem(ObservableCollection <User> users, string serverName, string initial)
        {
            //Test2Command = new RelayParameterCommand(async (parameter) => await go2(parameter));
            Test2Command = new RelayCommand(async() => await GoToChatPage());
            ChatList     = new ObservableCollection <ChatItem>();
            UserList     = users;
            RoomName     = serverName;
            Initial      = initial;

            ChatVMFactory.PushViewModel(RoomName, new ChatPageVM(RoomName, ChatList, UserList, this));
            pageVM = ChatVMFactory.GetViewModel(RoomName);
        }