Пример #1
0
        static void Main(string[] args)
        {
            var model = new Collaboration()
            {
                ExpireDate = DateTime.Now.AddDays(10)
            };

            var test = JsonConvert.SerializeObject(model);

            //var lurker = new ClipboardLurker();
            using (var lurker = new ClientLurker())
            {
                lurker.WaitForPoe().Wait();
                Console.WriteLine("Poe Found");
                lurker.LocationChanged   += Lurker_ChangedLocation;
                lurker.RemainingMonsters += Watcher_RemainingMonsters;
                lurker.PlayerJoined      += Watcher_PlayerJoined;
                lurker.PlayerLeft        += Watcher_PlayerLeft;
                lurker.Whispered         += Watcher_Whispered;
                lurker.IncomingOffer     += Lurker_NewOffer;
                Console.Read();
            }

            Console.WriteLine("Yeah");
            Console.Read();
        }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TradebarViewModel" /> class.
        /// </summary>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="clientLurker">The client lurker.</param>
        /// <param name="processLurker">The process lurker.</param>
        /// <param name="keyboardLurker">The keyboard lurker.</param>
        /// <param name="dockingHelper">The docking helper.</param>
        /// <param name="keyboardHelper">The keyboard helper.</param>
        /// <param name="settingsService">The settings service.</param>
        /// <param name="windowManager">The window manager.</param>
        /// <param name="soundService">The sound service.</param>
        /// <param name="pushBulletService">The PushBullet service.</param>
        public TradebarViewModel(
            IEventAggregator eventAggregator,
            ClientLurker clientLurker,
            ProcessLurker processLurker,
            KeyboardLurker keyboardLurker,
            DockingHelper dockingHelper,
            PoeKeyboardHelper keyboardHelper,
            SettingsService settingsService,
            IWindowManager windowManager,
            SoundService soundService,
            PushBulletService pushBulletService)
            : base(windowManager, dockingHelper, processLurker, settingsService)
        {
            this._eventAggregator   = eventAggregator;
            this._keyboardHelper    = keyboardHelper;
            this._soundService      = soundService;
            this._clientLurker      = clientLurker;
            this._pushBulletService = pushBulletService;

            this._keyboardLurker = keyboardLurker;
            this.TradeOffers     = new ObservableCollection <OfferViewModel>();
            this._soldOffers     = new List <TradeEvent>();
            this._context        = new TradebarContext(this.RemoveOffer, this.AddActiveOffer, this.AddToSoldOffer, this.SetActiveOffer, this.ClearAll);
            this.DisplayName     = "Poe Lurker";
        }
Пример #3
0
        /// <summary>
        /// Cleans up.
        /// </summary>
        private void CleanUp()
        {
            this._container.UnregisterHandler <ClientLurker>();
            this._container.UnregisterHandler <DockingHelper>();
            this._container.UnregisterHandler <PoeKeyboardHelper>();
            this._container.UnregisterHandler <ClipboardLurker>();

            if (this._clipboardLurker != null)
            {
                this._clipboardLurker.Newitem -= this.ClipboardLurker_Newitem;
                this._clipboardLurker.Dispose();
                this._clipboardLurker = null;
            }

            if (this._currentLurker != null)
            {
                this._currentLurker.PoeClosed      -= this.CurrentLurker_PoeClosed;
                this._currentLurker.AdminRequested -= this.CurrentLurker_AdminRequested;
                this._currentLurker.Dispose();
                this._currentLurker = null;
            }

            if (this._currentDockingHelper != null)
            {
                this._currentDockingHelper.Dispose();
                this._currentDockingHelper = null;
            }
        }
