Esempio n. 1
0
 public override ViewModelBase Initialize()
 {
     userViewModel = new UserViewModel()
     {
         Users      = new ObservableCollection <User>(socket.getAllUsers()),
         entryUsers = socket.getAllUsers().ToList()
     };
     return(userViewModel);
 }
Esempio n. 2
0
        private void ExecuteOpenUserCommand(object obj)
        {
            var userViewController = new UserViewController();

            fleetManagementViewModel.NewCommand    = new RelayCommand(ExecuteNewUserCommand);
            fleetManagementViewModel.SaveCommand   = new RelayCommand(ExecuteSaveUserCommand);
            fleetManagementViewModel.DeleteCommand = new RelayCommand(ExecuteDeleteUserCommand);

            fleetManagementViewModel.ActiveViewModel = userViewController.Initialize();
            (fleetManagementViewModel.ActiveViewModel as UserViewModel).Users = new ObservableCollection <User>(socket.getAllUsers());

            //Persist Entry State Users
            (fleetManagementViewModel.ActiveViewModel as UserViewModel).entryUsers = (fleetManagementViewModel.ActiveViewModel as UserViewModel).Users.ToList();
        }