public DiscoverPage() { InitializeComponent(); PersistentDownloadService.AddBadgeCallback(UpdateBadgeNumber); BadgedIcon.AddButtonEventHandler(DownloadPage_Clicked); }
public BrowsePage() { InitializeComponent(); PersistentDownloadService.AddBadgeCallback(UpdateBadgeNumber); UpdateBadgeNumber(PersistentDownloadService.DownloadQueue.Count); BadgedIcon.AddButtonEventHandler(DownloadPage_Clicked); }
public App() { InitializeComponent(); // Register dependency injection stuff DependencyService.Register <IStorageAccessor, StorageAccessor>(); DependencyService.Register <IWikipediaAccessor, WikipediaAccessor>(); DependencyService.Register <IHTMLService, HTMLService>(); DependencyService.Register <ILocalArticlesService, LocalArticleService>(); DependencyService.Register <IWikipediaService, WikipediaService>(); PersistentDownloadService.Start(); MainPage = new AppShell(); }
public DownloadsPage() { InitializeComponent(); GoBackCommand = new Command(GoBack); backButton.Command = GoBackCommand; DownloadList.ItemsSource = DownloadListItems; DownloadsStatusUpdate update = PersistentDownloadService.GetStatus(); if (update.TotalNumArticlesToDownload == 0) { StatusText.Text = "There are currently no articles queued for download."; DownloadProgress.Progress = 0.0; } UpdateDownloadStatus(update); PersistentDownloadService.AddStatusCallBack(UpdateDownloadStatus); }