public void restartUserCommmand()
        {
            var userViewController = new UserViewController(socket, user, this);

            //var userViewController = App.Container.Resolve<UserViewController>(new NamedParameter("socket", socket), new NamedParameter("user", user), new NamedParameter("this", this));

            fleetManagementViewModel.ActiveViewModel = userViewController.Initialize();

            fleetManagementViewModel.NewCommand    = new RelayCommand(userViewController.ExecuteNewUserCommand);
            fleetManagementViewModel.SaveCommand   = new RelayCommand(userViewController.ExecuteSaveUserCommand);
            fleetManagementViewModel.DeleteCommand = new RelayCommand(userViewController.ExecuteDeleteUserCommand, userViewController.CanExecuteDeleteCommand);
        }
Example #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();
        }