public ManufacturingService(IStaticDataService staticService, IApiService apiService, IBlueprintRepository blueprintRepository, IToDoListRepository todoRepository)
 {
     _staticService = staticService;
     _apiService = apiService;
     _blueprintRepository = blueprintRepository;
     _todoRepository = todoRepository;
 }
示例#2
0
 public AbilityViewModel(INavigationService navigationService, IPokemonService pokemonService, IStaticDataService staticDataService) : base(staticDataService)
 {
     _tokenSource = new CancellationTokenSource();
     _navigationService = navigationService;
     _pokemonService = pokemonService;
     _cachedAbilityId = 1;
 }
示例#3
0
        public PriceViewModel(
            ILogger logger,
            IDebouncer debouncer,
            ITradeSearchService tradeSearchService,
            IPoeNinjaCache poeNinjaCache,
            IStaticDataService staticDataService,
            ILanguageProvider languageProvider,
            IPoePriceInfoClient poePriceInfoClient,
            INativeClipboard nativeClipboard,
            IParserService parserService,
            SidekickSettings settings,
            IStatDataService statDataService,
            IItemCategoryService itemCategoryService)
        {
            this.logger              = logger;
            this.debouncer           = debouncer;
            this.tradeSearchService  = tradeSearchService;
            this.poeNinjaCache       = poeNinjaCache;
            this.staticDataService   = staticDataService;
            this.languageProvider    = languageProvider;
            this.poePriceInfoClient  = poePriceInfoClient;
            this.nativeClipboard     = nativeClipboard;
            this.parserService       = parserService;
            this.settings            = settings;
            this.statDataService     = statDataService;
            this.itemCategoryService = itemCategoryService;
            Task.Run(Initialize);

            PropertyChanged += PriceViewModel_PropertyChanged;
        }
示例#4
0
        public BulkQueryRequest(Item item, IStaticDataService staticDataService)
        {
            Exchange.Status.Option = StatusType.Online;

            Exchange.Want.Add(staticDataService.GetId(item));
            Exchange.Have.Add("chaos");
        }
示例#5
0
        public BulkQueryRequest(ParsedItem item, IStaticDataService staticDataService)
        {
            Exchange.Status.Option = StatusType.Online;

            Exchange.Want.Add(staticDataService.GetId(item.Name ?? item.TypeLine));
            Exchange.Have.Add("chaos"); // TODO: Add support for other currency types?
        }
示例#6
0
 public StaticDataCachingService(
     IMemoryCache cache,
     IStaticDataService staticDataService)
 {
     _cache             = cache;
     _staticDataService = staticDataService;
 }
示例#7
0
 public GameFactory(
     IAssetProvider assetProvider,
     ITexturesProvider texturesProvider,
     IStaticDataService staticDataService)
 {
     _assetProvider     = assetProvider;
     _texturesProvider  = texturesProvider;
     _staticDataService = staticDataService;
 }
 public ProfileEditPageViewModel(IDependencyService dependencyService, INavigationService navigationService, IPageDialogService dialogService,
                                 IFitMeetRestService fitMeetRestServices, IStaticDataService staticDataServices, IGoogleLocationService googleLocationService) : base(navigationService, fitMeetRestServices)
 {
     _dependencyService  = dependencyService;
     _staticDataServices = staticDataServices;
     _dialogService      = dialogService;
     _googleLocation     = googleLocationService;
     EditImageCommand    = new DelegateCommand(EditImageAsync);
 }
 public AdvanceFilterPopupViewModel(INavigationService navigationService,
                                    IFitMeetRestService fitMeetRestService,
                                    IPageDialogService dialogService,
                                    IEventAggregator eventAggregator,
                                    IStaticDataService staticDataService) : base(navigationService, fitMeetRestService)
 {
     _eventAggregator   = eventAggregator;
     _staticDataService = staticDataService;
     _dialogService     = dialogService;
 }
示例#10
0
 public TestViewModel(ITestService testService, INavigationService navigationService, IStaticDataService staticDataService)
 {
     _tokenSource       = new CancellationTokenSource();
     _testService       = testService;
     _navigationService = navigationService;
     _staticDataService = staticDataService;
     _dispatcher        = CoreWindow.GetForCurrentThread().Dispatcher;
     _testService.InitializeResources(6, _tokenSource.Token);
     Versions = NotifyTaskCompletionCollection <GameVersion> .Create(LoadVersionsNewAsync(6));
 }
