private void ShowAuthenticationCode(object sender, RoutedEventArgs e) { var model = new Login2FaViewModel(TwoFactorType.AuthenticatorApp); var view = new Login2FaView(); var window = new DialogWindow(model, view); Gui.ShowDialog(window, Handle); }
public bool ShowAuthenticationCodePrompt(bool isSms, out string authenticationCode) { var viewModel = new Login2FaViewModel(isSms ? TwoFactorType.Sms : TwoFactorType.AuthenticatorApp); bool valid = _gui.ShowDialogWindow(viewModel, () => new Login2FaView()); authenticationCode = valid ? viewModel.AuthenticationCode : null; return(valid); }