Пример #4
0
        /// <summary>
        /// Waits for poe.
        /// </summary>
        private async Task WaitForPoe(bool fromClosing)
        {
            var affixServiceTask = AffixService.InitializeAsync();

            // Process Lurker
            this._processLurker = new PathOfExileProcessLurker();
            this._processLurker.ProcessClosed += this.PoeClosed;
            var process = await this._processLurker.WaitForProcess();

            if (this._settingsService.SyncBuild)
            {
                this._buildService.Sync();
            }

            this._currentLurker = new ClientLurker(process);
            this._currentLurker.AdminRequested += this.CurrentLurker_AdminRequested;

            this._currentCharacterService = new PlayerService(this._currentLurker);
            this.ActivePlayer             = new PlayerViewModel(this._currentCharacterService);
            this.NotifyOfPropertyChange("ActivePlayer");

            if (this._closing)
            {
                return;
            }

            this.ShowOverlays(process);
            await this.CheckForUpdate();

            await this.CheckPledgeStatus();

            await affixServiceTask;
        }
Пример #5
0
        /// <summary>
        /// Waits for poe.
        /// </summary>
        private async Task WaitForPoe(bool fromClosing)
        {
            var affixServiceTask = AffixService.InitializeAsync();

            // Process Lurker
            this._processLurker = new PathOfExileProcessLurker();
            this._processLurker.ProcessClosed += this.PoeClosed;
            var process = await this._processLurker.WaitForProcess();

            // Client Lurker
            this._currentLurker = new ClientLurker(process);
            this._currentLurker.AdminRequested += this.CurrentLurker_AdminRequested;

            if (this._closing)
            {
                return;
            }

            this.ShowOverlays(process);
            await this.CheckForUpdate();

            await this.CheckPledgeStatus();

            await affixServiceTask;
        }
Пример #6
0
        /// <summary>
        /// Waits for poe.
        /// </summary>
        private async void WaitForPoe()
        {
            var affixServiceTask = AffixService.InitializeAsync();

            this._currentLurker = new ClientLurker();
            this._currentLurker.AdminRequested += this.CurrentLurker_AdminRequested;
            this._currentLurker.PoeClosed      += CurrentLurker_PoeClosed;
            var windowHandle = await this._currentLurker.WaitForPoe();

            if (this._closing)
            {
                return;
            }

            this.ShowOverlays(windowHandle);
            await this.CheckForUpdate();

            // Mouse Shuttering
            if (this._settingsService.SearchEnabled)
            {
                this._clipboardLurker.BindGlobalClick();
            }

            await affixServiceTask;
        }
Пример #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PlayerService"/> class.
        /// </summary>
        /// <param name="clientLurker">The lurker.</param>
        public PlayerService(ClientLurker clientLurker)
        {
            if (clientLurker != null)
            {
                this._clientLurker = clientLurker;
                this._clientLurker.PlayerLevelUp += this.Lurker_PlayerLevelUp;
                this._clientLurker.PlayerJoined  += this.AddExternalPlayer;
                this._clientLurker.PlayerLeft    += this.AddExternalPlayer;
            }

            this._playerBank = new PlayerBank();

            if (!File.Exists(this.FilePath))
            {
                using (var file = File.Create(this.FilePath))
                {
                }

                this.Save();
            }
            else
            {
                try
                {
                    this._playerBank.ReadJsonFile(this.FilePath);
                    this.CleanExternalPlayers();
                }
                catch
                {
                    File.Delete(this.FilePath);
                }
            }
        }
Пример #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HideoutViewModel" /> class.
 /// </summary>
 /// <param name="windowManager">The window manager.</param>
 /// <param name="dockingHelper">The docking helper.</param>
 /// <param name="processLurker">The process lurker.</param>
 /// <param name="settingsService">The settings service.</param>
 /// <param name="keyboardHelper">The keyboard helper.</param>
 /// <param name="clientLurker">The client lurker.</param>
 public HideoutViewModel(IWindowManager windowManager, DockingHelper dockingHelper, ProcessLurker processLurker, SettingsService settingsService, PoeKeyboardHelper keyboardHelper, ClientLurker clientLurker)
     : base(windowManager, dockingHelper, processLurker, settingsService)
 {
     this._keyboardHelper = keyboardHelper;
     this._clientLurker   = clientLurker;
     this.IsVisible       = true;
 }
