예제 #1
0
        /// <summary>
        /// Registers the instances.
        /// </summary>
        private void ShowOverlays(Process parentProcess)
        {
            Execute.OnUIThread(() =>
            {
                this._mouseLurker          = new MouseLurker(parentProcess, this._settingsService);
                this._mouseLurker.Newitem += this.MouseLurker_Newitem;

                var keyboarHelper          = new PoeKeyboardHelper(parentProcess);
                this._currentDockingHelper = new DockingHelper(parentProcess, this._settingsService);
                this._clipboardLurker      = new ClipboardLurker(this._settingsService, keyboarHelper);

                this._container.RegisterInstance(typeof(ProcessLurker), null, this._processLurker);
                this._container.RegisterInstance(typeof(ClientLurker), null, this._currentLurker);
                this._container.RegisterInstance(typeof(ClipboardLurker), null, this._clipboardLurker);
                this._container.RegisterInstance(typeof(DockingHelper), null, this._currentDockingHelper);
                this._container.RegisterInstance(typeof(PoeKeyboardHelper), null, keyboarHelper);

                this._incomingTradeBarOverlay = this._container.GetInstance <TradebarViewModel>();
                this._outgoingTradeBarOverlay = this._container.GetInstance <OutgoingbarViewModel>();
                this._lifeBulbOverlay         = this._container.GetInstance <LifeBulbViewModel>();
                this._manaBulbOverlay         = this._container.GetInstance <ManaBulbViewModel>();
                this._afkService     = this._container.GetInstance <AfkService>();
                this._hideoutOverlay = this._container.GetInstance <HideoutViewModel>();

                this.ActivateItem(this._incomingTradeBarOverlay);
                this.ActivateItem(this._outgoingTradeBarOverlay);
                this.ActivateItem(this._lifeBulbOverlay);
                this.ActivateItem(this._manaBulbOverlay);
                this.ActivateItem(this._hideoutOverlay);
            });
        }
예제 #2
0
        /// <summary>
        /// Registers the instances.
        /// </summary>
        private void ShowOverlays(IntPtr windowHandle)
        {
            Execute.OnUIThread(() =>
            {
                var keyboarHelper              = new PoeKeyboardHelper(windowHandle);
                this._currentDockingHelper     = new DockingHelper(windowHandle, this._settingsService);
                this._clipboardLurker          = new ClipboardLurker(this._settingsService, keyboarHelper);
                this._clipboardLurker.Newitem += this.ClipboardLurker_Newitem;

                this._container.RegisterInstance(typeof(ClientLurker), null, this._currentLurker);
                this._container.RegisterInstance(typeof(ClipboardLurker), null, this._clipboardLurker);
                this._container.RegisterInstance(typeof(DockingHelper), null, this._currentDockingHelper);
                this._container.RegisterInstance(typeof(PoeKeyboardHelper), null, keyboarHelper);

                this._incomingTradeBarOverlay = this._container.GetInstance <TradebarViewModel>();
                this._outgoingTradeBarOverlay = this._container.GetInstance <OutgoingbarViewModel>();
                this._lifeBulbOverlay         = this._container.GetInstance <LifeBulbViewModel>();
                this._manaBulbOverlay         = this._container.GetInstance <ManaBulbViewModel>();

                this.ActivateItem(this._incomingTradeBarOverlay);
                this.ActivateItem(this._outgoingTradeBarOverlay);
                this.ActivateItem(this._lifeBulbOverlay);
                this.ActivateItem(this._manaBulbOverlay);
            });
        }
예제 #3
0
        /// <summary>
        /// Registers the instances.
        /// </summary>
        private void ShowOverlays(int processId)
        {
            Execute.OnUIThread(() =>
            {
                this._currentDockingHelper = new DockingHelper(processId, this._settingsService);

                // Keyboard
                var keyboarHelper    = new PoeKeyboardHelper(processId);
                this._keyboardLurker = new KeyboardLurker(processId, this._settingsService, keyboarHelper);

                // Mouse
                this._mouseLurker          = new MouseLurker(processId, this._settingsService);
                this._mouseLurker.Newitem += this.MouseLurker_Newitem;

                // Clipboard
                this._clipboardLurker = new ClipboardLurker();

                this._container.RegisterInstance(typeof(ProcessLurker), null, this._processLurker);
                this._container.RegisterInstance(typeof(ClientLurker), null, this._currentLurker);
                this._container.RegisterInstance(typeof(ClipboardLurker), null, this._clipboardLurker);
                this._container.RegisterInstance(typeof(DockingHelper), null, this._currentDockingHelper);
                this._container.RegisterInstance(typeof(PoeKeyboardHelper), null, keyboarHelper);

                this._incomingTradeBarOverlay = this._container.GetInstance <TradebarViewModel>();
                this._outgoingTradeBarOverlay = this._container.GetInstance <OutgoingbarViewModel>();
                this._lifeBulbOverlay         = this._container.GetInstance <LifeBulbViewModel>();
                this._manaBulbOverlay         = this._container.GetInstance <ManaBulbViewModel>();
                this._afkService     = this._container.GetInstance <AfkService>();
                this._hideoutOverlay = this._container.GetInstance <HideoutViewModel>();
                this._helpOverlay    = this._container.GetInstance <HelpViewModel>();
                this._helpOverlay.Initialize(this.ToggleBuildHelper);
                this._buildViewModel = this._container.GetInstance <BuildViewModel>();

                if (this._settingsService.BuildHelper)
                {
                    this.ActivateItem(this._helpOverlay);
                }

                this.ActivateItem(this._incomingTradeBarOverlay);
                this.ActivateItem(this._outgoingTradeBarOverlay);
                this.ActivateItem(this._lifeBulbOverlay);
                this.ActivateItem(this._manaBulbOverlay);
                this.ActivateItem(this._hideoutOverlay);
            });
        }
