C# Class MALClient.XShared.ViewModels.Main.AnimeListViewModel

Inheritance: ViewModelBase
Afficher le fichier Open project: Mordonus/MALClient

Méthodes publiques

Свойство Type Description
CanAddScrollHandler bool
CurrentSeason MALClient.Models.Models.Anime.AnimeSeason

Méthodes publiques

Méthode Description
AddAnimeEntry ( AnimeItemAbstraction parentAbstraction ) : void
AnimeListViewModel ( ) : System
FetchData ( bool force = false, AnimeListWorkModes modeOverride = null ) : System.Threading.Tasks.Task
GetDesiredStatus ( ) : AnimeStatus
IndefiniteScrollViewerOnViewChanging ( double finalVerticalOffset ) : void

Event handler for event fired by one of two scroll viewrs in List and Grid view mode. It loads more items as user is scroling further.

Init ( AnimeListPageNavigationArgs args ) : void
LogIn ( ) : void
LogOut ( ) : void
OnNavigatedFrom ( ) : void
RefreshList ( bool searchSource = false, bool fakeDelay = false ) : void

Main refresh function

RemoveAnimeEntry ( AnimeItemAbstraction parentAbstraction ) : void
ScrollToTop ( ) : void

Scrolls to top of current indefinite scroll viewer.

SetSortOrder ( SortOptions option ) : void

Sets provided sort mode or takes one from settings

TryRetrieveAuthenticatedAnimeItem ( int id, bool anime = true, bool forceMal = false ) : Task

Method used by details page to associate itself with authenticated item in order to allow for list updates.

UpdateGridItemWidth ( double>.Tuple args ) : void

Private Methods

Méthode Description
AddScrollHandler ( ) : void

Adds handler to scroll viewer provided by view.

FetchSeasonalData ( bool force = false, int page ) : System.Threading.Tasks.Task
GetGridItemsToLoad ( ) : int
LoadAllItemsDetails ( ) : void
LoadMore ( ) : void
OnOnSearchDelayedQuerySubmitted ( string query ) : void
ReloadList ( ) : void

Forces currently loaded page to download new data.

SetDefaults ( int statusOverride = null ) : void
SetDesiredStatus ( int value ) : void
SetDisplayMode ( AnimeStatus val ) : void
UpdatePageSetup ( ) : void

This method is fully responsible for preparing the view. Depending on display mode it distributes items to right containers.

UpdateUpperStatus ( ) : void

Method Details

AddAnimeEntry() public méthode

public AddAnimeEntry ( AnimeItemAbstraction parentAbstraction ) : void
parentAbstraction AnimeItemAbstraction
Résultat void

AnimeListViewModel() public méthode

public AnimeListViewModel ( ) : System
Résultat System

FetchData() public méthode

public FetchData ( bool force = false, AnimeListWorkModes modeOverride = null ) : System.Threading.Tasks.Task
force bool
modeOverride AnimeListWorkModes
Résultat System.Threading.Tasks.Task

GetDesiredStatus() public méthode

public GetDesiredStatus ( ) : AnimeStatus
Résultat AnimeStatus

IndefiniteScrollViewerOnViewChanging() public méthode

Event handler for event fired by one of two scroll viewrs in List and Grid view mode. It loads more items as user is scroling further.
public IndefiniteScrollViewerOnViewChanging ( double finalVerticalOffset ) : void
finalVerticalOffset double
Résultat void

Init() public méthode

public Init ( AnimeListPageNavigationArgs args ) : void
args MALClient.XShared.NavArgs.AnimeListPageNavigationArgs
Résultat void

LogIn() public méthode

public LogIn ( ) : void
Résultat void

LogOut() public méthode

public LogOut ( ) : void
Résultat void

OnNavigatedFrom() public méthode

public OnNavigatedFrom ( ) : void
Résultat void

RefreshList() public méthode

Main refresh function
public RefreshList ( bool searchSource = false, bool fakeDelay = false ) : void
searchSource bool /// If it's from search -> check if there's anuthing to update before refreshing. ///
fakeDelay bool /// To make app more responsive micro delays are good to trigger spinners and such. ///
Résultat void

RemoveAnimeEntry() public méthode

public RemoveAnimeEntry ( AnimeItemAbstraction parentAbstraction ) : void
parentAbstraction AnimeItemAbstraction
Résultat void

ScrollToTop() public méthode

Scrolls to top of current indefinite scroll viewer.
public ScrollToTop ( ) : void
Résultat void

SetSortOrder() public méthode

Sets provided sort mode or takes one from settings
public SetSortOrder ( SortOptions option ) : void
option SortOptions
Résultat void

TryRetrieveAuthenticatedAnimeItem() public méthode

Method used by details page to associate itself with authenticated item in order to allow for list updates.
public TryRetrieveAuthenticatedAnimeItem ( int id, bool anime = true, bool forceMal = false ) : Task
id int
anime bool
forceMal bool
Résultat Task

UpdateGridItemWidth() public méthode

public UpdateGridItemWidth ( double>.Tuple args ) : void
args double>.Tuple
Résultat void

Property Details

CanAddScrollHandler public_oe property

public bool CanAddScrollHandler
Résultat bool

CurrentSeason public_oe property

public AnimeSeason,MALClient.Models.Models.Anime CurrentSeason
Résultat MALClient.Models.Models.Anime.AnimeSeason