/// <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; }
/// <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; }
/// <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; }
/// <summary> /// Initializes a new instance of the <see cref="MapAffixViewModel" /> class. /// </summary> /// <param name="id">The identifier.</param> /// <param name="selectable">if set to <c>true</c> [selectable].</param> /// <param name="playerViewModel">The player view model.</param> public MapAffixViewModel(string id, bool selectable, PlayerViewModel playerViewModel) { this.Selectable = selectable; switch (id) { case ReflectPhysicalId: this._reflectPhysical = true; break; case ReflectElementalId: this._reflectElemental = true; break; case CannotRegenerateId: this._cannotRegenerate = true; break; case CannotLeechId: this._cannotLeech = true; break; case TemporalChainsId: this._temporalChains = true; break; case AvoidAilmentsId: this._avoidAilments = true; break; } this._id = id; this._playerViewModel = playerViewModel; this._selected = !this._playerViewModel.IgnoredMadMods.Contains(id); this._name = AffixService.GetAffixText(id); }
/// <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); }
/// <summary> /// Gets the identifier. /// </summary> /// <param name="textValue">The text value.</param> /// <returns>The affix id.</returns> private static string GetId(string textValue) { if (textValue.EndsWith(AffixService.CraftedMarker)) { return(AffixService.FindCraftedId(textValue)); } if (textValue.EndsWith(AffixService.ImplicitMarker)) { return(AffixService.FindImplicitId(textValue)); } return(AffixService.FindExplicitId(textValue)); }
/// <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(); }
/// <summary> /// Formats the specified value. /// </summary> /// <param name="value">The value.</param> private void Format(string value) { var digitValues = GetDigitStrings(value); foreach (var digitValue in digitValues) { value = value.Replace(digitValue, "#"); } var text = value.Replace("+", string.Empty); this._id = GetId(text); // Remove (Crafted) | (Implicit) markers this._text = AffixService.SimplifyText(text); if (digitValues.Any()) { this._value = digitValues.Select(d => double.Parse(d)).Average(); } }
/// <summary> /// Globals the hook key press. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="KeyPressEventArgs" /> instance containing the event data.</param> private async void GlobalHookKeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) { switch (e.KeyChar) { case CtrlD: if (this._settingsService.SearchEnabled) { var isInitialize = await AffixService.InitializeAsync(); if (isInitialize) { System.Windows.Forms.SendKeys.SendWait("^C"); var item = this._itemParser.Parse(this.GetClipboardText()); if (item != null) { this.Newitem?.Invoke(this, item); Clipboard.Clear(); } } } break; } }