Esempio n. 1
0
        /// <summary>
        /// Retrieves the meals for the week and set GUI elements.
        /// </summary>
        private void GetMealPlan()
        {
            try
            {
                menu = lunchPlanHandler.GetMealsForWeek(CalendarHandler.GetWeekNumber());

                foreach (var item in menu)
                {
                    //Checks against application autogenerated values
                    switch (item.Weekday.ToLower())
                    {
                    case "monday":
                        TBlockMondayMeal.Text = item.Meal;
                        break;

                    case "tuesday":
                        TBlockTuesdayMeal.Text = item.Meal;
                        break;

                    case "wednesday":
                        TBlockWednesdayMeal.Text = item.Meal;
                        break;

                    case "thursday":
                        TBlockThursdayMeal.Text = item.Meal;
                        break;

                    case "friday":
                        TBlockFridayMeal.Text = item.Meal;
                        break;

                    default:
                        break;
                    }
                }
            }
            catch (Exception error)
            {
                DataValidation.SaveError(error.ToString());
            }
        }
Esempio n. 2
0
 public MainPage()
 {
     this.InitializeComponent();
     lunchPlanHandler = new LunchPlanHandler();
     mealHandler      = new MealHandler();
     dbHandler        = new DBHandler();
     messageHandler   = new MessageHandler();
     imageHandler     = new ImageHandler();
     rSSFeedHandler   = new RSSFeedHandler("http://feeds.tv2.dk/nyhederne_seneste/rss");
     iPHandler        = new IPHandler();
     clockHandler     = new ClockHandler();
     Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().Title = CalendarHandler.GetStringDate("dd/MM/yyyy") + " - Uge : " + CalendarHandler.GetWeekNumber();
     UpdateIp();
     counter = 0;
     SetDpTimer();
 }