示例#11
0
 public UpdateService(IApiService apiService, IToDoListRepository todoRepository, IStaticDataService staticService, IIndustryJobUpdateService indyService, IAssetUpdateService assetUpdate, IInventionService inventionService, IManufacturingService manufacturingService, IMarketOrderUpdateService marketService, ITransactionService transactionService)
 {
     _apiService = apiService;
     _todoRepository = todoRepository;
     _staticService = staticService;
     _indyService = indyService;
     _assetUpdate = assetUpdate;
     _inventionService = inventionService;
     _manufacturingService = manufacturingService;
     _marketService = marketService;
     _transactionService = transactionService;
 }
示例#12
0
        /// <summary>
        /// Initializes a new instance of the SettingsViewModel
        /// </summary>
        /// <param name="staticDataService">A service implemtation</param>
        public SettingsViewModel(IStaticDataService staticDataService, INavigationService navigationService)
        {
            _tokenSource = new CancellationTokenSource();
            _staticDataService = staticDataService;
            _navigationService = navigationService;

            int displayLanguage = 6;
            AppSettings = ApplicationData.Current.LocalSettings;
            object lang = AppSettings.Values["displayLanguage"];
            if (lang != null)
                displayLanguage = Convert.ToInt32(lang);

            Languages = NotifyTaskCompletionCollection<Language>.Create(LoadLanguagesAsync(displayLanguage), displayLanguage);
        }
示例#13
0
        public ItemFilterBlockViewModel(IStaticDataService staticDataService, IReplaceColorsViewModel replaceColorsViewModel)
        {
            _staticDataService      = staticDataService;
            _replaceColorsViewModel = replaceColorsViewModel;

            CopyBlockStyleCommand        = new RelayCommand(OnCopyBlockStyleCommand);
            PasteBlockStyleCommand       = new RelayCommand(OnPasteBlockStyleCommand);
            ReplaceColorsCommand         = new RelayCommand(OnReplaceColorsCommand);
            AddFilterBlockItemCommand    = new RelayCommand <Type>(OnAddFilterBlockItemCommand);
            ToggleBlockActionCommand     = new RelayCommand(OnToggleBlockActionCommand);
            RemoveFilterBlockItemCommand = new RelayCommand <IItemFilterBlockItem>(OnRemoveFilterBlockItemCommand);
            SwitchBlockItemsViewCommand  = new RelayCommand(OnSwitchBlockItemsViewCommand);
            PlaySoundCommand             = new RelayCommand(OnPlaySoundCommand, () => HasSound);
            PlayPositionalSoundCommand   = new RelayCommand(OnPlayPositionalSoundCommand, () => HasPositionalSound);
        }
示例#14
0
 public TradeSearchService(ILogger logger,
                           ILanguageProvider languageProvider,
                           IHttpClientProvider httpClientProvider,
                           IStaticDataService staticDataService,
                           SidekickSettings configuration,
                           IPoeTradeClient poeTradeClient,
                           INativeBrowser nativeBrowser)
 {
     this.logger             = logger.ForContext(GetType());
     this.languageProvider   = languageProvider;
     this.httpClientProvider = httpClientProvider;
     this.staticDataService  = staticDataService;
     this.configuration      = configuration;
     this.poeTradeClient     = poeTradeClient;
     this.nativeBrowser      = nativeBrowser;
 }
