コード例 #1
0
 public UserViewModel()
 {
     Login = new RelayCommand<object>(UserLogin);
     Register = new RelayCommand(UserRegistration);
     Save = new RelayCommand<object>(AddOrUpdateUser);
     Back = new RelayCommand(NavigateBack);
 }
コード例 #2
0
 public AccountViewModel(PWManager.Models.User user)
 {
     if (DesignerProperties.GetIsInDesignMode(
         new System.Windows.DependencyObject()))
         return;           
     Accounts = new ObservableCollection<Account>(_repository.GetAccountsAsync(user.Id).Result);
     SaveCommand = new RelayCommand(AddAccount);
     UpdateCommand = new RelayCommand(Update);            
 }   
コード例 #3
0
 /// <summary>
 /// 
 /// </summary>
 public MainWindowViewModel()
 {
     NavigationCommand = new RelayCommand<string>(OnNavigation);
 }