public void addLunchtable(Lunchtable lunchtable)
        {
            this.RunOnUiThread(() => horiPager.RemoveAllViews());
            if (lunchtable.NoMenuesFound || lunchtable.LunchDays.Count < 1)
            {
                View dishDay = this.LayoutInflater.Inflate(Resource.Layout.DishDay, null);

                var dayTitle = dishDay.FindViewById<TextView>(Resource.Id.day_text);
                dayTitle.Text = "Keine Menüeinträge!";
                this.RunOnUiThread(() => horiPager.AddView(dishDay));
                return;
            }
            int day_value = (int)System.DateTime.Today.DayOfWeek-1;
            if (day_value > 5 || day_value < 0) day_value = 0;
            foreach (LunchDay day in lunchtable.LunchDays)
            {
                this.RunOnUiThread(() => horiPager.AddView(new LunchDayView(day).GetView(this, day_value)));
            }
            this.RunOnUiThread(() => horiPager.SetCurrentScreen(day_value, false));
            System.Console.WriteLine(lunchtable.LastUpdated);
        }
 public void lunchtableCallback(Lunchtable lunchtable)
 {
     addLunchtable(lunchtable);
     ApplicationSettings.Instance.Persistency.Save(lunchtable);
 }
 private void LunchtableCallback(Lunchtable lunchtable)
 {
     if (!lunchtable.Equals(_loadedTimetable))
     {
         ApplicationSettings.Instance.Persistency.Save(lunchtable);
         LoadLunchtable(lunchtable);
         _lastUpdate = DateTime.Now;
     }
 }
 private void LoadLunchtable(Lunchtable lunchtable)
 {
     UIApplication.SharedApplication.InvokeOnMainThread(() =>
     {
         _pageScrollController.Clear();
         if (lunchtable.HasError)
         {
             _pageScrollController.AddPage(new DefaultDialogViewController(new RootElement("Error"){
                 new Section("Error"){
                     new MultilineElement(lunchtable.ErrorMessage)
                 }
             }));
         }
         else
         {
             foreach (LunchDay lunchDay in lunchtable.LunchDays)
             {
                 _pageScrollController.AddPage(CreateView(lunchDay));
             }
             try
             {
                 _pageScrollController.ScrollToPage((int)DateTime.Now.DayOfWeek - 1);
             } catch (Exception)
             {
             }
         }
     });
     _loadedTimetable = lunchtable;
 }