public void SetLocation(PopupTimeEdit ownerEdit)
        {
            Point editorLocation = ownerEdit.PointToScreen(Point.Empty);

            editorLocation.Y += ownerEdit.Size.Height;
            Location          = editorLocation;
        }
Exemplo n.º 2
0
 private void Clear()
 {
     emptyCell       = null;
     OwnerEdit       = null;
     isReady         = false;
     LostFocus      -= TimeEditPopupControl_LostFocus;
     buttonOK.Click -= buttonOK_Click;
     buttonOK.Dispose();
 }
        public PopupTimeEditForm(PopupTimeEdit ownerEdit)
        {
            InitializeComponent();
            SetLocation(ownerEdit);

            CreatePopupControl(ownerEdit);
            CreatePanel();

            ClientSize = panel.ClientSize;
            Controls.Add(panel);
        }
        protected virtual PopupTimeEditForm GetPopupForm(PopupTimeEdit edit)
        {
            if (popupForm == null)
            {
                popupForm = new PopupTimeEditForm(edit);
            }

            DateTime newTime = ParseCurrentTime(Text);

            popupForm.popupControl.CurrentTime = newTime;
            return(popupForm);
        }
Exemplo n.º 5
0
        public TimeEditPopupControl(PopupTimeEdit ownerEdit)
        {
            DoubleBuffered = true;
            Appearance.Assign(ownerEdit.Properties.Appearance);
            InitializeComponent();

            OwnerEdit = ownerEdit;
            emptyCell = new CellViewInfo();

            CreateViewInfo();
            CreatePainter();

            AddOkButton();
            CalcClientSize();

            LostFocus += TimeEditPopupControl_LostFocus;
        }
 private void CreatePopupControl(PopupTimeEdit ownerEdit)
 {
     popupControl          = new TimeEditPopupControl(ownerEdit);
     popupControl.Location = new Point(1, 1);
 }