/// <summary> /// Initializes a new instance of the <see cref="WikiViewModel" /> 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="githubService">The github service.</param> /// <param name="mouseLurker">The mouse lurker.</param> /// <param name="ninjaService">The ninja service.</param> public WikiViewModel(IWindowManager windowManager, DockingHelper dockingHelper, ProcessLurker processLurker, SettingsService settingsService, GithubService githubService, MouseLurker mouseLurker, PoeNinjaService ninjaService) : base(windowManager, dockingHelper, processLurker, settingsService) { this._githubService = githubService; this._mouseLurker = mouseLurker; this._ninjaService = ninjaService; this.Items = new ObservableCollection <WikiItemBaseViewModel>(); }
/// <summary> /// Initialize the viewmodel. /// </summary> /// <returns> /// The task. /// </returns> public async Task Initialize() { using (var service = new PoeNinjaService()) { var ratio = await service.GetExaltRationAsync(this._event.LeagueName); this.ExaltRatio = Math.Round(ratio); } var value = this._event.Price.NumberOfCurrencies % 1; this.Decimal = Math.Round(value, 2); this.DecimalChaosValue = Convert.ToInt32(this.Decimal * this.ExaltRatio); }