Forex_Strategy_Builder.New_Translation.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;
            int width        = 195; // Right side controls

            // pnlInput
            pnlInput.Size     = new Size(ClientSize.Width - 2 * border, 170);
            pnlInput.Location = new Point(border, border);

            int left = pnlInput.ClientSize.Width - width - btnHrzSpace - 1;

            int shift     = 26;
            int vertSpace = 2;
            for (int i = 0; i < alblInputNames.Length; i++)
            {
                alblInputNames[i].Location = new Point(border, i * buttonHeight + (i + 1) * vertSpace + shift);
            }

            shift     = 24;
            vertSpace = 2;
            for (int i = 0; i < atbxInputValues.Length; i++)
            {
                atbxInputValues[i].Width    = width;
                atbxInputValues[i].Location = new Point(left, i * buttonHeight + (i + 1) * vertSpace + shift);
            }

            // 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);

            return;
        }