Example #1
0
        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");
                }
            }
        }
Example #2
0
        public static LinkedList <MeetingNode> returnMeeting()
        {
            LinkedList <MeetingNode> k         = new LinkedList <MeetingNode>();
            XMLProcessor             processor = new XMLProcessor();
            XMLSearcher searcher = new XMLSearcher(processor.GetWorkingPath());

            k = searcher.FindMeetingsByMeetingTitleKeywords("");
            Debug.Print("get meetingList from the core");
            foreach (MeetingNode i in k)
            {
                Debug.Print("" + i.GetMeetingTitle() + ":" + i.ToString());
            }
            return(k);
        }