public VaultSelectorViewModel(IApplicationController app)
            : base()
        {
            _app = app;

            // Set menu
            MenuViewModel menuViewModel = new MenuViewModel(_app);
            menuViewModel.VisibilityLaser = false;
            Menu = menuViewModel;

            ratingVM = new RatingViewModel(_app);
            RatingControl = ratingVM;

            // get all info on startup of this viewmodel
            List<location> locations = vaultModule.getLocations();
            List<vaultnumber> vaultnumbers = vaultModule.getVaultNumbers();
            locationList = new ObservableCollection<location>(locations);
            vaultNumberList = new ObservableCollection<vaultnumber>(vaultnumbers);

            gymnastList = userModule.getGymnastCollection();

            modifyVaultVM = new ModifyVaultViewModel(_app, "SELECT", gymnastList, vaultnumbers, vaultModule.getVaultKinds(), locations);
            ModifyViewModelControl = modifyVaultVM;
            this.Content = modifyVaultVM;
            modifyVaultVM.setData(null);

            dateVisibility = Visibility.Hidden;
            OnPropertyChanged("DateVisibility");

            FilterText = "";
            filterList = new ObservableCollection<string>();
        }
Exemple #2
0
 public void ShowPostMeasurementView(ObservableCollection<ThumbnailViewModel> newThumbnailCollection)
 {
     PostMeasurementViewModel postMeasurementViewModel = new PostMeasurementViewModel(this);
     ModifyVaultViewModel modifyVaultViewModel = new ModifyVaultViewModel(this,"POST");
     _setContent(postMeasurementViewModel);
     postMeasurementViewModel.Content = modifyVaultViewModel;
     modifyVaultViewModel.setMeasuredVaults(newThumbnailCollection);
 }