Esempio n. 1
0
        //ctor
        public ContactsViewModel(IFrameNavigationService navigationService)
        {
            _navigationService  = navigationService;
            _userManager        = new ClientUserManager();
            _interactionManager = new ClientInteractionManager();

            ContactList = ConvertUserForUserView.ConvertUser(_userManager.GetContactList());

            _userManager.RegisterNotifyEvent(ContactUptaded);
            _interactionManager.RegisterInvitationResponseEvent(HandleUserResponse);
            _interactionManager.RegisterChatRequestEvent(AgreeChatRequest);

            LogoutCommand   = new RelayCommand(Logout);
            OpenChatCommand = new RelayCommand(OpenChat);
            OpenGameCommand = new RelayCommand(OpenGame);
            UserTitle       = $"Welcome {ClientUserManager.CurrentUser}";
        }
Esempio n. 2
0
 // update contacts list.
 private void ContactUptaded(Dictionary <string, UserState> dictionary)
 {
     ContactList = ConvertUserForUserView.ConvertUser(dictionary);
 }