Exemple #1
0
        public WeekSelectorCtrl()
        {
            PopupContainerControl popupControl = new PopupContainerControl();

            weekSelector = new UCWeekSelector();
            popupControl.Controls.Add(weekSelector);

            Properties.PopupControl               = popupControl;
            Properties.DisplayFormat.FormatType   = DevExpress.Utils.FormatType.Custom;
            this.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Custom;

            popupControl.Width  = this.Width;
            popupControl.Height = 320;
            weekSelector.Dock   = System.Windows.Forms.DockStyle.Fill;

            SizeChanged += new EventHandler(
                delegate(object s, EventArgs e)
            {
                popupControl.Width = Width;
            });
            weekSelector.DateChanged += new EventHandler(
                delegate(object o, EventArgs e)
            {
                OnDateChanged();
            });
            Date        = DateTime.Today;
            this.Popup += new EventHandler(
                delegate(object s, EventArgs e)
            {
                weekSelector.MakeRowVisible();
            });
            AddButton();
        }
Exemple #2
0
        public WeekSelectorCtrl()
        {
            PopupContainerControl popupControl = new PopupContainerControl();
            weekSelector = new UCWeekSelector();
            popupControl.Controls.Add(weekSelector);
            
            Properties.PopupControl = popupControl;
            Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Custom;
            this.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Custom;
            
            popupControl.Width = this.Width;
            popupControl.Height = 320;
            weekSelector.Dock = System.Windows.Forms.DockStyle.Fill;

                SizeChanged += new EventHandler(
                    delegate(object s, EventArgs e)
                    { 
                        popupControl.Width = Width;
                    });
                weekSelector.DateChanged += new EventHandler(
                    delegate(object o, EventArgs e)
                    {
                        OnDateChanged();
                    });
                Date = DateTime.Today;
                this.Popup += new EventHandler(
                    delegate(object s, EventArgs e)
                    {
                        weekSelector.MakeRowVisible();
                    });
            AddButton();
        }