示例#15
0
        /// <summary>
        /// Initializes a new instance of the SettingsViewModel
        /// </summary>
        /// <param name="staticDataService">A service implemtation</param>
        public SettingsViewModel(IStaticDataService staticDataService, INavigationService navigationService)
        {
            _tokenSource       = new CancellationTokenSource();
            _staticDataService = staticDataService;
            _navigationService = navigationService;

            int displayLanguage = 6;

            AppSettings = ApplicationData.Current.LocalSettings;
            object lang = AppSettings.Values["displayLanguage"];

            if (lang != null)
            {
                displayLanguage = Convert.ToInt32(lang);
            }

            Languages = NotifyTaskCompletionCollection <Language> .Create(LoadLanguagesAsync(displayLanguage), displayLanguage);
        }
        public PricePredictionViewModel(
            IOptionsMonitor <ItemSearchOptions> itemSearchOptions,
            IMediator mediator,
            IStaticDataService staticDataService,
            IImageService imageService)
        {
            this.itemSearchOptions = itemSearchOptions;
            this.mediator          = mediator;
            this.staticDataService = staticDataService;
            this.imageService      = imageService;

            this.itemSearchOptions.OnChange(newValue =>
            {
                if (!newValue.PricePredictionEnabled)
                {
                    this.Clear();
                }
            });
        }
示例#17
0
        public PokemonViewModel(IStaticDataService staticDataService, IPokemonService pokemonService, INavigationService navigationService)
        {
            _tokenSource       = new CancellationTokenSource();
            _staticDataService = staticDataService;
            _pokemonService    = pokemonService;
            _navigationService = navigationService;

            var    settings = ApplicationData.Current.LocalSettings;
            object lang     = settings.Values["displayLanguage"];

            if (lang != null)
            {
                _currentLanguage = Convert.ToInt32(lang);
            }
            else
            {
                _currentLanguage = 6;
            }

            ChangeLanguage(new Language {
                Id = _currentLanguage
            });
            Messenger.Default.Register <Language>(this, (language) => ChangeLanguage(language));

            if (IsInDesignMode)
            {
                Versions = NotifyTaskCompletionCollection <GameVersion> .Create(LoadVersionsAsync(_currentLanguage));

                SpeciesList = NotifyTaskCompletionCollection <SpeciesName> .Create(LoadSpeciesAsync(null, _currentLanguage));

                Forms = NotifyTaskCompletionCollection <PokemonForm> .Create(LoadFormsAsync(new SpeciesName {
                    Id = 1
                }, null, _currentLanguage));

                CurrentForm       = NotifyTaskCompletion.Create(LoadFormAsync(1, null, _currentLanguage));
                CurrentMoveSet    = NotifyTaskCompletion.Create(LoadMoveSetAsync(6, null, _currentLanguage));
                CurrentStats      = NotifyTaskCompletion.Create(LoadStatsAsync(6, null, _currentLanguage));
                CurrentEvolutions = NotifyTaskCompletion.Create(LoadEvolutionsAsync(6, null, _currentLanguage));
                CurrentLocations  = NotifyTaskCompletion.Create(LoadLocationsAsync(6, null, _currentLanguage));
            }
        }
示例#18
0
 public PriceViewModel(
     ITradeSearchService tradeSearchService,
     IPoeNinjaCache poeNinjaCache,
     IStaticDataService staticDataService,
     ILanguageProvider languageProvider,
     IPoePriceInfoClient poePriceInfoClient,
     INativeClipboard nativeClipboard,
     IParserService parserService,
     SidekickSettings settings,
     IStatDataService statDataService)
 {
     this.tradeSearchService = tradeSearchService;
     this.poeNinjaCache      = poeNinjaCache;
     this.staticDataService  = staticDataService;
     this.languageProvider   = languageProvider;
     this.poePriceInfoClient = poePriceInfoClient;
     this.nativeClipboard    = nativeClipboard;
     this.parserService      = parserService;
     this.settings           = settings;
     this.statDataService    = statDataService;
     Task.Run(Initialize);
 }
