Пример #1
0
        protected override PopupItem CreatePopupItem()
        {
            ButtonItem button = new ButtonItem("sysPopupProvider");
            button.PopupClose += new EventHandler(DropDownPopupClose);

            ItemContainer container = new ItemContainer();
            container.LayoutOrientation = eOrientation.Horizontal;
            container.BackgroundStyle.Padding = 4;

            MonthCalendarItem mc = new MonthCalendarItem();
            mc.CalendarDimensions = new Size(1, 1);
            //mc.DayClickAutoClosePopup = false;
            //mc.BackgroundStyle.BackColor = SystemColors.Window;
            mc.DateChanged += new EventHandler(PopupSelectedDateChanged);
            container.SubItems.Add(mc);
            button.SubItems.Add(container);

            LabelItem sep = new LabelItem();
            sep.Width = 8;
            sep.AutoCollapseOnClick = false;
            sep.Visible = false;
            container.SubItems.Add(sep);
            TimeSelectorItem timeSelector = new TimeSelectorItem();
            timeSelector.SelectorType = eTimeSelectorType.MonthCalendarStyle;
            timeSelector.SelectedTimeChanged += new EventHandler(TimeSelectorChanged);
            timeSelector.TimeFormat = _TimeSelectorTimeFormat;
            timeSelector.Visible = false;
            container.SubItems.Add(timeSelector);

            _PopupItem = button;
            _MonthCalendar = mc;
            _TimeSelector = timeSelector;
            _Spacer = sep;
            UpdateTimeSelectorItemSize();
            return button;
        }
Пример #2
0
 /// <summary>
 /// Copies the CalendarMonth specific properties to new instance of the item.
 /// </summary>
 /// <param name="c">New ButtonItem instance.</param>
 internal void InternalCopyToItem(MonthCalendarItem copy)
 {
     CopyToItem(copy);
 }
Пример #3
0
        /// <summary>
        /// Initializes a new instance of the MonthCalendarAdv class.
        /// </summary>
        public MonthCalendarAdv()
        {
            _MonthCalendar = new MonthCalendarItem();
            _MonthCalendar.GlobalItem = false;
            _MonthCalendar.ContainerControl = this;
            _MonthCalendar.Stretch = false;
            _MonthCalendar.Displayed = true;
            _MonthCalendar.Style = eDotNetBarStyle.StyleManagerControlled;
            this.ColorScheme.Style = eDotNetBarStyle.StyleManagerControlled;
            _MonthCalendar.SetOwner(this);

            _MonthCalendar.MonthChanged += new EventHandler(MonthCalendar_MonthChanged);
            _MonthCalendar.MonthChanging += new EventHandler(MonthCalendar_MonthChanging);
            _MonthCalendar.PaintLabel += new DayPaintEventHandler(MonthCalendar_PaintLabel);
            _MonthCalendar.LabelMouseDown += new MouseEventHandler(MonthCalendar_LabelMouseDown);
            _MonthCalendar.LabelMouseUp += new MouseEventHandler(MonthCalendar_LabelMouseUp);
            _MonthCalendar.LabelMouseEnter += new EventHandler(MonthCalendar_LabelMouseEnter);
            _MonthCalendar.LabelMouseLeave += new EventHandler(MonthCalendar_LabelMouseLeave);
            _MonthCalendar.LabelMouseMove += new MouseEventHandler(MonthCalendar_LabelMouseMove);
            _MonthCalendar.LabelMouseHover += new EventHandler(MonthCalendar_LabelMouseHover);
            _MonthCalendar.DateChanged += new EventHandler(MonthCalendar_DateChanged);
            _MonthCalendar.DateSelected += new DateRangeEventHandler(MonthCalendar_DateSelected);
            this.SetBaseItemContainer(_MonthCalendar);
        }
Пример #4
0
 /// <summary>
 /// Returns copy of the item.
 /// </summary>
 public override BaseItem Copy()
 {
     MonthCalendarItem objCopy = new MonthCalendarItem();
     this.CopyToItem(objCopy);
     return objCopy;
 }