Esempio n. 1
0
 private void OnResetList(object parameter)
 {
     // reseting filters
     SearchText     = "";
     MinEpisodeText = "";
     MaxEpisodeText = "";
     //_episodes = new ObservableCollection<Episode>(SessionData.GetEpisodeList());
     Episodes = new ObservableCollection <Episode>(_episodeBusiness.AllEpisodes());
 }
Esempio n. 2
0
        public JessViewModel()
        {
            _episodeBusiness = new EpisodeBusiness();
            Episodes         = new ObservableCollection <Episode>(_episodeBusiness.AllEpisodes());

            //
            //start at first in list
            //
            _selectedEpisode = _episodes[0];
            UpdateDetailedViewEpisodeToSelected();

            //Episodes = new ObservableCollection<Episode>(SessionData.GetEpisodeList());
            if (Episodes.Any())
            {
                SelectedEpisode = Episodes[0];
            }

            AddEpisodeCommand           = new RelayCommand(new Action <object>(OnAddEpisode));
            EditEpisodeCommand          = new RelayCommand(new Action <object>(OnEditEpisode));
            RadioCommandSortEpisodeList = new RelayCommand(new Action <object>(SortEpisodeList));
            ButtonSearchCommand         = new RelayCommand(new Action <object>(Search));
            QuitApplicationCommand      = new RelayCommand(new Action <object>(OnQuitApplication));
            DeleteEpisodeCommand        = new RelayCommand(new Action <object>(OnDeleteEpisode));
            EpisodeFilterListCommand    = new RelayCommand(new Action <object>(OnEpisodeFilterEpisodeList));
            ResetEpisodeListCommand     = new RelayCommand(new Action <object>(OnResetList));
            SaveEpisodeCommand          = new RelayCommand(new Action <object>(OnSaveEpisode));
            CancelEpisodeCommand        = new RelayCommand(new Action <object>(OnCancelEpisode));
            AddCharCommand    = new RelayCommand(new Action <object>(OnAddChar));
            DeleteCharCommand = new RelayCommand(new Action <object>(OnDeleteChar));
        }
Esempio n. 3
0
        public MichelleViewModel()
        {
            // this.Episodes = new ObservableCollection<Episode>(SessionData.GetEpisodeList());
            EpisodeBusiness episodeBusiness = new EpisodeBusiness();

            this.Episodes = new ObservableCollection <Episode>(episodeBusiness.AllEpisodes());

            this.ButtonAddCommand       = new RelayCommand(this.AddEpisode);
            this.ButtonEditCommand      = new RelayCommand(this.EditEpisode);
            this.ButtonDeleteCommand    = new RelayCommand(this.DeleteEpisode);
            this.SelectedFilterCommand  = new RelayCommand(this.SetFilter);
            this.RadioCommandSortAsc    = new RelayCommand(this.SortAsc);
            this.RadioCommandSortDesc   = new RelayCommand(this.SortDesc);
            this.RadioCommandSearchCrit = new RelayCommand(this.SetSearchCriteria);
            this.ButtonSearchCommand    = new RelayCommand(this.Search);
        }
Esempio n. 4
0
        public PhilViewModel()
        {
            _episodeBusiness = new EpisodeBusiness();
            Episodes         = new ObservableCollection <Episode>(_episodeBusiness.AllEpisodes());
            Episodes         = new ObservableCollection <Episode>(SessionData.GetEpisodeList());
            if (Episodes.Any())
            {
                SelectedEpisode = Episodes[0];
            }

            ButtonAddCommand       = new RelayCommand(new Action <object>(AddEpisode));
            ButtonEditCommand      = new RelayCommand(new Action <object>(EditEpisode));
            RadioCommandSortAsc    = new RelayCommand(new Action <object>(SortAsc));
            RadioCommandSortDesc   = new RelayCommand(new Action <object>(SortDesc));
            RadioCommandSearchCrit = new RelayCommand(new Action <object>(SetSearchCriteria));
            ButtonSearchCommand    = new RelayCommand(new Action <object>(Search));
            ButtonQuitCommmand     = new RelayCommand(new Action <object>(QuitApp));
            ButtonDeleteCommand    = new RelayCommand(new Action <object>(DeleteEpisode));
        }