Forex_Strategy_Builder.DataDirectory.OnResize C# (CSharp) Method

OnResize() protected method

Recalculates the sizes and positions of the controls after resizing.
protected OnResize ( EventArgs e ) : void
e System.EventArgs
return void
        protected override void OnResize(EventArgs e)
        {
            base.OnResize(e);

            int buttonHeight = (int)(Data.VerticalDLU * 15.5);
            int buttonWidth  = (int)(Data.HorizontalDLU * 60);
            int btnVertSpace = (int)(Data.VerticalDLU * 5.5);
            int btnHrzSpace  = (int)(Data.HorizontalDLU * 3);
            int border       = btnHrzSpace;
            int textHeight   = Font.Height;

            // Label Intro
            lblIntro.Size     = new Size(ClientSize.Width - 2 * btnVertSpace, font.Height);
            lblIntro.Location = new Point(btnHrzSpace, btnVertSpace);

            //Button Browse
            btnBrowse.Size     = new Size(buttonWidth, buttonHeight);
            btnBrowse.Location = new Point(ClientSize.Width - buttonWidth - btnHrzSpace, lblIntro.Bottom + border);

            //TextBox txbDataDirectory
            txbDataDirectory.Width    = btnBrowse.Left - 2 * btnHrzSpace;
            txbDataDirectory.Location = new Point(btnHrzSpace, btnBrowse.Top + (buttonHeight - txbDataDirectory.Height) / 2);

            //Button Cancel
            btnCancel.Size     = new Size(buttonWidth, buttonHeight);
            btnCancel.Location = new Point(ClientSize.Width - buttonWidth - btnHrzSpace, ClientSize.Height - buttonHeight - btnVertSpace);

            //Button Default
            btnDefault.Size     = new Size(buttonWidth, buttonHeight);
            btnDefault.Location = new Point(btnCancel.Left - buttonWidth - btnHrzSpace, ClientSize.Height - buttonHeight - btnVertSpace);

            //Button Accept
            btnAccept.Size     = new Size(buttonWidth, buttonHeight);
            btnAccept.Location = new Point(btnDefault.Left - buttonWidth - btnHrzSpace, ClientSize.Height - buttonHeight - btnVertSpace);

            return;
        }