示例#19
0
        public ViewModel(IStaticDataService staticDataService)
        {
            TokenSource        = new CancellationTokenSource();
            _staticDataService = staticDataService;

            var    settings = ApplicationData.Current.LocalSettings;
            object lang     = settings.Values["displayLanguage"];

            if (lang != null)
            {
                CurrentLanguage = Convert.ToInt32(lang);
            }
            else
            {
                CurrentLanguage = 6;
            }
            object version   = settings.Values["currentVersion"];
            int    versionId = 0;

            if (version != null)
            {
                versionId = Convert.ToInt32(version);
            }

            Messenger.Default.Register <Language>(this, (language) => ChangeLanguage(language));
            Messenger.Default.Register <GameVersion>(this, (gameVersion) => ChangeVersion(gameVersion));
            ChangeLanguage(new Language {
                Id = CurrentLanguage
            });
            if (versionId > 0)
            {
                Task.Run(async() =>
                {
                    GameVersion newVersion = await LoadVersionAsync(Convert.ToInt32(versionId), CurrentLanguage);
                    ChangeVersion(newVersion);
                });
            }
        }
        public ItemFilterBlockViewModel(IStaticDataService staticDataService, IReplaceColorsViewModel replaceColorsViewModel)
        {
            _staticDataService      = staticDataService;
            _replaceColorsViewModel = replaceColorsViewModel;

            CopyBlockCommand             = new RelayCommand(OnCopyBlockCommand);
            PasteBlockCommand            = new RelayCommand(OnPasteBlockCommand);
            CopyBlockStyleCommand        = new RelayCommand(OnCopyBlockStyleCommand);
            PasteBlockStyleCommand       = new RelayCommand(OnPasteBlockStyleCommand);
            AddBlockCommand              = new RelayCommand(OnAddBlockCommand);
            AddSectionCommand            = new RelayCommand(OnAddSectionCommand);
            DeleteBlockCommand           = new RelayCommand(OnDeleteBlockCommand);
            MoveBlockUpCommand           = new RelayCommand(OnMoveBlockUpCommand);
            MoveBlockDownCommand         = new RelayCommand(OnMoveBlockDownCommand);
            MoveBlockToTopCommand        = new RelayCommand(OnMoveBlockToTopCommand);
            MoveBlockToBottomCommand     = new RelayCommand(OnMoveBlockToBottomCommand);
            ReplaceColorsCommand         = new RelayCommand(OnReplaceColorsCommand);
            AddFilterBlockItemCommand    = new RelayCommand <Type>(OnAddFilterBlockItemCommand);
            ToggleBlockActionCommand     = new RelayCommand(OnToggleBlockActionCommand);
            RemoveFilterBlockItemCommand = new RelayCommand <IItemFilterBlockItem>(OnRemoveFilterBlockItemCommand);
            SwitchBlockItemsViewCommand  = new RelayCommand(OnSwitchBlockItemsViewCommand);
            PlaySoundCommand             = new RelayCommand(OnPlaySoundCommand, () => HasSound);
        }
        public ItemFilterBlockViewModel(IStaticDataService staticDataService, IReplaceColorsViewModel replaceColorsViewModel)
        {
            _staticDataService = staticDataService;
            _replaceColorsViewModel = replaceColorsViewModel;

            CopyBlockCommand = new RelayCommand(OnCopyBlockCommand);
            PasteBlockCommand = new RelayCommand(OnPasteBlockCommand);
            CopyBlockStyleCommand = new RelayCommand(OnCopyBlockStyleCommand);
            PasteBlockStyleCommand = new RelayCommand(OnPasteBlockStyleCommand);
            AddBlockCommand = new RelayCommand(OnAddBlockCommand);
            AddSectionCommand = new RelayCommand(OnAddSectionCommand);
            DeleteBlockCommand = new RelayCommand(OnDeleteBlockCommand);
            MoveBlockUpCommand = new RelayCommand(OnMoveBlockUpCommand);
            MoveBlockDownCommand = new RelayCommand(OnMoveBlockDownCommand);
            MoveBlockToTopCommand = new RelayCommand(OnMoveBlockToTopCommand);
            MoveBlockToBottomCommand = new RelayCommand(OnMoveBlockToBottomCommand);
            ReplaceColorsCommand = new RelayCommand(OnReplaceColorsCommand);
            AddFilterBlockItemCommand = new RelayCommand<Type>(OnAddFilterBlockItemCommand);
            ToggleBlockActionCommand = new RelayCommand(OnToggleBlockActionCommand);
            AddAudioVisualBlockItemCommand = new RelayCommand<Type>(OnAddAudioVisualBlockItemCommand);
            RemoveFilterBlockItemCommand = new RelayCommand<IItemFilterBlockItem>(OnRemoveFilterBlockItemCommand);
            SwitchBlockItemsViewCommand = new RelayCommand(OnSwitchBlockItemsViewCommand);
            PlaySoundCommand = new RelayCommand(OnPlaySoundCommand, () => HasSound);
        }
