Alsing.Windows.Forms.CoreLib.SplitViewControl.DoResize C# (CSharp) Метод

DoResize() приватный Метод

private DoResize ( ) : void
Результат void
        private void DoResize()
        {
            //			int OldWidth=Horizontal.Width ;
            //			int OldHeight=Vertical.Height;
            int NewHeight = Height;
            int NewWidth = Width;

            if (NewHeight != 0 && NewWidth != 0)
            {
                SuspendLayout();
                //				Horizontal.Top = (int)(NewHeight*HorizontalPos);
                //				Vertical.Left =(int)(NewWidth*VerticalPos);
                //
                //				int CenterY=(Horizontal.Top+Horizontal.Height /2)-Center.Height/2;
                //				int CenterX=(Vertical.Left+Vertical.Width /2)-Center.Width /2;
                //
                //				Center.Location =new Point (CenterX,CenterY);


                //ReSize (0,0);
                ReSize2();
                OnResizing();

                if (Horizontal.Top < 15)
                {
                    Horizontal.Top = 0 - Horizontal.Height;
                    OnHideTop();
                }

                if (Vertical.Left < 15)
                {
                    Vertical.Left = 0 - Vertical.Width;
                    OnHideLeft();
                }


                Horizontal.Width = Width;
                Vertical.Height = Height;
                Horizontal.SendToBack();
                Vertical.SendToBack();
                Horizontal.BackColor = SystemColors.Control;
                Vertical.BackColor = SystemColors.Control;


                //this.SendToBack ();
                int RightLeft = Vertical.Left + Vertical.Width;
                int RightLowerTop = Horizontal.Top + Horizontal.Height;
                int RightWidth = Width - RightLeft;
                int LowerHeight = Height - RightLowerTop;
                int UpperHeight = Horizontal.Top;
                int LeftWidth = Vertical.Left;

                if (LowerRight != null)
                {
                    LowerRight.BringToFront();
                    LowerRight.SetBounds(RightLeft, RightLowerTop, RightWidth, LowerHeight);
                }
                if (UpperRight != null)
                {
                    UpperRight.BringToFront();
                    UpperRight.SetBounds(RightLeft, 0, RightWidth, UpperHeight);
                }


                if (LowerLeft != null)
                {
                    LowerLeft.BringToFront();
                    LowerLeft.SetBounds(0, RightLowerTop, LeftWidth, LowerHeight);
                }
                if (UpperLeft != null)
                {
                    UpperLeft.BringToFront();
                    UpperLeft.SetBounds(0, 0, LeftWidth, UpperHeight);
                }
                ResumeLayout(); //ggf
            }
        }