Пример #1
0
        public OldHrSearchOptions GetOldOptions()
        {
            var options = new OldHrSearchOptions();

            options.AllWords   = AllWords;
            options.QueryScope = QueryScope;

            options.WordsAll = AutocompleteAll.GetCHIOs().Where(x => x.HIO is Word).Select(x => x.HIO).Cast <Word>().ToList();

            options.MeasuresAll = AutocompleteAll.GetCHIOs().Where(x => x.HIO is MeasureOp).Select(x => x.HIO).Cast <MeasureOp>().ToList();

            options.Categories = SelectedCategories.Select(cat => cat.category).ToList();
            return(options);
        }
Пример #2
0
        private void FillToOptions(SearchOptions options)
        {
            AutocompleteAll.CompleteTypings();
            AutocompleteAny.CompleteTypings();
            AutocompleteNot.CompleteTypings();

            options.CWordsAll = AutocompleteAll.GetCWords().ToList();
            options.CWordsAny = AutocompleteAny.GetCWords().ToList();
            options.CWordsNot = AutocompleteNot.GetCWords().ToList();

            options.MeasuresAll = AutocompleteAll.GetCHIOs().Where(x => x.HIO is MeasureOp).Select(x => x.HIO).Cast <MeasureOp>().ToList();
            options.MeasuresAny = AutocompleteAny.GetCHIOs().Where(x => x.HIO is MeasureOp).Select(x => x.HIO).Cast <MeasureOp>().ToList();

            options.Categories    = SelectedCategories.Select(cat => cat.category).ToList();
            options.MinAny        = MinAny;
            options.WithConf      = WithConfidence;
            options.GroupOperator = GroupOperator;
            options.SearchScope   = SearchScope;
        }