This repository has been archived by the owner on Feb 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
tobiichiamane
committed
Apr 12, 2019
1 parent
191aa4e
commit 558d295
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace PixivFSUWP.Data | ||
{ | ||
public class WaterfallItem | ||
{ | ||
public int Id { get; set; } | ||
public string Title { get; set; } | ||
public string Author { get; set; } | ||
public string ImageUri { get; set; } | ||
public int Stars { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using PixivFSUWP.Data; | ||
|
||
namespace PixivFSUWP.ViewModels | ||
{ | ||
public class WaterfallItemViewModel | ||
{ | ||
public int ItemId { get; private set; } | ||
public string Title { get; set; } | ||
public string Author { get; set; } | ||
public string ImageUri { get; set; } | ||
public int Stars { get; set; } | ||
|
||
public string GetStarsString() => Stars.ToString(); | ||
|
||
public static WaterfallItemViewModel FromItem(WaterfallItem Item) | ||
=> new WaterfallItemViewModel() | ||
{ | ||
ItemId = Item.Id, | ||
Title = Item.Title, | ||
Author = Item.Author, | ||
ImageUri = Item.ImageUri, | ||
Stars = Item.Stars | ||
}; | ||
} | ||
} |