public DetailsViewModel(Feed feed) { ConfirmFeed = new RelayCommand(confirmFeed, canConfirm); CancelFeed = new RelayCommand(cancelFeed); GetFeed = new RelayCommand(updateFeed, canGet); SetInterval = new RelayCommand(setInterval); repository = DataConnection.getCategories(); Categories = repository.GetAll() as List<Category>; FeedItemList = new ObservableCollection<FeedItem>(); IsFetched = true; setInputValues(feed); fillFeedItemList(); }
public DetailsViewModel() { cacheFeed = new Feed() { Id = Guid.NewGuid(), Name = "", Url = "", Category = Guid.Empty, Items = new List<FeedItem>(), Description = "", Interval = new TimeSpan(0,1,0,0)}; ConfirmFeed = new RelayCommand(confirmFeed, canConfirm); CancelFeed = new RelayCommand(cancelFeed); GetFeed = new RelayCommand(getFeed, canGet); SetInterval = new RelayCommand(setInterval); repository = DataConnection.getCategories(); Categories = repository.GetAll() as List<Category>; FeedItemList = new ObservableCollection<FeedItem>(); IsFetched = false; fillFeedItemList(); }
private void setupNameEditing(Category category) { name = category.Name; doneEditing = true; Edit = new RelayCommand(startEditing, canEdit); Commit = new RelayCommand(commit, canCommit); }
private void SetupCommands() { CreateFeed = new RelayCommand(addFeed); DeleteFeed = new RelayCommand(removeFeed); }
private void SetupCommands() { Play = new RelayCommand(play, canPlay); Stop = new RelayCommand(stop, canStopPlaying); Pause = new RelayCommand(pause, canStopPlaying); }
private void setupCommands() { AddCategory = new RelayCommand(add); RemoveCategory = new RelayCommand(remove, canRemoveCategory); }