public ViewModelFactory(IProviderSet providerSet, IWindowFactory windowFactory, IDbContext dbContext, ThemeHelper themeHelper, Logger logger, IPluginHost pluginHost) { _dbContext = dbContext; _providerSet = providerSet; _windowFactory = windowFactory; _themeHelper = themeHelper; _logger = logger; _pluginHost = pluginHost; }
public AdvancedViewModel(IProviderSet providerService, IDbContext dbContext) { _dbContext = dbContext; Manga = new Manga(); DeleteGenreCommand = new ActionCommand(DeleteGenre); AddGenreCommand = new ActionCommand(AddGenre); AddMangaCommand = new ActionCommand(AddManga); GenresAdded = new ReadOnlyObservableCollection <Genre>(_genres); SelectedGenre = Genres[0]; Sites = providerService.GetAll.Select(p => p.DbName).ToList(); Sites?.Add("Backlog"); SiteSelected = Sites?[0]; }
public MangaListViewModel(IProviderSet providerService, IWindowFactory windowFactory, IDbContext dbContext) { _providerService = providerService; _dbContext = dbContext; _windowFactory = windowFactory; SetupSites(); //_dbContext.SettingEvent += DatabaseOnSettingEvent; Mangas = new ReadOnlyObservableCollection <Manga>(_mangas); Sites = new ReadOnlyObservableCollection <SiteListItem>(_sites); IncreaseCommand = new ActionCommand(IncreaseChapter); DecreaseCommand = new ActionCommand(DecreaseChapter); DeleteCommand = new ActionCommand(DeleteManga); OpenMangaCommand = new ActionCommand(OpenMangaSite); RefreshCommand = new ActionCommand(async() => await RefreshManga()); ViewerCommand = new ActionCommand(ViewManga); DeselectCommand = new ActionCommand(() => { SelectedManga = null; }); RefreshListCommand = new ActionCommand(() => FillMangaList(SelectedSite.Name)); EditCommand = new ActionCommand(EditManga); }
public AddMangaViewModel(IProviderSet providerService, IDbContext dbContext) { NormalDataContext = new NormalViewModel(); NormalCommand = new ActionCommand(() => { if (TranIndex == 0) { return; } TranIndex = 0; NormalDataContext = new NormalViewModel(); }); AdvancedCommand = new ActionCommand(() => { if (TranIndex == 1) { return; } TranIndex = 1; AdvancedDataContext = new AdvancedViewModel(providerService, dbContext); }); }
public LinkParser(IProviderSet providerSet) { _providerSet = providerSet; //GetProviderFirstOrDefault(p => p.LinkIsMatch("test")); }
public ProviderService(IProviderSet providerSet, IDbContext dbContext, Logger logger) { Providers = providerSet.GetAll; _dbContext = dbContext; _logger = logger; }