Ejemplo n.º 1
0
 void dropContainer_Closed(object sender, FormClosedEventArgs e)
 {
     if (!dropContainer.DropDownForm.IsDisposed)
     {
         dropContainer.DropDownForm.DropStateChange -= dropContainer_DropStateChange;
         dropContainer.DropDownForm.FormClosed      -= dropContainer_Closed;
         this.ParentForm.Move -= ParentForm_Move;
         dropContainer.DropDownForm.Dispose();
     }
     dropContainer        = null;
     closedWhileInControl = (this.RectangleToScreen(this.ClientRectangle).Contains(Cursor.Position));
     _dropState           = eDropState.Closed;
     this.Invalidate();
 }
Ejemplo n.º 2
0
        private void dropContainer_Closed(object sender, FormClosedEventArgs e)
        {
            if (!fDropContainer.IsDisposed)
            {
                fDropContainer.DropStateChange -= dropContainer_DropStateChange;
                fDropContainer.FormClosed      -= dropContainer_Closed;
                ParentForm.Move -= ParentForm_Move;
                fDropContainer.Dispose();
            }
            fDropContainer        = null;
            fClosedWhileInControl = (RectangleToScreen(ClientRectangle).Contains(Cursor.Position));
            fDropState            = DropDownState.Closed;

            Invalidate();
        }
Ejemplo n.º 3
0
 void DropContainer_Closed(object sender, FormClosedEventArgs e)
 {
     if (!_dropContainer.IsDisposed)
     {
         _dropContainer.DropStateChange -= DropContainer_DropStateChange;
         _dropContainer.FormClosed      -= DropContainer_Closed;
         this.ParentForm.Move           -= ParentForm_Move;
         _dropContainer.Dispose();
     }
     _dropContainer        = null;
     _closedWhileInControl = (this.RectangleToScreen(this.ClientRectangle).Contains(Cursor.Position));
     _dropState            = eDropState.Closed;
     tmrAnimate.Enabled    = false;
     this.Invalidate();
 }
Ejemplo n.º 4
0
        protected void OpenDropDown()
        {
            if (_dropDownItem == null)
            {
                throw new NotImplementedException("The drop down item has not been initialized!  Use the InitializeDropDown() method to do so.");
            }

            if (!CanDrop)
            {
                return;
            }

            dropContainer = new DropDownContainer(_dropDownItem);
            dropContainer.DropDownForm.Bounds           = GetDropDownBounds();
            dropContainer.DropDownForm.DropStateChange += new DropDownForm.DropWindowArgs(dropContainer_DropStateChange);
            dropContainer.DropDownForm.FormClosed      += new FormClosedEventHandler(dropContainer_Closed);
            this.ParentForm.Move += new EventHandler(ParentForm_Move);
            _dropState            = eDropState.Dropping;
            dropContainer.Show();
            _dropState = eDropState.Dropped;
            this.Invalidate();
        }
Ejemplo n.º 5
0
        protected void OpenDropDown()
        {
            if (fDropDownItem == null)
            {
                throw new NotImplementedException("The drop down item has not been initialized! Use the InitializeDropDown() method to do so.");
            }

            if (!CanDrop)
            {
                return;
            }

            fDropContainer                  = new DropDownContainer(fDropDownItem);
            fDropContainer.Bounds           = GetDropDownBounds();
            fDropContainer.DropStateChange += dropContainer_DropStateChange;
            fDropContainer.FormClosed      += dropContainer_Closed;
            ParentForm.Move                += ParentForm_Move;
            fDropState = DropDownState.Dropping;
            fDropContainer.Show(this);
            fDropState = DropDownState.Dropped;

            Invalidate();
        }
Ejemplo n.º 6
0
        protected virtual void OpenDropDown()
        {
            if (_dropDownItem == null)
            {
                return;
            }
            //throw new NotImplementedException("The drop down item has not been initialized!  Use the InitializeDropDown() method to do so.");

            if (!CanDrop)
            {
                return;
            }

            _dropContainer = new DropDownContainer(_dropDownItem, _dropDownSize)
            {
                Bounds = GetDropDownBounds()
            };
            _dropContainer.DropStateChange += new DropDownContainer.DropWindowArgs(DropContainer_DropStateChange);
            _dropContainer.FormClosed      += new FormClosedEventHandler(DropContainer_Closed);
            this.ParentForm.Move           += new EventHandler(ParentForm_Move);
            _dropState = eDropState.Dropping;

            if (_useAnimation)
            {
                tmrAnimate.Enabled    = true;
                _dropContainer.Height = 0;
                _dropContainer.Show(this);
            }
            else
            {
                _dropContainer.Show(this);
                _dropState = eDropState.Dropped;
            }

            this.Invalidate();
        }
Ejemplo n.º 7
0
 public override void DropDownContainerShowedDropDown(object sender, EventArgs e)
 {
     DropDownContainer.FocusParent();
     NotifyShowedDropDown();
 }
Ejemplo n.º 8
0
 void dropContainer_Closed(object sender, FormClosedEventArgs e)
 {
     if (!dropContainer.IsDisposed)
     {
         dropContainer.DropStateChange -= dropContainer_DropStateChange;
         dropContainer.FormClosed -= dropContainer_Closed;
         this.ParentForm.Move -= ParentForm_Move;
         dropContainer.Dispose();
     }
     dropContainer = null;
     closedWhileInControl = (this.RectangleToScreen(this.ClientRectangle).Contains(Cursor.Position));
     _dropState = eDropState.Closed;
     this.Invalidate();
 }
Ejemplo n.º 9
0
        protected void OpenDropDown()
        {
            if (_dropDownItem == null)
                throw new NotImplementedException("The drop down item has not been initialized!  Use the InitializeDropDown() method to do so.");

            if (!CanDrop) return;

            dropContainer = new DropDownContainer(_dropDownItem);
            dropContainer.Bounds = GetDropDownBounds();
            dropContainer.DropStateChange += new DropDownContainer.DropWindowArgs(dropContainer_DropStateChange);
            dropContainer.FormClosed += new FormClosedEventHandler(dropContainer_Closed);
            this.ParentForm.Move += new EventHandler(ParentForm_Move);
            _dropState = eDropState.Dropping;
            dropContainer.Show(this);
            _dropState = eDropState.Dropped;
            this.Invalidate();
        }