public TitlePage() { InitializeComponent(); ComicRepository cr = new ComicRepository(); List <ComicTitle> subscriptions; _comicParser = new ComicParserService(); hideComicsButton.IsVisible = false; comicsTitles.IsVisible = false; // get user subscriptions subscriptions = cr.GetSubscriptionList(); if (subscriptions == null) { subscriptions = new List <ComicTitle>(); } comicTitles = _comicParser.GetComicTitles(); if (comicTitles == null) { comicTitles = new List <ComicTitle>(); } // get subscribed comics subscribedComicTitles = new ObservableCollection <ComicTitle>(subscriptions); UpdateDataBinding(); }
public ComicPage(ComicTitle comicTitle, bool random) { InitializeComponent(); const int COMIC_COUNT = 5; // holds the number of comics that will be received. wow = new Comic(); _comicParserService = new ComicParserService(); comics = _comicParserService.GetComics(comicTitle.Url, COMIC_COUNT, random); currentComicIndex = 0; comicTitleLabel.Text = comicTitle.Name; next.IsEnabled = false; dateTimeAndBackgroundImage(); }