private void GO_onClick(object sender, RoutedEventArgs e) { if ((bool)stemmer.IsChecked != IsStem) { System.Windows.MessageBox.Show("The loaded dictionary does not match to the query requested, please load the correct dictionary."); return; } if (!vm.checkIfDictionaryIsLoaded()) { System.Windows.MessageBox.Show("Dictionary not loaded. Please load a dictionary before search a query."); return; } if (Auto.Text.Length != 0) { string check = Auto.Text.Trim(new char[] { ' ' }); if (check.Length != 0) { results = new ResultsAllQueries(ref vm); vm.Search(); results.ShowDialog(); } else { System.Windows.MessageBox.Show("Query search line is empty. Please enter a query."); } } else { System.Windows.MessageBox.Show("Query search line is empty. Please enter a query."); } }
private void ShowResults(object sender, RoutedEventArgs e) { if (results != null) { results = new ResultsAllQueries(ref vm); results.ShowDialog(); } else { System.Windows.MessageBox.Show("No results yet. please enter a query."); } }
private void GOQueryFile_onClick(object sender, RoutedEventArgs e) { if ((bool)stemmer.IsChecked != IsStem) { System.Windows.MessageBox.Show("The loaded dictionary does not match to the query requested, please load the correct dictionary."); return; } if (!vm.checkIfDictionaryIsLoaded()) { System.Windows.MessageBox.Show("Dictionary not loaded. Please load a dictionary before search a query."); return; } if (File.Exists(filePath.Text) && Directory.Exists(filePath4.Text)) { results = new ResultsAllQueries(ref vm); vm.SearchQueryFile(); results.ShowDialog(); } else { System.Windows.MessageBox.Show("Invalid path. please check the queries file path and the save-to path"); } }