Example #1
0
 /// <summary>
 /// </summary>
 public CurrentlyPage(ApixuForecast forecast)
 {
     Weather     = forecast.Current;
     LastUpdated = forecast.Location.LocalTime;
     Items.Add(forecast.Current.GenerateTable());
     Items.Add(forecast.Forecast.Days[0].Astro.GenerateTable());
     Items.Add(forecast.Forecast.Days[0].Day.GenerateTable());
     Items.Add(forecast.Location.GenerateTable());
     InitializeComponent();
     BindingContext = this;
 }
Example #2
0
        /// <summary>
        /// </summary>
        /// <param name="apixuForecast"></param>
        private void InitializeView(ApixuForecast apixuForecast)
        {
            Title = apixuForecast.Location.Formatted;

            var days = apixuForecast.Forecast.Days;

            if (days.Count > 0)
            {
                Children.Add(new CurrentlyPage(apixuForecast));
                Children.Add(new TodayPage(days[0]));

                if (days.Count > 1)
                {
                    Children.Add(new ForecastPage(apixuForecast.Forecast));
                }
            }

            Children.Add(new HistoryPage(_place.Adapter));
        }