public BookViewModel(string id) { LoadFullData(id); AuthorClickCommand = new RelayCommand<RoutedEventArgs>(AuthorClick); WantToReadCommand = new RelayCommand(WantToReadClick); BookClickCommand = new RelayCommand(BookClick); }
public UpdateViewModel(Update update) { this.update = update; if (TargetIsBook) { if (update.Type == "review" && update.Object != null && update.Object.Book != null) book = new BookViewModel(update.Object.Book); if (update.Type == "readstatus" && update.Object != null && update.Object.Read_status != null && update.Object.Read_status.Review != null && update.Object.Read_status.Review.Book != null) book = new BookViewModel(update.Object.Read_status.Review.Book); NotifyPropertyChanged("Book"); } UserClickCommand = new RelayCommand(UserClick); WriteCommentCommand = new RelayCommand(WriteCommentClick); PostCommentCommand = new RelayCommand(PostCommentClick); ToggleDetailsCommand = new RelayCommand(ToggleDetailsClick); LikeCommand = new RelayCommand(LikeClick); //WantToReadCommand = new RelayCommand(WantToReadClick); AddToShelfCommand = new RelayCommand<object>(AddToShelfClick); }
public BookViewModel(Book book) { this.book = book; AuthorClickCommand = new RelayCommand<RoutedEventArgs>(AuthorClick); WantToReadCommand = new RelayCommand(WantToReadClick); BookClickCommand = new RelayCommand(BookClick); }
public SearchViewModel() { Results.CollectionChanged += Works_CollectionChanged; BookClickCommand = new RelayCommand<ItemClickEventArgs>(UserClick); }
public AuthorViewModel(string id) { LoadFullData(id); BookClickCommand = new RelayCommand<ItemClickEventArgs>(UserClick); }
public AuthorViewModel(Author author) { this.author = author; BookClickCommand = new RelayCommand<ItemClickEventArgs>(UserClick); }
private MainViewModel() { PopulateData(); BookClickCommand = new RelayCommand<ItemClickEventArgs>(UserClick); MyProfileClickCommand = new RelayCommand<TappedRoutedEventArgs>(MyProfileTapped); }