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

Inheritance: ViewModelBase
Mostra file Open project: Mordonus/MALClient

Public Properties

Property Type Description
CanAddScrollHandler bool
CurrentSeason MALClient.Models.Models.Anime.AnimeSeason

Public Methods

Method 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

Method 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 method

public AddAnimeEntry ( AnimeItemAbstraction parentAbstraction ) : void
parentAbstraction AnimeItemAbstraction
return void

AnimeListViewModel() public method

public AnimeListViewModel ( ) : System
return System

FetchData() public method

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

GetDesiredStatus() public method

public GetDesiredStatus ( ) : AnimeStatus
return AnimeStatus

IndefiniteScrollViewerOnViewChanging() public method

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
return void

Init() public method

public Init ( AnimeListPageNavigationArgs args ) : void
args MALClient.XShared.NavArgs.AnimeListPageNavigationArgs
return void

LogIn() public method

public LogIn ( ) : void
return void

LogOut() public method

public LogOut ( ) : void
return void

OnNavigatedFrom() public method

public OnNavigatedFrom ( ) : void
return void

RefreshList() public method

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. ///
return void

RemoveAnimeEntry() public method

public RemoveAnimeEntry ( AnimeItemAbstraction parentAbstraction ) : void
parentAbstraction AnimeItemAbstraction
return void

ScrollToTop() public method

Scrolls to top of current indefinite scroll viewer.
public ScrollToTop ( ) : void
return void

SetSortOrder() public method

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

TryRetrieveAuthenticatedAnimeItem() public method

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
return Task

UpdateGridItemWidth() public method

public UpdateGridItemWidth ( double>.Tuple args ) : void
args double>.Tuple
return void

Property Details

CanAddScrollHandler public_oe property

public bool CanAddScrollHandler
return bool

CurrentSeason public_oe property

public AnimeSeason,MALClient.Models.Models.Anime CurrentSeason
return MALClient.Models.Models.Anime.AnimeSeason