private void EditPasswordPopup(object o, EventArgs e) { ChangePasswordPopup newPopup = new ChangePasswordPopup(); newPopup.BindingContext = this.vm; PopupNavigation.Instance.PushAsync(newPopup); }
private async void OnCloseChangePassword(object sender, EventArgs e) { await ChangePasswordPopup.Hide(); entryPassword.Text = null; entryNewPassword.Text = null; entryConfirm.Text = null; }
protected void ChangePasswordOKButton_Click(object sender, EventArgs e) { if (Page.IsValid && EnforcePasswordPolicy()) { string password = NewPassword.Text.Trim(); _User.SetPassword(password, ForceExpiration.Checked); ChangePasswordPopup.Hide(); } else { ChangePasswordPopup.Show(); } }
public ProfilePage(User user) { InitializeComponent(); _user = user; BindingContext = viewModel = new ProfilePageViewModel(_user); ChangePhonePopup.Body.BindingContext = viewModel; Init(); ChangePasswordPopup.BackgroundColor = Color.FromRgba(0, 0, 0, 0.3); ChangeEmailPopup.BackgroundColor = Color.FromRgba(0, 0, 0, 0.3); ChangePhonePopup.BackgroundColor = Color.FromRgba(0, 0, 0, 0.3); OtpPopup.BackgroundColor = Color.FromRgba(0, 0, 0, 0.3); MessagingCenter.Subscribe <ProfilePageViewModel, bool>(this, "OtpPopup", async(sender, arg) => { OtpPopup.IsVisible = arg; entryOTP1.Focus(); progressBar.Progress = 1; spReset.TextColor = Color.Gray; Device.StartTimer(TimeSpan.FromMilliseconds(updateRate), () => { if (progressBar.Progress > 0) { Device.BeginInvokeOnMainThread(() => progressBar.Progress -= step); return(true); } lblResetOtp.IsEnabled = true; spReset.TextColor = Color.FromHex("0089D1"); return(false); }); }); MessagingCenter.Subscribe <ProfilePageViewModel, User>(this, "UpdateProfile", async(sender, arg) => { viewModel.User = arg; image.Source = arg.AvatarFullUrl; }); MessagingCenter.Subscribe <ProfilePageViewModel, bool>(this, "ClosePopup", async(sender, arg) => { ChangePasswordPopup.IsVisible = ChangePhonePopup.IsVisible = ChangeEmailPopup.IsVisible = arg; }); ChangePasswordPopup.CustomCloseButton(OnCloseChangePassword); ChangeEmailPopup.CustomCloseButton(OnCloseChangeEmail); ChangePhonePopup.CustomCloseButton(OnCloseChangePhone); }
protected void ChangePasswordCancelButton_Click(object sender, EventArgs e) { NewPassword.Text = string.Empty; ConfirmNewPassword.Text = string.Empty; ChangePasswordPopup.Hide(); }
//edit password private async void OnEditPasswordClicked(object sender, EventArgs e) { await ChangePasswordPopup.Show(); }