private void CountHandler(object sender, EventArgs e)
{
AutoClicker.CountType countType;
int count = -1;
if (rdbCount.Checked)
{
countType = AutoClicker.CountType.Fixed;
count = (int)numCount.Value;
}
else
{
countType = AutoClicker.CountType.UntilStopped;
}
// Toggle visibility of controls.
if (countType == AutoClicker.CountType.Fixed)
{
numCount.Enabled = true;
}
else
{
numCount.Enabled = false;
}
clicker.UpdateCount(countType, count);
}