GetRequiredLeftHandSideWidth() public method

public GetRequiredLeftHandSideWidth ( Point p ) : int
p Point
return int
		void SetDeclarationViewLocation()
		{
			//  This method uses the side with more free space
			int leftSpace = Bounds.Left - workingScreen.Left;
			int rightSpace = workingScreen.Right - Bounds.Right;
			Point pos;
			// The declaration view window has better line break when used on
			// the right side, so prefer the right side to the left.
			if (rightSpace * 2 > leftSpace) {
				declarationViewWindow.FixedWidth = false;
				pos = new Point(Bounds.Right, Bounds.Top);
				if (declarationViewWindow.Location != pos) {
					declarationViewWindow.Location = pos;
				}
			} else {
				declarationViewWindow.Width = declarationViewWindow.GetRequiredLeftHandSideWidth(new Point(Bounds.Left, Bounds.Top));
				declarationViewWindow.FixedWidth = true;
				if (Bounds.Left < declarationViewWindow.Width) {
					pos = new Point(0, Bounds.Top);
				} else {
					pos = new Point(Bounds.Left - declarationViewWindow.Width, Bounds.Top);
				}
				if (declarationViewWindow.Location != pos) {
					declarationViewWindow.Location = pos;
				}
				declarationViewWindow.Refresh();
			}
		}
        private void SetDeclarationViewLocation()
        {
            Point point;
            int   left = base.Bounds.Left - this.workingScreen.Left;

            if ((this.workingScreen.Right - base.Bounds.Right) * 2 <= left)
            {
                DeclarationViewWindow requiredLeftHandSideWidth = this.declarationViewWindow;
                DeclarationViewWindow declarationViewWindow     = this.declarationViewWindow;
                int       num    = base.Bounds.Left;
                Rectangle bounds = base.Bounds;
                requiredLeftHandSideWidth.Width       = declarationViewWindow.GetRequiredLeftHandSideWidth(new Point(num, bounds.Top));
                this.declarationViewWindow.FixedWidth = true;
                if (base.Bounds.Left >= this.declarationViewWindow.Width)
                {
                    Rectangle rectangle = base.Bounds;
                    point = new Point(rectangle.Left - this.declarationViewWindow.Width, base.Bounds.Top);
                }
                else
                {
                    point = new Point(0, base.Bounds.Top);
                }
                if (this.declarationViewWindow.Location != point)
                {
                    this.declarationViewWindow.Location = point;
                }
                this.declarationViewWindow.Refresh();
            }
            else
            {
                this.declarationViewWindow.FixedWidth = false;
                point = new Point(base.Bounds.Right, base.Bounds.Top);
                if (this.declarationViewWindow.Location != point)
                {
                    this.declarationViewWindow.Location = point;
                    return;
                }
            }
        }