Esempio n. 1
0
        public GirlsPageViewModel(IGankApiService gankApiService, IRegionManager regionManager)
        {
            this.regionManager = regionManager;
            PostCollectionSource source = new PostCollectionSource(gankApiService, Category.Girl, "Girl");

            this.posts = new IncrementalLoadingCollection <PostCollectionSource, Post>(source, 20);

            HandleImageItemClickCmd = new DelegateCommand <Post>(HandleImageItemClick, (item) => !String.IsNullOrEmpty(item.Url));
        }
 public PostCollectionViewModel(IGankApiService gankApiService, IRegionManager regionManager)
 {
     this.gankApiService          = gankApiService;
     this.regionManager           = regionManager;
     HandleSelectedTypeChangedCmd = new DelegateCommand <TypedPosts>(
         HandleSelectedChanged,
         (TypedPosts _selectedItem) => SelectedItem.Type != _selectedItem.Type
         );
     HandlePostItemClickedCmd = new DelegateCommand <Post>(HandlePostItemClicked);
 }
Esempio n. 3
0
        public TypedPosts(IGankApiService gankApiService, Category category, SubType type)
        {
            this.category = category;
            this.type     = type.Type;
            this.title    = type.Title;

            PostCollectionSource source = new PostCollectionSource(gankApiService, category, this.type);

            this.posts = new IncrementalLoadingCollection <PostCollectionSource, Post>(source, 20);
        }
Esempio n. 4
0
 public PostCollectionSource(IGankApiService gankApiService, Category category, string type)
 {
     this.gankApiService = gankApiService;
     this.category       = category;
     this.type           = type;
 }
Esempio n. 5
0
 public GanHuoPageViewModel(IGankApiService gankApiService, IRegionManager regionManager)
     : base(gankApiService, regionManager)
 {
     _ = this.Initialize(Category.GanHuo);
 }
Esempio n. 6
0
 public ArticlesPageViewModel(IGankApiService gankApiService, IRegionManager regionManager)
     : base(gankApiService, regionManager)
 {
     _ = this.Initialize(Category.Article);
 }