Beispiel #1
0
        private void initializeFileInfo()
        {
            XMLProcessor                      processor   = new XMLProcessor();
            XMLSearcher                       searcher    = new XMLSearcher(processor.GetWorkingPath());
            List <string>                     FileData    = App.getFileBuffer();
            LinkedList <MeetingNode>          MeetingData = new LinkedList <MeetingNode>();
            ObservableCollection <recentFile> items       = new ObservableCollection <recentFile>();

            for (int i = 0; i < FileData.Count; i = i + 3)
            {
                items.Add(new recentFile()
                {
                    Name = FileData[i], URL = FileData[i + 1], Meetings = FileData[i + 2]
                });
                RecentFile.ItemsSource = items;

                MeetingData = searcher.FindMeetingsByMeetingIDs(FileData[i + 2]);

                if (MeetingData.Count != 0)
                {
                    foreach (MeetingNode item in MeetingData)
                    {
                        items.Add(new recentFile()
                        {
                            Time = item.GetStartTimeS(), Title = item.GetMeetingTitle(), Attendee = item.GetAttendents(), Files = item.GetFileListS()
                        });
                        RecentFile.ItemsSource = items;
                    }
                }
                else
                {
                    items.Add(new recentFile()
                    {
                        Time = "No Records", Title = "  ", Attendee = "    "
                    });
                    RecentFile.ItemsSource = items;
                }
            }
        }
        private void initializeFileInfo(LinkedList <FileNode> fileList)
        {
            Debug.Print(fileList.Count + "");
            processor = new XMLProcessor();
            searcher  = new XMLSearcher(processor.GetWorkingPath());
            LinkedList <MeetingNode>          MeetingData = new LinkedList <MeetingNode>();
            ObservableCollection <recentFile> items       = new ObservableCollection <recentFile>();

            foreach (FileNode item in fileList)
            {
                items.Add(new recentFile()
                {
                    Name = item.GetFileName(), URL = item.GetFilePath(), Meetings = item.GetMeetingListS()
                });
                RecentFile.ItemsSource = items;
                MeetingData            = searcher.FindMeetingsByMeetingIDs(item.GetMeetingListS());

                if (MeetingData.Count != 0)
                {
                    foreach (MeetingNode meeting in MeetingData)
                    {
                        items.Add(new recentFile()
                        {
                            Time = meeting.GetStartTimeS(), Title = meeting.GetMeetingTitle(), Attendee = meeting.GetAttendents(), Files = meeting.GetFileListS()
                        });
                        RecentFile.ItemsSource = items;
                    }
                }
                else
                {
                    items.Add(new recentFile()
                    {
                        Time = "No Records", Title = "  ", Attendee = "    "
                    });
                    RecentFile.ItemsSource = items;
                }
            }
        }