コード例 #1
0
        private void StopwatchTimer_Tick(object sender, EventArgs e)
        {
            stopwatchCounter++;

            if (isBreakTime)
            {
                stopwatchBreakCounter--;
                stopwatchLabel.Text = FormEditor.DisplayStopwatchTime(stopwatchBreakCounter);

                if (stopwatchBreakCounter == 0)
                {
                    isBreakTime = false;
                }
            }
            else
            {
                stopwatchLabel.Text = FormEditor.DisplayStopwatchTime(stopwatchCounter);
            }
        }
コード例 #2
0
        private void StopwatchTimer_Tick(object sender, EventArgs e)
        {
            if (isStopwatchRunning)
            {
                stopwatchCounter++;
            }

            if (stopwatchBreakCounter > 0)
            {
                stopwatchBreakCounter--;
                stopwatchLabel.Text = FormEditor.DisplayStopwatchTime(stopwatchBreakCounter);
            }
            else
            {
                if (stopwatchExerciseTimeCounter > 0)
                {
                    stopwatchLabel.Text = FormEditor.DisplayStopwatchTime(stopwatchExerciseTimeCounter);
                }
                else
                {
                    stopwatchLabel.Text = FormEditor.DisplayStopwatchTime(stopwatchCounter);
                }
            }
        }