Пример #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            NewUserAccountViewModel newUserAccountViewModel = (NewUserAccountViewModel)DataContext;

            if (((Button)sender).Content.Equals("Proceed"))
            {
                newUserAccountViewModel.saveUserAccount();
            }
            else if (((Button)sender).Content.Equals("Cancel"))
            {
                newUserAccountViewModel.cancelUserUpdate();
            }
        }
Пример #2
0
        private void Password_PasswordChanged(object sender, RoutedEventArgs e)
        {
            NewUserAccountViewModel newUserAccountViewModel = (NewUserAccountViewModel)DataContext;

            newUserAccountViewModel.Password = ((PasswordBox)sender).Password;
        }
Пример #3
0
        private void TextBox_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            NewUserAccountViewModel newUserAccountViewModel = (NewUserAccountViewModel)DataContext;

            ((TextBox)sender).Text = newUserAccountViewModel.browsePhoto();
        }
 public DatabaseConnection(NewUserAccountViewModel newUserAccountViewModel)
 {
     this.newUserAccountViewModel = newUserAccountViewModel;
     createConnection();
 }