示例#1
0
        // Back to contacts page
        private void Back()
        {
            _userManager.ChangeUserStatus(UserState.online);

            _chatManager.UserDisconnected();
            _navigationService.GoBack();
            //_chatManager.NotifyViewModelbackNavigation
        }
示例#2
0
 //Sand request to another user to chat with him.
 private void Open(bool isChat)
 {
     if (ChosenContact != null)
     {
         if (ChosenContact.State == UserState.offline)
         {
             MessageBox.Show("User is offline.", "", MessageBoxButton.OK, MessageBoxImage.Error);
         }
         else if (ChosenContact.State == UserState.busy)
         {
             MessageBox.Show("User is not available.");
         }
         else
         {
             ClientUserManager.UserToChatWith = ChosenContact.UserName;
             _userManager.ChangeUserStatus(UserState.busy);
             _interactionManager.SendRequest(isChat);
         }
     }
     else
     {
         MessageBox.Show("you need to choose user.");
     }
 }