AutoClicker.MainForm.CountHandler C# (CSharp) Method

CountHandler() private method

private CountHandler ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        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);
        }