Exemple #1
0
        public void Search(string query, SearchOptionParameter optionParameter, bool force = false)
        {
            ResultIllusts.Clear();
            ResultNovels.Clear();
            ResultUsers.Clear();
            _query       = query;
            _offset      = "";
            _count       = 0;
            _optionParam = optionParameter;
            if (!string.IsNullOrWhiteSpace(_optionParam.EitherWord))
            {
                _query += " " + string.Join(" ", _optionParam.EitherWord.Split(' ').Select(w => $"({w})"));
            }
            if (!string.IsNullOrWhiteSpace(_optionParam.IgnoreWord))
            {
                _query += " " + string.Join(" ", _optionParam.IgnoreWord.Split(' ').Select(w => $"--{w}"));
            }
#if !OFFLINE
            HasMoreItems = true;
            if (force)
            {
                RunHelper.RunAsync(SearchAsync);
            }
#endif
        }
Exemple #2
0
        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
        }