public void Profile_Click(object sender, RoutedEventArgs e)
        {
            var next = new ProfileWindow();

            next.Show();
            this.Close();
        }
Example #2
0
 private void ProfileButton_Click(object sender, RoutedEventArgs e)
 {
     if (State.User != null)
     {
         var next_window = new ProfileWindow();
         next_window.Show();
         this.Close();
     }
 }
        public void ChangePassword_Click(object sender, RoutedEventArgs e)
        {
            var oldPassword = OldPasswordField.Text;

            if (oldPassword == State.User.Password)
            {
                if (NewPasswordField.Text == ConfirmNewPasswordField.Text)
                {
                    State.User.Password = NewPasswordField.Text;

                    var new_window = new ProfileWindow();
                    new_window.Show();
                    this.Close();
                    API.SaveChanges();
                }
            }
            else
            {
                var new_window = new PasswordMissmatchWindow();
                new_window.Show();
                this.Close();
            }
        }