Beispiel #1
0
        private void OnLoginSessionPropertyChanged(object sender, PropertyChangedEventArgs propertyChangedEventArgs)
        {
            if (propertyChangedEventArgs.PropertyName != "State")
            {
                return;
            }

            var loginSession = (ILoginSession)sender;

            LoginState = loginSession.State;
            VivoxLog("Detecting login session change");
            switch (LoginState)
            {
            case LoginState.LoggingIn:
            {
                VivoxLog("Logging in");
                break;
            }

            case LoginState.LoggedIn:
            {
                VivoxLog("Connected to voice server and logged in.");
                OnUserLoggedInEvent?.Invoke();
                break;
            }

            case LoginState.LoggingOut:
            {
                VivoxLog("Logging out");
                break;
            }

            case LoginState.LoggedOut:
            {
                VivoxLog("Logged out");
                LoginSession.PropertyChanged -= OnLoginSessionPropertyChanged;
                break;
            }

            default:
                break;
            }
        }
Beispiel #2
0
 /// <summary>
 /// Notify when user logged in
 /// </summary>
 /// <param name="user"></param>
 public virtual void NotifyOnUserLoggedInEvent(IUserPeerExtension user)
 {
     OnUserLoggedInEvent?.Invoke(user);
 }