private void Search(object sender, RoutedEventArgs e) { processor = new XMLProcessor(); searcher = new XMLSearcher(processor.GetWorkingPath()); string keyword = textBox.Text; if (tabControl.SelectedIndex == 0) { LinkedList <FileNode> fileList = searcher.FindFilesByFileNameKeywords(keyword); if (fileList.Count != 0) { initializeFileInfo(fileList); Debug.Print(tabControl.SelectedIndex.ToString()); } else { MessageBox.Show("No Results"); } } else if (tabControl.SelectedIndex == 1) { LinkedList <MeetingNode> meetingList = searcher.FindMeetingsByMeetingTitleKeywords(keyword); if (meetingList.Count != 0) { initializeMeetingInfo(meetingList); Debug.Print(tabControl.SelectedIndex.ToString()); } else { MessageBox.Show("No Results"); } } }
public static LinkedList <FileNode> returnFile() { LinkedList <FileNode> k = new LinkedList <FileNode>(); XMLProcessor processor = new XMLProcessor(); XMLSearcher searcher = new XMLSearcher(processor.GetWorkingPath()); k = searcher.FindFilesByFileNameKeywords(""); return(k); }