Пример #1
0
        private void addDateItem(DateTime fecha)
        {
            int panelItemsCount = FechasPanel.Controls.Count;

            PanelDateItem item = new PanelDateItem(fecha, panelItemsCount);

            item.TopLevel         = false;
            item.AutoScroll       = true;
            item.Size             = new Size(this.FechasPanel.Size.Width, 37);
            item.Location         = new Point(0, item.Size.Height * panelItemsCount + 1);
            item.onCheckedChange += this.onItemCheckChange;
            item.onDateChange    += this.onDateChange;
            FechasPanel.Controls.Add(item);
            item.Show();
            PanelItem panelItem = new PanelItem(FechasPanel.Controls.IndexOf(item), item);

            panelItem.fecha = fecha;
            items.Add(panelItem);
        }
Пример #2
0
 public PanelItem(int index, PanelDateItem item)
 {
     this.index     = index;
     this.item      = item;
     this.isChecked = true;
 }