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 space = btnHrzSpace;
int textHeight = Font.Height;
int width = this.ClientSize.Width - 2 * space;
//Button Close
btnClose.Size = new Size(buttonWidth, buttonHeight);
btnClose.Location = new Point(ClientSize.Width - buttonWidth - btnHrzSpace, ClientSize.Height - buttonHeight - btnVertSpace);
for (int i = 3; i >= 0; i--)
{
btnNavigate[i].Size = new Size(buttonWidth / 2, buttonHeight);
btnNavigate[i].Location = new Point(btnClose.Left - buttonWidth / 2 - (btnHrzSpace + (buttonWidth / 2 + btnHrzSpace) * (3 - i)),
ClientSize.Height - buttonHeight - btnVertSpace);
}
nudGo.Size = new Size(65, buttonHeight);
nudGo.Location = new Point(space, btnNavigate[0].Top + 3);
btnGo.Size = new Size(65, buttonHeight);
btnGo.Location = new Point(nudGo.Right + btnHrzSpace, btnNavigate[0].Top);
pnlInfo.Size = new Size(width, infoRowHeight * (maxWayPoints + 2));
pnlInfo.Location = new Point(space, btnClose.Top - btnVertSpace - pnlInfo.Height);
pnlChart.Location = new Point(space, space);
pnlChart.Size = new Size(width, pnlInfo.Top - 2 * space);
btnNavigate[2].Focus();
// Scales the columns position
double scale = (double)pnlInfo.Width / aiColumnX[columns];
for (int i = 0; i <= columns; i++)
aiX[i] = (int)(aiColumnX[i] * scale);
return;
}