Example #1
0
        private DialogViewController CreateView(LunchDay lunchDay)
        {
            if (lunchDay == null)
            {
                return(new DefaultDialogViewController(new RootElement("")
                {
                    new Section("Kein Eintrag")
                    {
                        new MultilineElement("Kein MenĂ¼ gefunden")
                    }
                }));
            }
            var root = new RootElement(lunchDay.DateString);

            foreach (Dish d in lunchDay.Dishes)
            {
                var section = new Section(d.Title)
                {
                    new CustomFontMultilineElement(d.Description, 15, CustomFontMultilineElement.FontStyle.Normal),
                    new CustomFontMultilineElement("", "CHF " + d.PriceInternal, 14, CustomFontMultilineElement.FontStyle.Bold, CustomFontMultilineElement.FontStyle.Bold)
                };
                root.Add(section);
            }

            return(new DefaultDialogViewController(root));
        }
Example #2
0
 public LunchDayView(LunchDay day)
 {
     this.lunchDay = day;
 }