private void grouperOptions_Resize(object sender, EventArgs e)
{
var requiresSession = RequiresSession();
if (requiresSession)
{
grouperOptions.Size = new Size(tabPageListener.Size.Width - 32, grouperOptions.Size.Height);
grouperEntityInformation.Size = new Size(grouperEntityInformation.Size.Width, tabPageListener.Size.Height - grouperStatistics.Size.Height - grouperOptions.Size.Height - 40);
grouperEntityInformation.Location = new Point(640, 136);
}
var width = requiresSession ? (grouperOptions.Size.Width - 112) / 6 : (grouperOptions.Size.Width - 80) / 4;
txtMaxConcurrentCalls.Size = new Size(width, txtMaxConcurrentCalls.Size.Height);
txtRefreshInformation.Size = new Size(width, txtRefreshInformation.Size.Height);
txtPrefetchCount.Size = new Size(width, txtPrefetchCount.Size.Height);
cboReceivedMode.Size = new Size(width, cboReceivedMode.Size.Height);
txtRefreshInformation.Location = new Point(width + 32, txtRefreshInformation.Location.Y);
lblRefreshInformation.Location = new Point(width + 32, lblRefreshInformation.Location.Y);
txtPrefetchCount.Location = new Point(2 * width + 48, cboReceivedMode.Location.Y);
lblPrefetchCount.Location = new Point(2 * width + 48, lblReceiveMode.Location.Y);
cboReceivedMode.Location = new Point(3 * width + 64, cboReceivedMode.Location.Y);
lblReceiveMode.Location = new Point(3 * width + 64, lblReceiveMode.Location.Y);
checkBoxLogging.Location = new Point(width + 32, checkBoxLogging.Location.Y);
checkBoxVerbose.Location = new Point(2 * width + 48, checkBoxVerbose.Location.Y);
checkBoxTrackMessages.Location = new Point(3 * width + 64, checkBoxTrackMessages.Location.Y);
if (requiresSession)
{
txtAutoRenewTimeout.Size = new Size(width, txtAutoRenewTimeout.Size.Height);
txtMessageWaitTimeout.Size = new Size(width, txtMessageWaitTimeout.Size.Height);
txtAutoRenewTimeout.Location = new Point(4 * width + 80, cboReceivedMode.Location.Y);
lblAutoRenewTimeout.Location = new Point(4 * width + 80, lblReceiveMode.Location.Y);
txtMessageWaitTimeout.Location = new Point(5 * width + 96, cboReceivedMode.Location.Y);
lblMessageWaitTimeout.Location = new Point(5 * width + 96, lblReceiveMode.Location.Y);
checkBoxGraph.Location = new Point(4 * width + 80, checkBoxGraph.Location.Y);
}
else
{
txtAutoRenewTimeout.Visible = false;
lblAutoRenewTimeout.Visible = false;
txtMessageWaitTimeout.Visible = false;
lblMessageWaitTimeout.Visible = false;
checkBoxGraph.Location = new Point(grouperOptions.Size.Width - checkBoxGraph.Size.Width - 12, checkBoxGraph.Location.Y);
}
}