Пример #1
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     DataManager dataManager = new DataManager();
     PuppetMaster puppetMaster = new PuppetMaster(dataManager);
     CharacterInfoProvider characterInfoProvider = new CharacterInfoProvider(dataManager.CharacterManager, dataManager.Modules);
     ClientConfigInfoProvider clientConfigInfoProvider = new ClientConfigInfoProvider(dataManager.Paths, dataManager.ClientConfig);
     OrderReviewInfoProvider orderReviewInfoProvider = new OrderReviewInfoProvider(puppetMaster.OrderReviewer);
     AutomationRequester manualExecution = new AutomationRequester(puppetMaster);
     Mouse.SuspendEvent = new ManualResetEvent(true);
     Application.Run(new etview(characterInfoProvider, clientConfigInfoProvider, orderReviewInfoProvider, manualExecution));
 }
Пример #2
0
        public AutomationRequester(PuppetMaster puppetMaster)
        {
            _puppetMaster = puppetMaster;
            _pauseKey = new Hotkey(Keys.Z, true, true, false, false);
            _pauseKey.Pressed += delegate { Pause(); };
            _unpauseKey = new Hotkey(Keys.X, true, true, false, false);
            _unpauseKey.Pressed += delegate { Unpause(); };
            _terminateKey = new Hotkey(Keys.Q, true, true, true, false);
            _terminateKey.Pressed += delegate { Terminate(); };

            _control = new Control();
            _pauseKey.Register(_control);
            _unpauseKey.Register(_control);
            _terminateKey.Register(_control);
        }