Beispiel #1
0
        public MyApp(IWindowAttacher windowAttacher, INotifier notifier, IScreenHelper screenHelper, Container container)
        {
            //var d = new DebugWindow(screenHelper);
            //d.Show();

            var t = new VideoTest();

            t.Show();

            _windowAttacher = windowAttacher;
            _notifier       = notifier;
            _container      = container;

            if (!Directory.Exists(BDMTConstants.WORKSPACE_NAME))
            {
                Directory.CreateDirectory(BDMTConstants.WORKSPACE_NAME);
            }

            if (!File.Exists(BDMTConstants.WORKSPACE_PATH + BDMTConstants.NOTIFICATION_SOUND_FILE))
            {
                File.WriteAllBytes(BDMTConstants.WORKSPACE_PATH + BDMTConstants.NOTIFICATION_SOUND_FILE, BDMultiTool.Properties.Resources.notifySound);
            }

            minimized = false;

            _windowAttacher.Attach(WindowAttacher.GetHandleByWindowTitleBeginningWith("BLACK DESERT"));

            appCoreIsInitialized = true;

            HookManager.KeyPress += HookManagerOnKeyPress;

            //letAllComponentsRegister();
        }
Beispiel #2
0
        public MarketEngine(IRegonizeArea regonizeArea, IInputSender inputSender, IScreenHelper screenHelper, IWindowAttacher windowAttacher)
        {
            _regonizeArea   = regonizeArea;
            _inputSender    = inputSender;
            _screenHelper   = screenHelper;
            _windowAttacher = windowAttacher;

            var patternsPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Patterns");

            _imgInfo = new Image <Bgr, byte>(Path.Combine(patternsPath, "infoHeader.png"));
            _imgBuy  = new Image <Bgr, byte>(Path.Combine(patternsPath, "buyHeader.png"));
        }