Example #1
0
        private void Button_AdvancedSearch_Click(object sender, RoutedEventArgs e)
        {
            SearchingContent searchingContent = createSearchingContent();

            setSearchConfig();

            if (RecordsSearchFunctions.cannotStartSearchYet == false)
            {
                RecordsSearchFunctions.cannotStartSearchYet = true;
                RecordsSearchFunctions sf = new RecordsSearchFunctions();
                sf.isResult_CategorizedInTabItems = classifiedWithCategories;
                sf.sortingRule = (ComboBox_SortBy.SelectedItem as ComboBoxItem).Content as string;
                if (ComboBox_SortBy.SelectedIndex != 0)
                {
                    sf.sortingRule = ((ComboBoxItem)ComboBox_SortBy.SelectedItem).Content as string;
                }
                Button_AdvancedSearch.IsEnabled = false;
                List <string> catalogURLList = getSearchCatalogURLList();
                sf.AdvancedSearch_Using_WCFService(searchingContent, ConstantCollection.startPosition, ConstantCollection.maxRecords, catalogURLList);
            }
        }
Example #2
0
        public string getWhatToSearchString_NotAccurate()
        {
            List <string> searchContentWordsList = new List <string>();

            if (RecordsSearchFunctions.isContentSearchable(AllOfTheWords_Content.Text) == true)
            {
                splitStringAndPutIntoList(' ', AllOfTheWords_Content.Text, searchContentWordsList);
            }
            if (RecordsSearchFunctions.isContentSearchable(ExactPhrase_Content.Text) == true)
            {
                searchContentWordsList.Add(ExactPhrase_Content.Text);
            }
            if (RecordsSearchFunctions.isContentSearchable(WordsInTitle_Content.Text) == true)
            {
                splitStringAndPutIntoList(' ', WordsInTitle_Content.Text, searchContentWordsList);
            }
            if (RecordsSearchFunctions.isContentSearchable(WordsInAbstract_Content.Text) == true)
            {
                splitStringAndPutIntoList(' ', WordsInAbstract_Content.Text, searchContentWordsList);
            }
            if (RecordsSearchFunctions.isContentSearchable(Keywords_Content.Text) == true)
            {
                splitStringAndPutIntoList(' ', Keywords_Content.Text, searchContentWordsList);
            }
            if (RecordsSearchFunctions.isContentSearchable(WithoutWords_Content.Text) == true)
            {
                splitStringAndRemoveSameOneFromList(' ', WithoutWords_Content.Text, searchContentWordsList);
            }

            string content = "";

            foreach (string word in searchContentWordsList)
            {
                content += word + " ";
            }
            content = content.TrimEnd().TrimStart();
            return(content);
        }