Пример #9
0
        /// <summary>
        /// Cleans up.
        /// </summary>
        private void CleanUp()
        {
            this.ActivePlayer = null;
            this._container.UnregisterHandler <ClientLurker>();
            this._container.UnregisterHandler <PlayerService>();
            this._container.UnregisterHandler <ProcessLurker>();
            this._container.UnregisterHandler <DockingHelper>();
            this._container.UnregisterHandler <PoeKeyboardHelper>();
            this._container.UnregisterHandler <ClipboardLurker>();
            this._container.UnregisterHandler <MouseLurker>();

            if (this._clipboardLurker != null)
            {
                this._clipboardLurker.Dispose();
                this._clipboardLurker = null;
            }

            if (this._currentLurker != null)
            {
                this._currentLurker.AdminRequested -= this.CurrentLurker_AdminRequested;
                this._currentLurker.Dispose();
                this._currentLurker = null;
            }

            if (this._currentCharacterService != null)
            {
                this._currentCharacterService.Dispose();
            }

            if (this._processLurker != null)
            {
                this._processLurker.ProcessClosed -= this.PoeClosed;
                this._processLurker.Dispose();
                this._processLurker = null;
            }

            if (this._currentDockingHelper != null)
            {
                this._currentDockingHelper.Dispose();
                this._currentDockingHelper = null;
            }

            if (this._afkService != null)
            {
                this._afkService.Dispose();
                this._afkService = null;
            }

            if (this._mouseLurker != null)
            {
                this._mouseLurker.Newitem -= this.MouseLurker_Newitem;
                this._mouseLurker.Dispose();
                this._mouseLurker = null;
            }

            if (this._keyboardLurker != null)
            {
                this._keyboardLurker.Dispose();
            }
        }
Пример #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HideoutViewModel" /> class.
 /// </summary>
 /// <param name="windowManager">The window manager.</param>
 /// <param name="dockingHelper">The docking helper.</param>
 /// <param name="processLurker">The process lurker.</param>
 /// <param name="settingsService">The settings service.</param>
 /// <param name="keyboardHelper">The keyboard helper.</param>
 /// <param name="clientLurker">The client lurker.</param>
 public HideoutViewModel(IWindowManager windowManager, DockingHelper dockingHelper, ProcessLurker processLurker, SettingsService settingsService, PoeKeyboardHelper keyboardHelper, ClientLurker clientLurker)
     : base(windowManager, dockingHelper, processLurker, settingsService)
 {
     this._keyboardHelper = keyboardHelper;
     this._clientLurker   = clientLurker;
     this._clientLurker.LocationChanged += this.ClientLurker_LocationChanged;
 }
Пример #11
0
        /// <summary>
        /// Waits for poe.
        /// </summary>
        private async void WaitForPoe()
        {
            this._currentLurker            = new ClientLurker();
            this._currentLurker.PoeClosed += CurrentLurker_PoeClosed;
            var process = await this._currentLurker.WaitForPoe();

            this.DisplayRoot(process);
        }
Пример #12
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AfkService" /> class.
        /// </summary>
        /// <param name="clientLurker">The client lurker.</param>
        /// <param name="eventAggregator">The event aggregator.</param>
        public AfkService(ClientLurker clientLurker, IEventAggregator eventAggregator)
        {
            this._trades          = new List <TradeEvent>();
            this._clientLurker    = clientLurker;
            this._eventAggregator = eventAggregator;

            this._clientLurker.AfkChanged    += this.AfkChanged;
            this._clientLurker.IncomingOffer += this.IncomingOffer;
        }
Пример #13
0
        /// <summary>
        /// Handles the PoeClosed event of the CurrentLurker control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void CurrentLurker_PoeClosed(object sender, System.EventArgs e)
        {
            this._container.UnregisterHandler <ClientLurker>();
            this._container.UnregisterHandler <DockingHelper>();
            this._container.UnregisterHandler <PoeKeyboardHelper>();
            this._currentLurker.PoeClosed -= this.CurrentLurker_PoeClosed;
            this._currentLurker.Dispose();
            this._currentLurker = null;

            this.WaitForPoe();
        }
