public IMouseClicker CreateClicker(ClickDelayEnum clickDelay, ClickAreaEnum clickArea, ClickTypeEnum clickType)
        {
            var clickerConfig    = _clickerConfigFactory.CreateClickerConfig(clickArea);
            var clickerBehaviour = _clickBehaviourFactory.CreateClickBehaviour(clickType);
            var clickerInterval  = _clickerIntervalFactory.CreateClickerInterval(clickDelay);

            var clicker = new Clicker(clickerInterval, clickerConfig, clickerBehaviour);

            return(clicker);
        }
Example #2
0
        public IClickerInterval CreateClickerInterval(ClickDelayEnum clickDelay)
        {
            switch (clickDelay)
            {
            case ClickDelayEnum.Random:
                var rangeDelay = _delayRangeProvider.GetDelayRange();
                return(new RandomClickerInterval(rangeDelay.From, rangeDelay.To));

            case ClickDelayEnum.Fixed:
                var fixedDelay = _fixedDelayProvider.GetFixedDelay();
                return(new FixedClickerInterval(fixedDelay.Delay));

            default:
                throw new NotImplementedException();
            }
        }