private void RedirectToLoginPage(FavoriteOptionParameter parameter) { var param = new RedirectParameter { RedirectTo = "FavoriteMain", Parameter = parameter }; NavigationService.Navigate("Error.LoginRequired", param.ToJson()); }
public override void OnInitialize(object parameter) { _parameter = parameter as FavoriteOptionParameter ?? new FavoriteOptionParameter(); RestrictType = _parameter.ToReactivePropertyAsSynchronized(w => w.Restrict); SelectedTag = _parameter.ToReactivePropertyAsSynchronized(w => w.Tag); _bookmarkTag = new PixivBookmarkTag(_pixivClient, _queryCacheService); ModelHelper.ConnectTo(Tags, _bookmarkTag, w => w.BookmarkTags, w => w.Name).AddTo(this); _bookmarkTag.Query(_parameter.Type, _parameter.Restrict); }
public async void OnButtonTapped() { var result = await _dialogService.ShowDialogAsync("Dialogs.FavoriteOption", _favoriteOption); if (result == null) { return; } _favoriteOption = result as FavoriteOptionParameter; Sync(); }
public void Query(FavoriteOptionParameter optionParameter) { ResultIllusts.Clear(); ResultNovels.Clear(); _optionParam = optionParameter; // Magic number _optionParam.Tag = optionParameter.Tag == "すべて" ? "" : optionParameter.Tag; _maxBookmarkId = ""; #if !OFFLINE HasMoreItems = true; #endif }
private void Initialize(FavoriteOptionParameter parameter) { _categoryService.UpdateCategory(); _favoriteOption = parameter; _favoriteOption.UserId = _accountService.LoggedInAccount.Id; SelectedIndex = (int)parameter.Type; _pixivFavorite = new PixivFavorite(_pixivClient, this._queryCacheService); if (parameter.Type == SearchType.IllustsAndManga) { ModelHelper.ConnectTo(FavoriteItems, _pixivFavorite, w => w.ResultIllusts, CreatePixivImage).AddTo(this); } else { ModelHelper.ConnectTo(FavoriteItems, _pixivFavorite, w => w.ResultNovels, CreatePixivNovel).AddTo(this); } Sync(); }