Esempio n. 1
0
        private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
        {
            await StatusBar.GetForCurrentView().HideAsync();
            StatusBar.GetForCurrentView().ForegroundColor = Colors.White;
            TileUpdateManager.CreateTileUpdaterForApplication().Clear();
            BadgeUpdateManager.CreateBadgeUpdaterForApplication().Clear();

            if (newsLinks == null || DateTime.Now.Subtract(TimeLoaded).TotalMinutes > 5)
            {
                await LoadData();
            }

            if (e.NavigationParameter != null && e.NavigationParameter.ToString() != "")
            {
                try
                {
                    Frame.Navigate(typeof(NewsItemPage), (e.NavigationParameter));
                    return;
                }
                catch
                {

                }
            }
        }
Esempio n. 2
0
        private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
        {
            try
            {
                LoadingControl.SetLoadingStatus(true);

                if (e.NavigationParameter != null)
                {
                    CurrentURL = (string)e.NavigationParameter;
                    NewsItem newsItem = await DataHandler.GetNewsPageFromURL(e.NavigationParameter.ToString());
                    this.DataContext = newsItem;
                }
            }
            catch
            {
                LoadingControl.DisplayLoadingError(true);
            }
            finally
            {
                LoadingControl.SetLoadingStatus(false);
            }

            await ArticleCounter.AddArticleCount("Wij bieden HVZeeland kostenloos aan en we zouden het op prijs stellen als u de HVZeeland app een positieve review geeft in de Windows store.", "Bedankt");
            Task t = Task.Run(() => ClientIDHandler.instance.PostAppStats(ClientIDHandler.AppName.HVZeeland));
        }
Esempio n. 3
0
        private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
        {
            TileUpdateManager.CreateTileUpdaterForApplication().Clear();
            BadgeUpdateManager.CreateBadgeUpdaterForApplication().Clear();

            if (newsLinks == null || DateTime.Now.Subtract(TimeLoaded).TotalMinutes > 5)
            {
                await LoadData();
            }

            if (e.NavigationParameter != null && e.NavigationParameter.ToString() != "")
            {
                try
                {
                    await this.OpenNewsItem(e.NavigationParameter.ToString());

                    return;
                }
                catch
                {

                }
            }
        }
Esempio n. 4
0
 /// <summary>
 /// Populates the page with content passed during navigation.  Any saved state is also
 /// provided when recreating a page from a prior session.
 /// </summary>
 /// <param name="sender">
 /// The source of the event; typically <see cref="NavigationHelper"/>
 /// </param>
 /// <param name="e">Event data that provides both the navigation parameter passed to
 /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested and
 /// a dictionary of state preserved by this page during an earlier
 /// session.  The state will be null the first time a page is visited.</param>
 private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e)
 {
 }