Example #1
0
        private async void Page_Loaded(object sender, RoutedEventArgs e)
        {
            DataContext = null;
            pw.IsActive = true;
            var jnc   = JNCHelper.InstantiateClient();
            var posts = await jnc.Posts.GetList();

            if (posts.Success)
            {
                DataContext = posts.Result.Select(o => new PostViewModel(o)).OrderByDescending(o => o.Date);
            }
            pw.IsActive = false;
        }
Example #2
0
        private async void Page_Loaded(object sender, RoutedEventArgs e)
        {
            if (SeriesList == null)
            {
                pw.IsActive = true;
                var jnc            = JNCHelper.InstantiateClient();
                var seriesResponse = await jnc.Series.GetListOfSeries(null, "parts");

                SeriesList  = seriesResponse.Result.OrderBy(o => o.Title).Select(o => new SeriesViewModel(o)).ToList();
                DataContext = SeriesList;
                pw.IsActive = false;
            }
        }
Example #3
0
        private async void Page_Loaded(object sender, RoutedEventArgs e)
        {
            DataContext = null;
            pw.IsActive = true;
            var jnc            = JNCHelper.InstantiateClient();
            var eventsResponse = await jnc.Events.GetListOfEvents();

            DataContext = new
            {
                latest   = eventsResponse.Result.Where(o => o.Date <= DateTime.Now).OrderByDescending(o => o.Date).Take(15).Select(o => new EventViewModel(o)),
                upcoming = eventsResponse.Result.Where(o => o.Date > DateTime.Now).OrderBy(o => o.Date).Take(10).Select(o => new EventViewModel(o))
            };
            pw.IsActive = false;
        }