Exemple #1
0
        public MainViewModel(StorageSerializer storageSerializer)
        {
            var storage           = storageSerializer.Load();
            var seriesCollection  = storage.SeriesCollection ?? new ObservableCollection <Series>();
            var counter           = new Counter(storage.Id ?? 0);
            var updateViewCommand = new UpdateViewCommand(this, storageSerializer, counter, seriesCollection);
            var content           = new EntryListViewModel(seriesCollection);

            CurrentViewModel = new ShowEntryListViewModel(content, updateViewCommand);
        }
 public ShowEntryListViewModel(EntryListViewModel content, ICommand updateViewCommand)
 {
     Content           = content;
     UpdateViewCommand = updateViewCommand;
 }