public ForgotPasswordPageView() { BindingContext = new ForgotPasswordPageViewModel(new PlatformServices()); NavigationPage.SetHasNavigationBar(this, false); BackgroundColor = Color.FromHex(Theme.Current.AppBackgroundColor); createView(); }
public ForgotPasswordPage() { InitializeComponent(); NavigationPage.SetHasNavigationBar(this, false); forgotPasswordVM = new ForgotPasswordPageViewModel(Navigation); BindingContext = forgotPasswordVM; }
public ForgotPasswordPage() { InitializeComponent(); NavigationPage.SetHasNavigationBar(this, false); BindingContext = vM = new ForgotPasswordPageViewModel(); WrapperGrid.TranslateTo(600, 0, 0); vM.SetUI(this); passEntry.Name = "Pass"; userEntry.Name = "User"; validationEntry.Name = "Validation"; rePassEntry.Name = "RePass"; thirdStack.TranslateTo(700, 0, 500, Easing.SinIn); thirdStack.IsVisible = false; secondStack.TranslateTo(700, 0, 500, Easing.SinIn); secondStack.IsVisible = false; }
public void CheckCredentials_NoEmptyFields_True(string username, string newPassword, string confirmPassword, string answerToSecretQuestion, string questionId) { try { var mockedServices = Mock.Of <IPlatformServices>(); var forgotPassword = new ForgotPasswordPageViewModel(mockedServices); forgotPassword.UserName = username; forgotPassword.NewPassword = newPassword; forgotPassword.ConfirmPassword = confirmPassword; forgotPassword.AnswerToSecretQuestion = answerToSecretQuestion; forgotPassword.QuestionId = questionId; var actual = forgotPassword.checkCredentials(); Assert.IsTrue(actual); } catch (Exception ex) { Assert.Fail(ex.Message); } }
public ForgotPasswordPage() { InitializeComponent(); BindingContext = new ForgotPasswordPageViewModel(); SettingsIos = new ToolbarItem(); if (Device.OS == TargetPlatform.Android) { ToolbarItems.Add(new ToolbarItem("hamburger", "Resources/drawable/settings.png", async() => { await Navigation.PushAsync(new HamburgerMenu()); })); } else if (Device.OS == TargetPlatform.iOS) { SettingsIos.Text = "+"; SettingsIos.Command = new Command(() => { NavigateToSettings(); }); ToolbarItems.Add(SettingsIos); } else { Debug.WriteLine("There is no device found"); } }