ZForge.Controls.ExplorerBar.Expando.OnMouseUp C# (CSharp) Method

OnMouseUp() protected method

Raises the MouseUp event
protected OnMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs A MouseEventArgs that contains the event data
return void
        protected override void OnMouseUp(MouseEventArgs e)
        {
            base.OnMouseUp(e);

            // was it the left mouse button
            if (e.Button == MouseButtons.Left)
            {
                if (this.dragging)
                {
                    this.Cursor = Cursors.Default;

                    this.dragging = false;

                    this.TaskPane.DropExpando(this);
                }
                else
                {
                    // was it in the titlebar area
                    if (e.Y < this.HeaderHeight && e.Y > (this.HeaderHeight - this.TitleBarHeight))
                    {
                        // make sure that our taskPane (if we have one) is not animating
                        if (!this.Animating)
                        {
                            // collapse/expand the group
                            this.Collapsed = !this.Collapsed;
                        }

                        if (this.CanCollapse)
                        {
                            this.Select();
                        }
                    }
                }

                this.dragStart = Point.Empty;
            }
        }