Example #1
0
 private void SimpleSearch_Click(object sender, RoutedEventArgs e)
 {
     if (queryTextBox == null || queryTextBox.Text == "")
     {
         MessageBox.Show("No Query", "Error", MessageBoxButton.OK);
     }
     else
     {
         Dictionary <Material, Double> res = _controller.RetreiveMaterialsSimpleSearch(queryTextBox.Text);
         PresentResultsWindow          win = new PresentResultsWindow(_controller, res);
         win.ShowDialog();
     }
 }
Example #2
0
        private void AdvancedSearch_Click(object sender, RoutedEventArgs e)
        {
            AdvancedSearchWindow win1 = new AdvancedSearchWindow(ref _controller);

            if (win1.ShowDialog() == true)
            {
                Dictionary <Material, double> results = _controller.RetreiveMaterialsAdvancedSearch(win1.University, win1.University, win1.CourseNo, win1.CourseName, win1.Title
                                                                                                    , win1.Topics, win1.Tags, win1.Category, win1.IsPrinted);

                //should open reasults window
                PresentResultsWindow win2 = new PresentResultsWindow(_controller, results);
                win2.ShowDialog();
            }
        }