Пример #14
0
        /// <summary>
        /// Waits for poe.
        /// </summary>
        private async void WaitForPoe()
        {
            await AffixService.InitializeAsync();

            await this.CheckForUpdate();

            this._currentLurker            = new ClientLurker();
            this._currentLurker.PoeClosed += CurrentLurker_PoeClosed;
            var windowHandle = await this._currentLurker.WaitForPoe();

            this.ShowOverlays(windowHandle);
        }
Пример #15
0
        /// <summary>
        /// Initializes a new instance of the <see cref="PoeOverlayBase"/> class.
        /// </summary>
        /// <param name="windowManager">The window manager.</param>
        /// <param name="dockingHelper">The docking helper.</param>
        public PoeOverlayBase(IWindowManager windowManager, DockingHelper dockingHelper, ClientLurker lurker, SettingsService settingsService)
            : base(windowManager)
        {
            this._dockingHelper   = dockingHelper;
            this._lurker          = lurker;
            this._settingsService = settingsService;

            this._dockingHelper.OnWindowMove       += this.DockingHelper_OnWindowMove;
            this._dockingHelper.OnForegroundChange += this.DockingHelper_OnForegroundChange;
            this._lurker.PoeClosed       += this.Lurker_PoeClosed;
            this._settingsService.OnSave += this.SettingsService_OnSave;
        }
Пример #16
0
 static void Main(string[] args)
 {
     using (var lurker = new ClientLurker())
     {
         lurker.LocationChanged   += Lurker_ChangedLocation;
         lurker.RemainingMonsters += Watcher_RemainingMonsters;
         lurker.PlayerJoined      += Watcher_PlayerJoined;
         lurker.PlayerLeft        += Watcher_PlayerLeft;
         lurker.Whispered         += Watcher_Whispered;
         lurker.NewOffer          += Lurker_NewOffer;
         Console.Read();
     }
 }
Пример #17
0
        /// <summary>
        /// Waits for poe.
        /// </summary>
        private async void WaitForPoe()
        {
            await AffixService.InitializeAsync();

            this._currentLurker            = new ClientLurker();
            this._currentLurker.PoeClosed += CurrentLurker_PoeClosed;
            var windowHandle = await this._currentLurker.WaitForPoe();

            this.ShowOverlays(windowHandle);
            await this.CheckForUpdate();

            // Mouse Shuttering
            this._clipboardLurker.BindGlobalClick();
        }
Пример #18
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OutgoingbarViewModel" /> class.
        /// </summary>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="clipboardLurker">The clipboard lurker.</param>
        /// <param name="clientLurker">The client lurker.</param>
        /// <param name="processLurker">The process lurker.</param>
        /// <param name="dockingHelper">The docking helper.</param>
        /// <param name="keyboardHelper">The keyboard helper.</param>
        /// <param name="settingsService">The settings service.</param>
        /// <param name="windowManager">The window manager.</param>
        /// <param name="playerService">The player service.</param>
        public OutgoingbarViewModel(IEventAggregator eventAggregator, ClipboardLurker clipboardLurker, ClientLurker clientLurker, ProcessLurker processLurker, DockingHelper dockingHelper, PoeKeyboardHelper keyboardHelper, SettingsService settingsService, IWindowManager windowManager, PlayerService playerService)
            : base(windowManager, dockingHelper, processLurker, settingsService)
        {
            this.Offers           = new ObservableCollection <OutgoingOfferViewModel>();
            this.FilteredOffers   = new ObservableCollection <OutgoingOfferViewModel>();
            this._timer           = new Timer(50);
            this._timer.Elapsed  += this.Timer_Elapsed;
            this._keyboardHelper  = keyboardHelper;
            this._clipboardLurker = clipboardLurker;
            this._eventAggregator = eventAggregator;
            this._clientLurker    = clientLurker;
            this._playerService   = playerService;

            this.Offers.CollectionChanged  += this.Offers_CollectionChanged;
            this._clipboardLurker.NewOffer += this.ClipboardLurker_NewOffer;
        }
