Forex_Strategy_Builder.Data_Horizon.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 textHeight   = Font.Height;
            int space        = btnHrzSpace;
            int border       = 2;

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

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

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

            // Panel Base
            pnlBase.Size     = new Size(ClientSize.Width - 2 * space, btnAccept.Top - btnVertSpace - space);
            pnlBase.Location = new Point(space, space);

            //Label Max bars
            lblMaxBars.Location = new Point(space, 2 * space + 2 * border);

            //chboxUseStartDate
            chboxUseStartDate.Location = new Point(space + 4, lblMaxBars.Bottom + 4 * space);

            // Start Date
            dtpStartDate.Width    = pnlBase.ClientSize.Width - 2 * space - 8;
            dtpStartDate.Location = new Point(space + 4, chboxUseStartDate.Bottom + space);

            //chboxUseEndDate
            chboxUseEndDate.Location = new Point(space + 4, dtpStartDate.Bottom + 4 * space);

            // End Date
            dtpEndDate.Width    = dtpStartDate.Width;
            dtpEndDate.Location = new Point(space + 4, chboxUseEndDate.Bottom + space);

            //numUpDownMaxBars
            numUpDownMaxBars.Width    = 80;
            numUpDownMaxBars.Location = new Point(dtpStartDate.Right - numUpDownMaxBars.Width, 2 * space + 2 * border - 2);

            // lblMinBars
            lblMinBars.Location = new Point(lblMaxBars.Left, dtpEndDate.Bottom + 3 * space);

            return;
        }