Пример #1
0
    IEnumerator CheckUserPasswordAndConfirm()
    {
        bool paswordsMatch = false;
        bool popupCanceled = true;

        ForgotPasswordDialog popup = (ForgotPasswordDialog)Owner.ShowPopup("ForgotPassword", null, null, null);

        popup.IsForPassword = true;
        popup.SetHandler((inPopup, inResult) =>
        {
            if (inResult == E_PopupResultCode.Ok)
            {
                popupCanceled = false;
                if (CloudServices.CalcPasswordHash(popup.TextFieldData) == CloudUser.instance.passwordHash)
                {
                    paswordsMatch = true;
                }
            }
            Owner.Back();
        });

        while (popup.IsVisible == true)
        {
            yield return(new WaitForEndOfFrame());
        }

        popup.IsForPassword = false;

        popup.ForceClose();

        if (popupCanceled)
        {
            yield break;
        }

        if (paswordsMatch)
        {
            StartCoroutine(UpdateProfile_Coroutine());
        }
        else
        {
            Owner.ShowPopup("MessageBox", TextDatabase.instance[0107000], TextDatabase.instance[0107023]);
        }
    }
Пример #2
0
        private void OpenForgotPassword(object sender, RoutedEventArgs e)
        {
            ContentDialog dialog = new ForgotPasswordDialog();

            dialog.ShowAsync();
        }