Пример #19
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TradeBarViewModal"/> class.
        /// </summary>
        /// <param name="lurker">The lurker.</param>
        /// <param name="dockingHelper">The docking helper.</param>
        /// <param name="keyboardHelper">The keyboard helper.</param>
        public TradebarViewModel(IEventAggregator eventAggregator, ClientLurker lurker, DockingHelper dockingHelper, PoeKeyboardHelper keyboardHelper, SettingsService settingsService, IWindowManager windowManager)
            : base(windowManager, dockingHelper, lurker, settingsService)
        {
            this._eventAggregator = eventAggregator;
            this._lurker          = lurker;
            this._keyboardHelper  = keyboardHelper;
            this._settingsService = settingsService;
            this.TradeOffers      = new ObservableCollection <OfferViewModel>();

            this._lurker.IncomingOffer += this.Lurker_IncomingOffer;
            this._lurker.TradeAccepted += this.Lurker_TradeAccepted;
            this._lurker.PlayerJoined  += this.Lurker_PlayerJoined;
            this._lurker.PlayerLeft    += this.Lurker_PlayerLeft;

            this._context    = new TradebarContext(this.RemoveOffer, this.AddActiveOffer, this.SetActiveOffer);
            this.DisplayName = "Poe Lurker";
        }
Пример #20
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OutgoingbarViewModel"/> class.
        /// </summary>
        /// <param name="lurker">The lurker.</param>
        /// <param name="windowManager">The window manager.</param>
        public OutgoingbarViewModel(IEventAggregator eventAggregator, ClipboardLurker clipboardLurker, ClientLurker clientLurker, DockingHelper dockingHelper, PoeKeyboardHelper keyboardHelper, SettingsService settingsService, IWindowManager windowManager)
            : base(windowManager, dockingHelper, clientLurker, settingsService)
        {
            this.Offers           = new ObservableCollection <OutgoingOfferViewModel>();
            this._timer           = new Timer(50);
            this._timer.Elapsed  += this.Timer_Elapsed;
            this._keyboardHelper  = keyboardHelper;
            this._clientLurker    = clientLurker;
            this._clipboardLurker = clipboardLurker;
            this._eventAggregator = eventAggregator;

            this._clipboardLurker.NewOffer   += this.ClipboardLurker_NewOffer;
            this._clientLurker.OutgoingOffer += this.Lurker_OutgoingOffer;
            this._clientLurker.TradeAccepted += this.Lurker_TradeAccepted;
            this.Offers.CollectionChanged    += this.Offers_CollectionChanged;
            this._context = new OutgoingbarContext(this.RemoveOffer, this.SetActiveOffer);
        }
Пример #21
0
        /// <summary>
        /// Initializes a new instance of the <see cref="TradeBarViewModal"/> class.
        /// </summary>
        /// <param name="lurker">The lurker.</param>
        /// <param name="dockingHelper">The docking helper.</param>
        /// <param name="keyboardHelper">The keyboard helper.</param>
        public TradebarViewModel(ClientLurker lurker, DockingHelper dockingHelper, PoeKeyboardHelper keyboardHelper)
        {
            this._Lurker         = lurker;
            this._dockingHelper  = dockingHelper;
            this._keyboardHelper = keyboardHelper;
            this.TradeOffers     = new ObservableCollection <TradeOfferViewModel>();

            this._dockingHelper.OnWindowMove += this.DockingHelper_OnWindowMove;

            this._Lurker.PoeClosed     += this.Lurker_PoeClosed;
            this._Lurker.NewOffer      += this.Lurker_NewOffer;
            this._Lurker.TradeAccepted += this.Lurker_TradeAccepted;
            this._Lurker.PlayerJoined  += this.Lurker_PlayerJoined;
            this._Lurker.PlayerLeft    += this.Lurker_PlayerLeft;

            this._context    = new TradebarContext(this.RemoveOffer, this.AddActiveOffer);
            this.DisplayName = "Poe Lurker";
        }
