Пример #1
0
        private async void StartUsingWindowsHello()
        {
            ProgressRing.IsActive = true;
            LaterButton.IsEnabled = false;
            StartUsingWindowsHelloButton.IsEnabled = false;

            var register = await PlayFabWindowsHello.RegisterWindowsHello(userId);

            // Registration successful. Continue to the signed-in state.
            if (register)
            {
                Frame.Navigate(typeof(AccountOverviewPage));
            }

            ProgressRing.IsActive = false;
            LaterButton.IsEnabled = true;
            StartUsingWindowsHelloButton.IsEnabled = true;
        }
Пример #2
0
        private async void SignInWithHello()
        {
            ProgressRing.IsActive = true;

            // Don't let the user try a new operation while we are busy with this one.
            SignInWithHelloButton.IsEnabled     = false;
            SignInAsSomeoneElseButton.IsEnabled = false;

            bool result = await PlayFabWindowsHello.SignInWithHelloAsync(userId);

            ProgressRing.IsActive               = false;
            SignInWithHelloButton.IsEnabled     = true;
            SignInAsSomeoneElseButton.IsEnabled = true;

            if (result)
            {
                Frame.Navigate(typeof(AccountOverviewPage));
            }
            else
            {
                MessageDialog message = new MessageDialog("Login with Windows Hello failed.");
                await message.ShowAsync();
            }
        }