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;
if (isCompactMode)
{
//Button Close
btnClose.Size = new Size (buttonWidth, buttonHeight);
btnClose.Location = new Point(ClientSize.Width - buttonWidth - btnHrzSpace, ClientSize.Height - buttonHeight - btnVertSpace);
// ProgressBar
progressBar.Size = new Size(ClientSize.Width - 2 * space, (int)(Data.VerticalDLU * 9));
progressBar.Location = new Point(space, btnVertSpace);
// Label Progress
lblProgress.Location = new Point(space, btnClose.Top + 5);
}
else
{
//Button Close
btnClose.Size = new Size (buttonWidth, buttonHeight);
btnClose.Location = new Point(ClientSize.Width - buttonWidth - btnHrzSpace, ClientSize.Height - buttonHeight - btnVertSpace);
// ProgressBar
progressBar.Size = new Size(ClientSize.Width - 2 * space, (int)(Data.VerticalDLU * 9));
progressBar.Location = new Point(space, btnClose.Top - progressBar.Height - btnVertSpace);
// Panel Info
int pnlInfoHeight = isTickDataFile ? infoRowHeight * 11 + 2 : infoRowHeight * 10 + 2;
pnlInfo.Size = new Size(ClientSize.Width - 2 * space, pnlInfoHeight);
pnlInfo.Location = new Point(space, space);
// Panel balance chart
smallBalanceChart.Size = new Size(ClientSize.Width - 2 * space, progressBar.Top - pnlInfo.Bottom - 2 * space);
smallBalanceChart.Location = new Point(space, pnlInfo.Bottom + space);
// Label Progress
lblProgress.Location = new Point(space, btnClose.Top + 5);
// Auto scan checkbox
chbAutoscan.Location = new Point(space, btnClose.Top + 5);
// TickScan checkbox
chbTickScan.Location = new Point(chbAutoscan.Right + space, btnClose.Top + 5);
}
return;
}