Пример #22
0
        static void Main(string[] args)
        {
            //var lurker = new ClipboardLurker();
            using (var lurker = new ClientLurker())
            {
                lurker.WaitForPoe().Wait();
                Console.WriteLine("Poe Found");
                lurker.LocationChanged   += Lurker_ChangedLocation;
                lurker.RemainingMonsters += Watcher_RemainingMonsters;
                lurker.PlayerJoined      += Watcher_PlayerJoined;
                lurker.PlayerLeft        += Watcher_PlayerLeft;
                lurker.Whispered         += Watcher_Whispered;
                lurker.IncomingOffer     += Lurker_NewOffer;
                Console.Read();
            }

            Console.WriteLine("Yeah");
            Console.Read();
        }
Пример #23
0
        static void Main(string[] args)
        {
            var service = new Lurker.Patreon.PatreonService();

            Console.WriteLine(service.IsPledging().Result);

            //var lurker = new ClipboardLurker();
            using (var lurker = new ClientLurker())
            {
                lurker.LocationChanged   += Lurker_ChangedLocation;
                lurker.RemainingMonsters += Watcher_RemainingMonsters;
                lurker.PlayerJoined      += Watcher_PlayerJoined;
                lurker.PlayerLeft        += Watcher_PlayerLeft;
                lurker.Whispered         += Watcher_Whispered;
                lurker.IncomingOffer     += Lurker_NewOffer;
                Console.Read();
            }

            Console.Read();
        }
Пример #24
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BulbViewModelBase" /> class.
 /// </summary>
 /// <param name="windowManager">The window manager.</param>
 /// <param name="dockingHelper">The docking helper.</param>
 /// <param name="processLurker">The Processs lurker.</param>
 /// <param name="settingsService">The settings serivce.</param>
 /// <param name="clientLurker">The client lurker.</param>
 public BulbViewModelBase(IWindowManager windowManager, DockingHelper dockingHelper, ProcessLurker processLurker, SettingsService settingsService, ClientLurker clientLurker)
     : base(windowManager, dockingHelper, processLurker, settingsService)
 {
     this.ClientLurker = clientLurker;
     this.SetDefaultAction();
 }
Пример #25
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ManaBulbViewModel" /> class.
        /// </summary>
        /// <param name="eventAggregator">The event aggregator.</param>
        /// <param name="windowManager">The window manager.</param>
        /// <param name="dockingHelper">The docking helper.</param>
        /// <param name="clientLurker">The client lurker.</param>
        /// <param name="processLurker">The process lurker.</param>
        /// <param name="settingsService">The settings service.</param>
        /// H
        public ManaBulbViewModel(IEventAggregator eventAggregator, IWindowManager windowManager, DockingHelper dockingHelper, ClientLurker clientLurker, ProcessLurker processLurker, SettingsService settingsService)
            : base(windowManager, dockingHelper, processLurker, settingsService, clientLurker)
        {
            this._eventAggregator = eventAggregator;
            this._eventAggregator.Subscribe(this);

            this.ClientLurker.LocationChanged   += this.Lurker_LocationChanged;
            this.ClientLurker.RemainingMonsters += this.Lurker_RemainingMonsters;
            this.SettingsService.OnSave         += this.SettingsService_OnSave;
        }
