Пример #1
0
 public RankingViewModel(RankingMode mode, IImageStoreService imageStoreService,
                         INavigationService navigationService)
 {
     RankingMode       = mode;
     ImageStoreService = imageStoreService;
     NavigationService = navigationService;
 }
Пример #2
0
 /// <summary>
 /// </summary>
 /// <param name="illust"></param>
 /// <param name="imageStoreService"></param>
 /// <param name="isRaw">オリジナルサイズを取得</param>
 /// <param name="isShadow"><code>isRaw = true</code>の際、シャドウデータを表示</param>
 public PixivImage(IIllust illust, IImageStoreService imageStoreService, bool isRaw = false, bool isShadow = true)
 {
     _illust            = illust;
     _imageStoreService = imageStoreService;
     _isRaw             = isRaw;
     _isShadow          = isShadow;
 }
Пример #3
0
        public RankingNovelViewModel(INovel novel, RankingMode mode, IImageStoreService imageStoreService,
                                     INavigationService navigationService)
            : base(mode, imageStoreService, navigationService)
        {
            Title = novel.Title;

            ThumbnailPath = PyxisConstants.DummyImage;
            Thumbnailable = new PixivNovel(novel, imageStoreService);
        }
Пример #4
0
 public Handler(
     IRepository <Product> productRepository,
     IRepository <Categories.Category> categoryRepository,
     IImageStoreService imageStoreService,
     IHtmlSanitizer htmlSanitizer)
 {
     _productRepository  = productRepository;
     _categoryRepository = categoryRepository;
     _imageStoreService  = imageStoreService;
     _htmlSanitizer      = htmlSanitizer;
 }
Пример #5
0
 public AccountService(
     UserManager<User> userManager,
     SignInManager<User> signInManager,
     IDatabaseRepository<User> userRepository,
     IImageStoreService imageStoreService)
 {
     this.userManager = userManager;
     this.signInManager = signInManager;
     this.userRepository = userRepository;
     this.imageStoreService = imageStoreService;
 }
Пример #6
0
 public FollowingMainPageViewModel(IAccountService accountService, ICategoryService categoryService,
                                   IImageStoreService imageStoreService, INavigationService navigationService,
                                   IPixivClient pixivClient, IQueryCacheService queryCacheService)
 {
     _accountService    = accountService;
     _categoryService   = categoryService;
     _imageStoreService = imageStoreService;
     NavigationService  = navigationService;
     _pixivClient       = pixivClient;
     _queryCacheService = queryCacheService;
     FollowingUsers     = new IncrementalObservableCollection <TappableThumbnailViewModel>();
 }
Пример #7
0
 public UserDetailPageViewModel(IAccountService accountService, ICategoryService categoryService,
                                IImageStoreService imageStoreService, INavigationService navigationService,
                                IPixivClient pixivClient, IQueryCacheService queryCacheService)
 {
     _accountService    = accountService;
     _categoryService   = categoryService;
     _imageStoreService = imageStoreService;
     NavigationService  = navigationService;
     _pixivClient       = pixivClient;
     _queryCacheService = queryCacheService;
     ThumbnailPath      = PyxisConstants.DummyIcon;
 }
 public UserDetailCollectionPageViewModel(IAccountService accountService, ICategoryService categoryService,
                                          IImageStoreService imageStoreService,
                                          INavigationService navigationService, IPixivClient pixivClient, IQueryCacheService queryCacheService)
 {
     _accountService    = accountService;
     _categoryService   = categoryService;
     _imageStoreService = imageStoreService;
     NavigationService  = navigationService;
     _pixivClient       = pixivClient;
     _queryCacheService = queryCacheService;
     ThumbnailPath      = PyxisConstants.DummyIcon;
     Collection         = new IncrementalObservableCollection <ThumbnailableViewModel>();
 }
