// public FileListViewModel(IFileService fileService, IAnimeService animeService) { _fileService = fileService; _animeService = animeService; SelectionChangedCommand = new RelayCommand <IList>(items => { if (items == null) { return; } SelectedFiles = items.Cast <AnimeFile>().ToList(); }); // MoveCommand = new RelayCommand(Move); DeleteCommand = new RelayCommand(Delete); ProfileCommand = new RelayCommand(Profile); OpenCommand = new RelayCommand(Open); CopyCommand = new RelayCommand(() => { Clipboard.Clear(); Clipboard.SetText(string.Join(", ", SelectedFiles.Select(c => c.StrippedFilename))); }); ClearFilterCommand = new RelayCommand(() => Filter = ""); FolderCommand = new RelayCommand(() => Process.Start(StartPath)); MalCommand = new RelayCommand(MyAnimeListProfile); }
public NyaaPantsuService(ISettingsRepository settingsRepository, IAnimeRepository animeRepository, IAnimeService animeService) { SettingsRepository = settingsRepository; AnimeRepository = animeRepository; AnimeService = animeService; Downloader = new WebClient(); }
public HorribleSubsService(ISettingsRepository settingsRepository, IAnimeRepository animeRepository, IAnimeService animeService) { SettingsRepository = settingsRepository; AnimeRepository = animeRepository; AnimeService = animeService; Downloader = new WebClient(); }
public AnimeViewModel(IAnimeService animeService) : base() { _animeService = animeService; _animeAPIEnumerator = new AnimeApiEnumerator(); BindingOperations.EnableCollectionSynchronization(AnimeItems, _CollectionLock); }
public UpdateAnimeTable( IAnimeService animeService, ILogger <UpdateAnimeTable> logger ) { _animeService = animeService; _logger = logger; }
public TrendingViewModel(IAnimeService animeService) { _animeService = animeService; GetTrendings(); FilterCommand = new Command(ApplyFilter); IsNotConnected = Connectivity.NetworkAccess != NetworkAccess.Internet; Connectivity.ConnectivityChanged += Connectivity_ConnectivityChanged; }
public OutputViewModel(ISettingsRepository settings, IFileService fileService, IAnimeService animeService, IDownloadService downloadService) { _settings = settings; _fileService = fileService; _animeService = animeService; _downloadService = downloadService; }
// public ManageViewModel(ISettingsRepository settings, IFileService fileService, IAnimeService animeService) { _settings = settings; _fileService = fileService; _animeService = animeService; _settings.PathConfig.PropertyChanged += (sender, args) => LoadFolders(); LoadFolders(); }
// public DiscoverViewModel(IFindSeasonAnimeService findService, IAnimeService animeService) { _findService = findService; _animeService = animeService; AddCommand = new RelayCommand(Add); MessengerInstance.Register <ViewRequest>(this, HandleViewAction); }
// public DetailsViewModel(IAnimeRepository animeRepository, ISettingsRepository settingsRepository, IAnimeService animeService) { AnimeRepository = animeRepository; SettingsRepository = settingsRepository; _animeService = animeService; // Behaviors that are the same no matter what condition ClearSubgroupCommand = new RelayCommand(() => Anime.PreferredSubgroup = null); }
/// <summary> /// 根据分片条目创建媒体来源 /// </summary> /// <param name="video">视频</param> /// <param name="audio">音频</param> /// <returns></returns> public async static Task <MediaSource> CreateMediaSourceAsync(this IAnimeService animeService, VideoDashItem video, VideoDashItem audio) { try { HttpClient httpClient = new HttpClient(); httpClient.DefaultRequestHeaders.Referer = new Uri("https://www.bilibili.com"); httpClient.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"); var mpdStr = $@"<MPD xmlns=""urn:mpeg:DASH:schema:MPD:2011"" profiles=""urn:mpeg:dash:profile:isoff-on-demand:2011"" type=""static""> <Period start=""PT0S""> <AdaptationSet> <ContentComponent contentType=""video"" id=""1"" /> <Representation bandwidth=""{video.bandwidth}"" codecs=""{video.codecs}"" height=""{video.height}"" id=""{video.id}"" mimeType=""{video.mimeType}"" width=""{video.width}""> <BaseURL></BaseURL> <SegmentBase indexRange=""{video.SegmentBase.indexRange}""> <Initialization range=""{video.SegmentBase.Initialization}"" /> </SegmentBase> </Representation> </AdaptationSet> {{audio}} </Period> </MPD> "; if (audio == null) { mpdStr = mpdStr.Replace("{audio}", ""); } else { mpdStr = mpdStr.Replace("{audio}", $@"<AdaptationSet> <ContentComponent contentType=""audio"" id=""2"" /> <Representation bandwidth=""{audio.bandwidth}"" codecs=""{audio.codecs}"" id=""{audio.id}"" mimeType=""{audio.mimeType}"" > <BaseURL></BaseURL> <SegmentBase indexRange=""{audio.SegmentBase.indexRange}""> <Initialization range=""{audio.SegmentBase.Initialization}"" /> </SegmentBase> </Representation> </AdaptationSet>"); } var stream = new MemoryStream(Encoding.UTF8.GetBytes(mpdStr)).AsInputStream(); var soure = await AdaptiveMediaSource.CreateFromStreamAsync(stream, new Uri(video.baseUrl), "application/dash+xml", httpClient); var s = soure.Status; soure.MediaSource.DownloadRequested += (sender, args) => { if (args.ResourceContentType == "audio/mp4" && audio != null) { args.Result.ResourceUri = new Uri(audio.baseUrl); } }; return(MediaSource.CreateFromAdaptiveMediaSource(soure.MediaSource)); } catch (Exception) { return(null); } }
public SettingsViewModel(IAnimeService animeService, IMangaService mangaService, IRunJobs <DWOneImportJob> dwOneImportJob, IRunJobs <UpdateDbEntries> updateDbEntriesJob, IDefineCanvasRoutines <Chart> canvasRoutines) { this.animeService = animeService; this.mangaService = mangaService; this.dwOneImportJob = dwOneImportJob; this.updateDbEntriesJob = updateDbEntriesJob; this.canvasRoutines = canvasRoutines; LogEvent.LogLineReceived += LogLineReceivedFunc; }
// public AnimeListViewModel(ISettingsRepository settings, IAnimeService animeService) { _animeService = animeService; Settings = settings; // Find = new FindViewModel(); Find.PropertyChanged += (sender, args) => { if (args.PropertyName.Equals("Text")) { if (Find.Text.Equals("")) { Animes = new ObservableCollection <Anime>(_animeService.FilteredAndSorted()); } else { Animes = new ObservableCollection <Anime>( _animeService.FilteredAndSorted().Where( a => a.Name.ToLower().Contains(Find.Text.ToLower()))); } } }; FilterText = Settings.FilterBy; Animes = new ObservableCollection <Anime>(_animeService.FilteredAndSorted()); // SelectionChangedCommand = new RelayCommand <IList>(items => { if (items == null) { return; } SelectedAnimes = items.Cast <Anime>().ToList(); }); FindToggleCommand = new RelayCommand(() => Find.Toggle()); AddCommand = new RelayCommand(Add); AddMultipleCommand = new RelayCommand(AddMultiple); EditCommand = new RelayCommand(Edit); DeleteCommand = new RelayCommand(Delete); SearchCommand = new RelayCommand(Search); CopyCommand = new RelayCommand(() => { Clipboard.Clear(); Clipboard.SetText(string.Join(", ", SelectedAnimes.Select(c => c.Title))); }); }
public AnimeController( IAnimeService animeService, IBookmarkService bookmarkService, IEpisodeService episodeService, IMapper mapper ) { _animeService = animeService; _bookmarkService = bookmarkService; _episodeService = episodeService; _mapper = mapper; }
public CartController(IAccountService _accountService, IProductService _productService, IImageService _imageService, IManufactorService _manufactorService, ICategoryService _categoryService, IAnimeService _animeService, ITagService _tagService, IOrderProductService _orderProductService, IOrderService _orderService) { this._accountService = _accountService; this._productService = _productService; this._imageService = _imageService; this._manufactorService = _manufactorService; this._categoryService = _categoryService; this._animeService = _animeService; this._orderProductService = _orderProductService; this._orderService = _orderService; }
public HomeController( IAnimeService animeService, IUpdateService updateService, IAnimeReccomendationsService animeReccomendationsService, UserManager <ApplicationUser> userManager, IMangaService mangaService) { this.animeService = animeService; this.updateService = updateService; this.animeReccomendationsService = animeReccomendationsService; this.userManager = userManager; this.mangaService = mangaService; }
public void Init() { _settings = new MockXmlSettingsService { MyAnimeListConfig = new MyAnimeListConfiguration { Username = Credentials.MyAnimeListName, Password = Credentials.MyAnimeListPassword } }; _api = new MyAnimeListApi(_settings); _animes = new MockAnimeService(); _mal = new MyAnimeListService(_api, _animes); }
public BiliBiliClient( TokenPackage tokenPackage, IAccountService accountService, IChannelService channelService, ITopicService topicService, IVideoService videoService, IAnimeService animeService) { BiliTool._accessToken = tokenPackage.AccessToken; Account = accountService; Channel = channelService; Topic = topicService; Video = videoService; Anime = animeService; }
public MiscViewModel(ICredentialsRepository credentialsRepository, IAnimeRepository animeRepository, IAnimeService animeService, IDetailProviderService detailService, IFileService fileService, ISettingsRepository settingsRepository) { _credentialsRepository = credentialsRepository; _animeRepository = animeRepository; _animeService = animeService; _detailService = detailService; _fileService = fileService; _settingsRepository = settingsRepository; SelectedIndex = 0; SubmitCommand = new RelayCommand(DoAction, () => !DoingAction); // }
public AdminController(IAccountService _accountService, IProductService _productService, IImageService _imageService, IManufactorService _manufactorService, ICategoryService _categoryService, IAnimeService _animeService, IStatusService _statusService , IBlogService _blogService, IProductTagService _productTagService, ITagService _tagService, IWebsiteAttributeService _websiteAttributeService , IMessageSendingService _messageSendingService, IFAQService _faqService) { this._accountService = _accountService; this._productService = _productService; this._imageService = _imageService; this._manufactorService = _manufactorService; this._categoryService = _categoryService; this._animeService = _animeService; this._statusService = _statusService; this._blogService = _blogService; this._productTagService = _productTagService; this._tagService = _tagService; this._websiteAttributeService = _websiteAttributeService; this._messageSendingService = _messageSendingService; this._faqService = _faqService; }
public WebViewModel(ICredentialsRepository credentialsRepository, IAnimeRepository animeRepository, IAnimeService animeService, ISyncProviderService syncService, IMyAnimeListApi api, IDownloadService downloadService) { DownloadService = downloadService; _credentialsRepository = credentialsRepository; _animeRepository = animeRepository; _animeService = animeService; _syncService = syncService; _api = api; // SetCommands(); CheckSyncAndLog(); MessengerInstance.Register <Request>(this, HandleRequest); MessengerInstance.Register <ViewRequest>(this, HandleViewAction); }
public AnimeController(IAnimeService animeService, ILoggingService loggingService) : base(loggingService) { this.animeService = animeService; }
public AnimeController(ILogger <AnimeController> logger, IAnimeService animeService) { _logger = logger; _animeService = animeService; }
public AnimesController(IAnimeService animeservice) { _animeservice = animeservice; }
// コンストラクタインジェクション例。 public AnimeListController(IAnimeService animeService) { AnimeService = animeService; }
public AnimesController(IAnimeService service) => _service = service;
// public DetailsMultipleViewModel(IAnimeService animeService) => _animeService = animeService;
public IndexController(IAnimeService animeService) { _animeService = animeService; }
// public MyAnimeListService(IMyAnimeListApi api, IAnimeService anime) { _api = api; _anime = anime; }
public AnimesController(IAnimeService animeService, IMapper mapper) { _animeService = animeService; _mapper = mapper; }