예제 #4
0
        /// <summary>
        /// Registers the instances.
        /// </summary>
        private void ShowOverlays(int processId)
        {
            Execute.OnUIThread(() =>
            {
                this._currentDockingHelper = new DockingHelper(processId, this._settingsService);

                // Keyboard
                var keyboarHelper    = new PoeKeyboardHelper(processId);
                this._keyboardLurker = new KeyboardLurker(processId, this._settingsService, this._keyCodeService, keyboarHelper);
                this._keyboardLurker.BuildToggled    += this.KeyboardLurker_BuildToggled;
                this._keyboardLurker.OpenWikiPressed += this.KeyboardLurker_OpenWikiPressed;

                // Mouse
                this._mouseLurker                 = new MouseLurker(processId, this._settingsService);
                this._mouseLurker.ItemDetails    += this.ShowItemDetails;
                this._mouseLurker.ItemIdentified += this.ShowMap;

                // Clipboard
                this._clipboardLurker = new ClipboardLurker();

                this._container.RegisterInstance(typeof(ProcessLurker), null, this._processLurker);
                this._container.RegisterInstance(typeof(MouseLurker), null, this._mouseLurker);
                this._container.RegisterInstance(typeof(ClientLurker), null, this._currentLurker);
                this._container.RegisterInstance(typeof(PlayerService), null, this._currentCharacterService);
                this._container.RegisterInstance(typeof(ClipboardLurker), null, this._clipboardLurker);
                this._container.RegisterInstance(typeof(DockingHelper), null, this._currentDockingHelper);
                this._container.RegisterInstance(typeof(PoeKeyboardHelper), null, keyboarHelper);
                this._container.RegisterInstance(typeof(KeyboardLurker), null, this._keyboardLurker);

                this._skillTimelineOverlay    = this._container.GetInstance <BuildTimelineViewModel>();
                this._incomingTradeBarOverlay = this._container.GetInstance <TradebarViewModel>();
                this._outgoingTradeBarOverlay = this._container.GetInstance <OutgoingbarViewModel>();
                this._popup           = this._container.GetInstance <PopupViewModel>();
                this._lifeBulbOverlay = this._container.GetInstance <LifeBulbViewModel>();
                this._manaBulbOverlay = this._container.GetInstance <ManaBulbViewModel>();
                this._afkService      = this._container.GetInstance <AfkService>();
                this._hideoutOverlay  = this._container.GetInstance <HideoutViewModel>();
                this._helpOverlay     = this._container.GetInstance <HelpViewModel>();
                this._helpOverlay.Initialize(this.ToggleBuildHelper);
                this._buildViewModel = this._container.GetInstance <BuildViewModel>();

                if (this._settingsService.BuildHelper)
                {
                    this.ActivateItem(this._buildViewModel);
                }

                if (this._settingsService.BuildHelper)
                {
                    if (this._settingsService.TimelineEnabled)
                    {
                        this.ActivateItem(this._skillTimelineOverlay);
                    }

                    this.ActivateItem(this._helpOverlay);
                }

                if (this._settingsService.IncomingTradeEnabled)
                {
                    this.ActivateItem(this._incomingTradeBarOverlay);
                }

                if (this._settingsService.OutgoingTradeEnabled)
                {
                    this.ActivateItem(this._outgoingTradeBarOverlay);
                }

                if (this._settingsService.HideoutEnabled)
                {
                    this.ActivateItem(this._hideoutOverlay);
                }

                this.ActivateItem(this._lifeBulbOverlay);
                this.ActivateItem(this._manaBulbOverlay);
            });
        }