示例#22
0
 public StaticDataServiceTests()
 {
     this.service = StaticDataServiceFactory.Create();
 }
示例#23
0
        public PokemonViewModel(IStaticDataService staticDataService, IPokemonService pokemonService, INavigationService navigationService)
        {
            _tokenSource = new CancellationTokenSource();
            _staticDataService = staticDataService;
            _pokemonService = pokemonService;
            _navigationService = navigationService;

            var settings = ApplicationData.Current.LocalSettings;
            object lang = settings.Values["displayLanguage"];
            if (lang != null)
                _currentLanguage = Convert.ToInt32(lang);
            else
                _currentLanguage = 6;

            ChangeLanguage(new Language { Id = _currentLanguage });
            Messenger.Default.Register<Language>(this, (language) => ChangeLanguage(language));

            if (IsInDesignMode)
            {
                Versions = NotifyTaskCompletionCollection<GameVersion>.Create(LoadVersionsAsync(_currentLanguage));
                SpeciesList = NotifyTaskCompletionCollection<SpeciesName>.Create(LoadSpeciesAsync(null, _currentLanguage));
                Forms = NotifyTaskCompletionCollection<PokemonForm>.Create(LoadFormsAsync(new SpeciesName { Id = 1 }, null, _currentLanguage));
                CurrentForm = NotifyTaskCompletion.Create(LoadFormAsync(1, null, _currentLanguage));
                CurrentMoveSet = NotifyTaskCompletion.Create(LoadMoveSetAsync(6, null, _currentLanguage));
                CurrentStats = NotifyTaskCompletion.Create(LoadStatsAsync(6, null, _currentLanguage));
                CurrentEvolutions = NotifyTaskCompletion.Create(LoadEvolutionsAsync(6, null, _currentLanguage));
                CurrentLocations = NotifyTaskCompletion.Create(LoadLocationsAsync(6, null, _currentLanguage));
            }
        }
示例#24
0
 public ItemToExchangeQueryRequestMapper(IStaticDataService staticDataService, IOptionsMonitor <ItemSearchOptions> itemSearchOptions)
 {
     this.staticItemDataService = staticDataService;
     this.itemSearchOptions     = itemSearchOptions;
 }
示例#25
0
 public StaticDataController(IStaticDataService service)
 {
     this.service = service;
 }
示例#26
0
 public InventionService(IApiService apiService, IManufacturingService manufacturingService, IStaticDataService staticService)
 {
     _apiService = apiService;
     _manufacturingService = manufacturingService;
     _staticService = staticService;
 }
示例#27
0
 public TestViewModel(ITestService testService, INavigationService navigationService, IStaticDataService staticDataService)
 {
     _tokenSource = new CancellationTokenSource();
     _testService = testService;
     _navigationService = navigationService;
     _staticDataService = staticDataService;
     _dispatcher = CoreWindow.GetForCurrentThread().Dispatcher;
     _testService.InitializeResources(6, _tokenSource.Token);
     Versions = NotifyTaskCompletionCollection<GameVersion>.Create(LoadVersionsNewAsync(6));
 }
示例#28
0
 public ToDoListController(IToDoListService service, IStaticDataService staticService)
 {
     _service = service;
     _staticService = staticService;
 }
示例#29
0
 public PriceService(IApiService apiService, IStaticDataService dataService, IBlueprintRepository blueprintRepository)
 {
     _apiService = apiService;
     _dataService = dataService;
     _blueprintRepository = blueprintRepository;
 }
示例#30
0
 public AbilityViewModel(INavigationService navigationService, IPokemonService pokemonService, IStaticDataService staticDataService) : base(staticDataService)
 {
     _tokenSource       = new CancellationTokenSource();
     _navigationService = navigationService;
     _pokemonService    = pokemonService;
     _cachedAbilityId   = 1;
 }
 public PriceViewModelFactory(IStaticDataService staticItemDataService, IImageService imageService)
 {
     this.staticDataService = staticItemDataService;
     this.imageService      = imageService;
 }