ARCed.UI.DockPanel.AutoHideWindowControl.GetRectangle C# (CSharp) Method

GetRectangle() private method

private GetRectangle ( bool show ) : Rectangle
show bool
return System.Drawing.Rectangle
            private Rectangle GetRectangle(bool show)
            {
                if (this.DockState == DockState.Unknown)
                    return Rectangle.Empty;

                Rectangle rect = this.DockPanel.AutoHideWindowRectangle;

                if (show)
                    return rect;

                if (this.DockState == DockState.DockLeftAutoHide)
                    rect.Width = 0;
                else if (this.DockState == DockState.DockRightAutoHide)
                {
                    rect.X += rect.Width;
                    rect.Width = 0;
                }
                else if (this.DockState == DockState.DockTopAutoHide)
                    rect.Height = 0;
                else
                {
                    rect.Y += rect.Height;
                    rect.Height = 0;
                }

                return rect;
            }