Пример #26
0
        /// <summary>
        /// Cleans up.
        /// </summary>
        private void CleanUp()
        {
            this.ActivePlayer = null;
            this._container.UnregisterHandler <ClientLurker>();
            this._container.UnregisterHandler <PlayerService>();
            this._container.UnregisterHandler <ProcessLurker>();
            this._container.UnregisterHandler <DockingHelper>();
            this._container.UnregisterHandler <PoeKeyboardHelper>();
            this._container.UnregisterHandler <ClipboardLurker>();
            this._container.UnregisterHandler <MouseLurker>();
            this._container.UnregisterHandler <KeyboardLurker>();

            if (this._clipboardLurker != null)
            {
                this._clipboardLurker.Dispose();
                this._clipboardLurker = null;
            }

            if (this._currentLurker != null)
            {
                this._currentLurker.AdminRequested -= this.CurrentLurker_AdminRequested;
                this._currentLurker.Dispose();
                this._currentLurker = null;
            }

            if (this._currentCharacterService != null)
            {
                this._currentCharacterService.Dispose();
            }

            if (this._processLurker != null)
            {
                this._processLurker.ProcessClosed -= this.PoeClosed;
                this._processLurker.Dispose();
                this._processLurker = null;
            }

            if (this._currentDockingHelper != null)
            {
                this._currentDockingHelper.Dispose();
                this._currentDockingHelper = null;
            }

            if (this._afkService != null)
            {
                this._afkService.Dispose();
                this._afkService = null;
            }

            if (this._mouseLurker != null)
            {
                this._mouseLurker.ItemDetails    -= this.ShowItemDetails;
                this._mouseLurker.ItemIdentified -= this.ShowMap;
                this._mouseLurker.Dispose();
                this._mouseLurker = null;
            }

            if (this._keyboardLurker != null)
            {
                this._keyboardLurker.OpenWikiPressed -= this.KeyboardLurker_OpenWikiPressed;
                this._keyboardLurker.BuildToggled    -= this.KeyboardLurker_BuildToggled;
                this._keyboardLurker.Dispose();
            }
        }
Пример #27
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LifeBulbViewModel"/> class.
 /// </summary>
 /// <param name="windowManager">The window manager.</param>
 /// <param name="dockingHelper">The docking helper.</param>
 /// <param name="lurker"></param>
 /// <param name="settingsService"></param>H
 public LifeBulbViewModel(IEventAggregator eventAggregator, IWindowManager windowManager, DockingHelper dockingHelper, ClientLurker lurker, SettingsService settingsService, PoeKeyboardHelper keyboard)
     : base(windowManager, dockingHelper, lurker, settingsService)
 {
     this._keyboardHelper  = keyboard;
     this._eventAggregator = eventAggregator;
     this._eventAggregator.Subscribe(this);
 }
Пример #28
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UpdateManager" /> class.
 /// </summary>
 /// <param name="settingsService">The settings service.</param>
 /// <param name="clipboardLurker">The clipboard lurker.</param>
 /// <param name="clientLurker">The client lurker.</param>
 public UpdateManager(SettingsService settingsService, ClipboardLurker clipboardLurker, ClientLurker clientLurker)
 {
     this._clipboardLurker = clipboardLurker;
     this._clientLurker    = clientLurker;
     this._settingsService = settingsService;
 }
Пример #29
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LifeBulbViewModel"/> class.
 /// </summary>
 /// <param name="windowManager">The window manager.</param>
 /// <param name="dockingHelper">The docking helper.</param>
 /// <param name="lurker"></param>
 /// <param name="settingsService"></param>H
 public BulbViewModel(IWindowManager windowManager, DockingHelper dockingHelper, ClientLurker lurker, SettingsService settingsService)
     : base(windowManager, dockingHelper, lurker, settingsService)
 {
 }
Пример #30
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LifeBulbViewModel" /> class.
 /// </summary>
 /// <param name="eventAggregator">The event aggregator.</param>
 /// <param name="windowManager">The window manager.</param>
 /// <param name="dockingHelper">The docking helper.</param>
 /// <param name="processLurker">The process lurker.</param>
 /// <param name="clientLurker">The client lurker.</param>
 /// <param name="settingsService">The settings service.</param>
 public LifeBulbViewModel(IEventAggregator eventAggregator, IWindowManager windowManager, DockingHelper dockingHelper, ProcessLurker processLurker, ClientLurker clientLurker, SettingsService settingsService)
     : base(windowManager, dockingHelper, processLurker, settingsService, clientLurker)
 {
     this._eventAggregator = eventAggregator;
     this._eventAggregator.Subscribe(this);
 }