コード例 #1
0
        private async void Button_LoginMSA(object sender, RoutedEventArgs e)
        {
            bool success = await connectedDevicesManager.SignInMsaAsync();

            if (!success)
            {
                rootPage.NotifyUser("MSA login failed!", NotifyType.ErrorMessage);
            }
            else
            {
                rootPage.NotifyUser("MSA login successful", NotifyType.StatusMessage);
            }
        }
コード例 #2
0
        private async void Button_LoginMSA(object sender, RoutedEventArgs e)
        {
            if (m_state == LoginState.LOGGED_OUT)
            {
                UpdateView(LoginState.LOGIN_PROGRESS);
                bool success = await m_connectedDevicesManager.SignInMsaAsync();

                if (!success)
                {
                    m_rootPage.NotifyUser("MSA login failed!", NotifyType.ErrorMessage);
                    UpdateView(LoginState.LOGGED_OUT);
                }
                else
                {
                    m_rootPage.NotifyUser("MSA login successful", NotifyType.StatusMessage);
                    UpdateView(LoginState.LOGGED_IN_MSA);
                }
            }
            else
            {
                LogoutCurrentAccount();
            }
        }