public SearchController( IDatabaseItemDao databaseItemDao, IPlayerItemDao playerItemDao, IDatabaseItemStatDao databaseItemStatDao, IItemSkillDao itemSkillDao, IBuddyItemDao buddyItemDao //StashManager stashManager ) { this._dbItemDao = databaseItemDao; this._playerItemDao = playerItemDao; this._itemStatService = new ItemStatService(databaseItemStatDao, itemSkillDao); this._itemPaginatorService = new ItemPaginatorService(TakeSize); this._recipeService = new RecipeService(databaseItemDao); //this._costCalculationService = new CostCalculationService(playerItemDao, stashManager); this._buddyItemDao = buddyItemDao //this._stashManager = stashManager ; // Just make sure it writes .css/.html files before displaying anything to the browser // ItemHtmlWriter.ToJsonSerializeable(new List <PlayerHeldItem>()); // TODO: is this not a NOOP? JsBind.OnRequestItems += JsBind_OnRequestItems; // Return the ingredients for a given recipe JsBind.OnRequestRecipeIngredients += (sender, args) => { var recipeArgument = args as RequestRecipeArgument; var ingredients = _recipeService.GetRecipeIngredients(recipeArgument?.RecipeRecord); //_costCalculationService.Populate(ingredients); //_costCalculationService.SetMod(_previousMod); _previousCallback = recipeArgument?.Callback; _previousRecipe = recipeArgument?.RecipeRecord; Browser.JsCallback(recipeArgument?.Callback, JsBind.Serialize(ingredients)); }; // Update the recipe when the stash has changed //stashManager.StashUpdated += StashManagerOnStashUpdated; // Return the list of recipes JsBind.OnRequestRecipeList += (sender, args) => { var recipeArgument = args as RequestRecipeArgument; var recipes = _recipeService.GetRecipeList(); Browser.JsCallback(recipeArgument?.Callback, JsBind.Serialize(recipes)); }; }
public ItemTransferController( CefBrowserHandler browser, Action <string> feedback, Action <string> setTooltip, SplitSearchWindow searchWindow, IPlayerItemDao playerItemDao, TransferStashService transferStashService, ItemStatService itemStatService, SettingsService settingsService ) { _browser = browser; _setFeedback = feedback; _setTooltip = setTooltip; _searchWindow = searchWindow; _dao = playerItemDao; _transferStashService = transferStashService; _itemStatService = itemStatService; _settingsService = settingsService; }
public SearchController( IDatabaseItemDao databaseItemDao, IPlayerItemDao playerItemDao, ItemStatService itemStatService, IBuddyItemDao buddyItemDao, IAugmentationItemDao augmentationItemRepo, SettingsService settings, IItemCollectionDao itemCollectionRepo) { _dbItemDao = databaseItemDao; _playerItemDao = playerItemDao; _itemStatService = itemStatService; _itemPaginationService = new ItemPaginationService(TakeSize); _buddyItemDao = buddyItemDao; _augmentationItemRepo = augmentationItemRepo; _settings = settings; _itemCollectionRepo = itemCollectionRepo; JsIntegration.OnRequestItems += JsBind_OnRequestItems; }
public SearchController( IDatabaseItemDao databaseItemDao, IPlayerItemDao playerItemDao, IDatabaseItemStatDao databaseItemStatDao, IItemSkillDao itemSkillDao, IBuddyItemDao buddyItemDao, AugmentationItemRepo augmentationItemRepo, SettingsService settings) { _dbItemDao = databaseItemDao; _playerItemDao = playerItemDao; _itemStatService = new ItemStatService(databaseItemStatDao, itemSkillDao, settings); _itemPaginatorService = new ItemPaginatorService(TakeSize); _buddyItemDao = buddyItemDao; _augmentationItemRepo = augmentationItemRepo; _settings = settings; // Just make sure it writes .css/.html files before displaying anything to the browser // ItemHtmlWriter.ToJsonSerializeable(new List <PlayerHeldItem>()); // TODO: is this not a NOOP? JsBind.OnRequestItems += JsBind_OnRequestItems; }
public ItemTransferController( CefBrowserHandler browser, Action <string> feedback, Action <string> setTooltip, ISettingsReadController settingsController, SearchWindow searchWindow, DynamicPacker dynamicPacker, IPlayerItemDao playerItemDao, StashManager stashManager, ItemStatService itemStatService ) { this._browser = browser; this._setFeedback = feedback; this._setTooltip = setTooltip; this._settingsController = settingsController; this._searchWindow = searchWindow; this._dynamicPacker = dynamicPacker; this._dao = playerItemDao; this._stashManager = stashManager; this._itemStatService = itemStatService; }