Exemple #1
0
        private void InitializeDefaultProperties()
        {
            _originalCollection  = new List <FavoritedAnime>();
            _settingsPreferences = App.liteDB.GetCollection <SettingsPreferences>().FindById(0);


            ResetSearchConfig(_settingsPreferences.ShowNSFW, AnimeSearchSortable.Score, SortDirection.Descending);

            IsSearchVisible = false;

            Animes = new ObservableRangeCollection <FavoritedAnime>();

            SelectionModeCommand = new magno.Command(OnSelectionMode);
            AddToFavoriteCommand = new magno.AsyncCommand(OnAddToFavorite);
            ClearTextCommand     = new magno.Command(OnClearText);
            SearchCommand        = new magno.AsyncCommand(OnSearch);
            OpenSearchCommand    = new magno.Command(OnOpenSearch);
            OpenAnimeCommand     = new magno.AsyncCommand(OnOpenAnime);
            LoadMoreCommand      = new magno.AsyncCommand(OnLoadMore);
            ObjectCheckedCommand = new magno.Command <ICheckableObject>(OnObjectChecked);
            ApplyFilterCommand   = new magno.AsyncCommand(OnApplyFilter);
            ResetFilterCommand   = new magno.AsyncCommand(OnResetFilter);
            BackButtonCommand    = new magno.AsyncCommand <CatalogueView>(OnBackButton);
            ChangeSeasonCommand  = new magno.AsyncCommand(OnChangeSeason);
        }
Exemple #2
0
        public AnimeCharacterViewModel(long characterId)
        {
            InitializeTask = LoadAsync(characterId);

            FavoriteCommand     = new magno.Command(OnFavorite);
            OpenLinkCommand     = new magno.AsyncCommand <string>(OpenLink);
            SelectedItemCommand = new magno.AsyncCommand(OnSelectedItem);
        }
Exemple #3
0
        public VoiceActorViewModel(long malId)
        {
            InitializeTask = LoadAsync(malId);

            FavoriteCommand          = new magno.Command(OnFavorite);
            SelectedAnimeCommand     = new magno.AsyncCommand <MALImageSubItem>(OnSelectedAnime);
            SelectedCharacterCommand = new magno.AsyncCommand <MALImageSubItem>(OnSelectedCharacter);
            OpenLinkCommand          = new magno.AsyncCommand <string>(OpenLink);
        }
Exemple #4
0
 private void Init()
 {
     FavoriteCommand           = new magno.AsyncCommand(OnFavorite);
     OpenLinkCommand           = new magno.AsyncCommand <string>(OnLink);
     OpenNewsCommand           = new magno.AsyncCommand(OnLinkNews);
     OpenAnimeCommand          = new magno.AsyncCommand(OnOpenAnime);
     BackButtonCommand         = new magno.AsyncCommand <BackButtonOriginEnum>(OnBackButton);
     OpenAnimeCharacterCommand = new magno.AsyncCommand(OnOpenAnimeCharacter);
     GenreSearchCommand        = new magno.AsyncCommand <string>(OnGenreSearch);
 }