public void SetPreviewItem(CalendarItem item)
 {
     emptyButton.Item = item;
     bool exist = false;
     foreach(Widget wid in this.Children)
     {
         if (wid == emptyButton)
             exist = true;
     }
     if (!exist)
         this.Add(emptyButton);
 }
        public void SetPreviewItem(CalendarItem item)
        {
            emptyButton.Item = item;
            bool exist = false;

            foreach (Widget wid in this.Children)
            {
                if (wid == emptyButton)
                {
                    exist = true;
                }
            }
            if (!exist)
            {
                this.Add(emptyButton);
            }
        }
 public void AddItem(int day, int hour, CalendarItem item)
 {
     if (TimeMap[day, hour] == null)
         TimeMap[day, hour] = new List<CalendarItem>();
     TimeMap[day, hour].Add(item);
 }