/// <summary> /// Increase Time in current mode. /// </summary> /// <param name="time">Time in </param> public void IncreaseTimeInMode() { if (this.InvokeRequired) { IncreaseTimeInModeSafely d = new IncreaseTimeInModeSafely(IncreaseTimeInMode); Invoke(d, new object[] { }); } else { timeInMode++; timeInCurrentModeLabel.Text = timeInMode.ToString(); if (timeInMode < 10) { timeInCurrentModeLabel.BackColor = SystemColors.Control; } else { timeInCurrentModeLabel.BackColor = Color.PaleGreen; if ((timeInMode == 10) && beepCheckBox.Checked) { Console.Beep(); } } } }