예제 #1
0
        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);
        }
        public BaseClickerConfig CreateClickerConfig(ClickAreaEnum clickArea)
        {
            switch (clickArea)
            {
            case ClickAreaEnum.FullScreen:
                return(new FullScreenClickerConfig());

            case ClickAreaEnum.Area:
                var rectArea = _areaRectProvider.GetAreaRect();
                return(new AreaClickerConfig(rectArea.X, rectArea.Width, rectArea.Y, rectArea.Height));

            default:
                throw new NotImplementedException();
            }
        }