Exemplo n.º 1
0
 public RankingViewModel(RankingMode mode, IImageStoreService imageStoreService,
                         INavigationService navigationService)
 {
     RankingMode       = mode;
     ImageStoreService = imageStoreService;
     NavigationService = navigationService;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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);
        }
Exemplo n.º 4
0
 public Handler(
     IRepository <Product> productRepository,
     IRepository <Categories.Category> categoryRepository,
     IImageStoreService imageStoreService,
     IHtmlSanitizer htmlSanitizer)
 {
     _productRepository  = productRepository;
     _categoryRepository = categoryRepository;
     _imageStoreService  = imageStoreService;
     _htmlSanitizer      = htmlSanitizer;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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>();
 }
Exemplo n.º 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>();
 }
Exemplo n.º 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;
 }
Exemplo n.º 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);
 }
Exemplo n.º 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
            });
        }
Exemplo n.º 12
0
 public PixivMangaImage(IIllust illust, int index, IImageStoreService imageStoreService)
 {
     _illust            = illust;
     _index             = index;
     _imageStoreService = imageStoreService;
 }
Exemplo n.º 13
0
 public PixivNovel(INovel novel, IImageStoreService imageStoreService)
 {
     _novel             = novel;
     _imageStoreService = imageStoreService;
 }
Exemplo n.º 14
0
 public IllustViewPageViewModel(ICategoryService categoryService, IImageStoreService imageStoreService)
 {
     _categoryService   = categoryService;
     _imageStoreService = imageStoreService;
 }
Exemplo n.º 15
0
 public MangaViewPageViewModel(ICategoryService categoryService, IImageStoreService imageStoreService)
 {
     _categoryService   = categoryService;
     _imageStoreService = imageStoreService;
     MangaPages         = new ObservableCollection <PixivMangaImageViewModel>();
 }
Exemplo n.º 16
0
 public PixivUserImage(IUserBase user, IImageStoreService imageStoreService)
 {
     _user = user;
     _imageStoreService = imageStoreService;
 }
Exemplo n.º 17
0
 public PixivUrlImage(string url, IImageStoreService imageStoreService)
 {
     _url = url;
     _imageStoreService = imageStoreService;
 }
Exemplo n.º 18
0
 public PixivMangaImageViewModel(IIllust illust, int index, IImageStoreService imageStoreService)
 {
     ThumbnailPath = PyxisConstants.DummyImage;
     Thumbnailable = new PixivMangaImage(illust, index, imageStoreService);
 }
Exemplo n.º 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);
        }