/// <summary>
        /// returs integer value of integer to which counter has to count
        /// it's the same as GetInputValue from InputValueProvider
        /// created for clarity
        /// </summary>
        /// <param name="counterType">can be numerical or number</param>
        /// <param name="input">users input to be converted</param>
        /// <returns></returns>
        public int GetRepetitionsNumber(CounterType counterType, string input)
        {
            int repetitionsNumber;
            InputValueProvider inputValueProvider = new InputValueProvider();

            repetitionsNumber = inputValueProvider.GetInputValue(counterType, input);
            return(repetitionsNumber);
        }
Beispiel #2
0
        /// <summary>
        /// returns interval value between counting
        /// for numeral counter it's measured in seconds
        /// for number counter it's measured in miliseconds
        /// </summary>
        /// <param name="counterType">can be number or numerical</param>
        /// <param name="input">users input</param>
        /// <returns></returns>
        public int GetInterval(CounterType counterType, string input)
        {
            int interval;
            InputValueProvider inputValueProvider = new InputValueProvider();

            interval = inputValueProvider.GetInputValue(counterType, input);
            switch (counterType)
            {
            case CounterType.Number:
                return(interval);

            case CounterType.Numeral:
                return(interval * 1000);

            default:
                return(0);
            }
        }