private void HandleGeneratePassword(PasswordBox obj) { var password = RegisterController.GenerateRandomPassword(); var dialog = new YesNoDialogFormViewModel(navigator, $"Generated password is: \n\n{password}\n\nDo you accept?"); dialog.OnSubmit += confirmed => { if (!confirmed) { return; } VisiblePasswordText = obj.Password = password; }; navigator.OpenFlyoutPanel(dialog); }
private void HandleGeneratePassphrase(PasswordBox obj) { var passphrase = RegisterController.GeneratePassphrase(dicewareWordsPath); var dialog = new YesNoDialogFormViewModel(navigator, $"Generated passphrase is: \n\n{passphrase}\n\nDo you accept?"); dialog.OnSubmit += confirmed => { if (!confirmed) { return; } VisiblePasswordText = obj.Password = passphrase; skipPasswordStrengthCheck = true; HandleRegister(obj); }; navigator.OpenFlyoutPanel(dialog); }