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); }
public RecentViewModel() { ClearAllRecentCommand = new magno.AsyncCommand(OnClearAllRecent); OpenAnimeCommand = new magno.AsyncCommand(OnOpenAnime); Recents = new ObservableRangeCollection <RecentVisualized>(); }
public AnimeCharacterViewModel(long characterId) { InitializeTask = LoadAsync(characterId); FavoriteCommand = new magno.Command(OnFavorite); OpenLinkCommand = new magno.AsyncCommand <string>(OpenLink); SelectedItemCommand = new magno.AsyncCommand(OnSelectedItem); }
public ChoiceModalViewModel(string title, string message, Action action) { TitleModal = title; Message = message; _action = action; ConfirmCommand = new magno.AsyncCommand(OnConfirm); CancelCommand = new magno.AsyncCommand(OnCancel); }
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); }
public FavoriteCharacterViewModel() { ClearAllRecentCommand = new magno.AsyncCommand(OnClearAllRecent); OpenCharacterCommand = new magno.AsyncCommand(OnOpenCharacter); DeleteFavoriteCommand = new magno.AsyncCommand(OnDeleteFavorite); ClearTextCommand = new magno.Command(OnClearText); SearchCommand = new magno.AsyncCommand(OnSearch); SelectionModeCommand = new magno.Command(OnSelectionMode); UpdateFavoriteCharactersCommand = new magno.AsyncCommand(OnUpdateFavoriteCharacters); FavoritedCharacters = new ObservableRangeCollection <FavoritedAnimeCharacter>(); }
public FavoriteVoiceActorViewModel() { ClearAllRecentCommand = new magno.AsyncCommand(OnClearAllRecent); OpenVoiceActorCommand = new magno.AsyncCommand(OnOpenVoiceActor); DeleteFavoriteCommand = new magno.AsyncCommand(OnDeleteFavorite); ClearTextCommand = new magno.Command(OnClearText); SearchCommand = new magno.AsyncCommand(OnSearch); SelectionModeCommand = new magno.Command(OnSelectionMode); UpdateFavoriteVoiceActorsCommand = new magno.AsyncCommand(OnUpdateFavoriteVoiceActors); FavoritedActors = new ObservableRangeCollection <FavoritedVoiceActor>(); }
public FavoriteAnimeViewModel() { GroupedFavoriteByWeekList = new ObservableRangeCollection <GroupedFavoriteAnimeByWeekDay>(); SearchCommand = new magno.AsyncCommand(OnSearch); ClearTextCommand = new magno.Command(OnClearText); DeleteFavoriteCommand = new magno.AsyncCommand(OnDeleteFavoriteCommand); ArchiveFavoriteCommand = new magno.AsyncCommand(OnArchiveFavorite); ClearAllCommand = new magno.AsyncCommand(OnClearAll); SelectionModeCommand = new magno.Command(OnSelectionMode); OpenAnimeCommand = new magno.AsyncCommand(OnOpenAnime); ObjectCheckedCommand = new magno.Command <ICheckableObject>(OnObjectChecked); ApplyFilterCommand = new magno.AsyncCommand(OnApplyFilter); ResetFilterCommand = new magno.Command(OnResetFilter); SwitchCommand = new Xamarin.Forms.Command <FavoritedAnime>(OnSwitch); StepperCommand = new Xamarin.Forms.Command <FavoritedAnime>(OnStepper); UpdateFavoriteAnimesCommand = new AsyncCommand(OnUpdateAnimes); }
public SettingsViewModel() { //TODO: as funcionalidades de troca de idioma dentro dos settings não funcionam, deixar desativado isso por tempo indeterminado Settings = App.liteDB.GetCollection <SettingsPreferences>().FindById(0); SelectedThemeIndex = Settings.SelectedThemeIndex; CurrentVersion = Xamarin.Essentials.VersionTracking.CurrentVersion; DataDirectory = DependencyService.Get <IGetFolder>().GetApplicationDocumentsFolder(); //SelectedLangIndex = App.SettingsPreferences.SelectedLanguageIndex; //IsAutomaticTranslate = App.SettingsPreferences.AutomaticTranslate; SwitchNotificationCommand = new Command(OnSwitchNotification); SwitchNSFWCommand = new Command(OnSwitchNSFW); ClearDatabaseCommand = new magno.AsyncCommand(OnClearDatabase); OverviewCommand = new magno.AsyncCommand(OnOverview); PatchNotesCommand = new magno.AsyncCommand(OnPatchNotes); LicensesCommand = new magno.AsyncCommand(OnLicenses); }
public HomeViewModel() { SelectedItemCommand = new magno.AsyncCommand(OnSelectedItem); }