Пример #1
0
        public DiscoverPage()
        {
            InitializeComponent();

            PersistentDownloadService.AddBadgeCallback(UpdateBadgeNumber);
            BadgedIcon.AddButtonEventHandler(DownloadPage_Clicked);
        }
Пример #2
0
        public BrowsePage()
        {
            InitializeComponent();

            PersistentDownloadService.AddBadgeCallback(UpdateBadgeNumber);
            UpdateBadgeNumber(PersistentDownloadService.DownloadQueue.Count);
            BadgedIcon.AddButtonEventHandler(DownloadPage_Clicked);
        }
Пример #3
0
        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();
        }
Пример #4
0
        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);
        }