Пример #9
0
 public NovelDetailPageViewModel(IAccountService accountService, IBrowsingHistoryService browsingHistoryService,
                                 ICategoryService categoryService, IImageStoreService imageStoreService,
                                 INavigationService navigationService, IPixivClient pixivClient, IQueryCacheService queryCacheService)
 {
     _accountService         = accountService;
     _browsingHistoryService = browsingHistoryService;
     _categoryService        = categoryService;
     _imageStoreService      = imageStoreService;
     _navigationService      = navigationService;
     _pixivClient            = pixivClient;
     _queryCacheService      = queryCacheService;
     Tags          = new ObservableCollection <PixivTagViewModel>();
     Comments      = new ObservableCollection <PixivCommentViewModel>();
     ThumbnailPath = PyxisConstants.DummyImage;
     IconPath      = PyxisConstants.DummyIcon;
 }
Пример #10
0
 public AccountInfoControlViewModel(IAccountService accountService, IImageStoreService imageStoreService)
 {
     _accountService    = accountService;
     _imageStoreService = imageStoreService;
     _resource          = ResourceLoader.GetForCurrentView();
     Username           = _resource.GetString("NotLoggedIn/Text");
     _disposable        = Observable.Timer(TimeSpan.Zero, TimeSpan.FromSeconds(1))
                          .ObserveOnUIDispatcher()
                          .Subscribe(w =>
     {
         if (_accountService.IsLoggedIn)
         {
             LoggedIn();
         }
         else
         {
             LoggedOut();
         }
     }).AddTo(this);
 }
Пример #11
0
        public async Task UploadImage(IImageStoreService imageService, Stream fileStream, string extension)
        {
            if (imageService == null)
            {
                throw new ArgumentNullException(nameof(imageService));
            }

            if (fileStream == null)
            {
                throw new ArgumentNullException(nameof(fileStream));
            }

            if (string.IsNullOrEmpty(extension))
            {
                throw new ArgumentNullException(nameof(extension));
            }

            var path = await imageService.SaveImage(fileStream, CategoryId.ToString(), $"{Id.ToString()}.{extension}");

            Update(new ImageUploaded {
                ImagePath = path
            });
        }
Пример #12
0
 public PixivMangaImage(IIllust illust, int index, IImageStoreService imageStoreService)
 {
     _illust            = illust;
     _index             = index;
     _imageStoreService = imageStoreService;
 }
Пример #13
0
 public PixivNovel(INovel novel, IImageStoreService imageStoreService)
 {
     _novel             = novel;
     _imageStoreService = imageStoreService;
 }
Пример #14
0
 public IllustViewPageViewModel(ICategoryService categoryService, IImageStoreService imageStoreService)
 {
     _categoryService   = categoryService;
     _imageStoreService = imageStoreService;
 }
Пример #15
0
 public MangaViewPageViewModel(ICategoryService categoryService, IImageStoreService imageStoreService)
 {
     _categoryService   = categoryService;
     _imageStoreService = imageStoreService;
     MangaPages         = new ObservableCollection <PixivMangaImageViewModel>();
 }
Пример #16
0
 public PixivUserImage(IUserBase user, IImageStoreService imageStoreService)
 {
     _user = user;
     _imageStoreService = imageStoreService;
 }
Пример #17
0
 public PixivUrlImage(string url, IImageStoreService imageStoreService)
 {
     _url = url;
     _imageStoreService = imageStoreService;
 }
Пример #18
0
 public PixivMangaImageViewModel(IIllust illust, int index, IImageStoreService imageStoreService)
 {
     ThumbnailPath = PyxisConstants.DummyImage;
     Thumbnailable = new PixivMangaImage(illust, index, imageStoreService);
 }
Пример #19
0
        public RankingImageViewModel(IIllust illust, RankingMode mode, ContentType contentType, IImageStoreService imageStoreService,
                                     INavigationService navigationService)
            : base(mode, imageStoreService, navigationService)
        {
            _illust      = illust;
            _contentType = contentType;
            Title        = _illust.Title;

            ThumbnailPath = PyxisConstants.DummyImage;
            Thumbnailable = new PixivImage(_illust, imageStoreService);
        }