Пример #1
0
        /// <summary>
        /// Starts or resumes the animation. If the animation is complete, it restarts from the beginning.
        /// </summary>
        public void Play()
        {
            switch (_clock.CurrentState)
            {
            case ClockState.Active:
                _clockController.Resume();
                break;

            case ClockState.Filling:
            case ClockState.Stopped:
                _clockController.Begin();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }