Esempio n. 1
0
        //for test main method
        public static void Main(string[] args)
        {
            /*
             * XMLProcessor x = new XMLProcessor();
             * x.Read();
             * foreach (FileNode node in x.fileList)
             * {
             *  Console.WriteLine(node.GetFileName());
             * }
             */
            // Uri.IsWellFormedOriginalString();

            LinkedList <MeetingNode> meetingList    = new LinkedList <MeetingNode>();
            LinkedList <FileNode>    attachmentList = new LinkedList <FileNode>();
            MeetingNode m1 = new MeetingNode();

            m1.SetMeetingID("12345");
            m1.SetMeetingTitle("ABC");
            m1.SetStartTime("2017/04/03 13:13:15");
            m1.SetEndTime("2017/04/04 13:13:15");
            MeetingNode m2 = new MeetingNode();

            m2.SetMeetingID("23456");
            m2.SetMeetingTitle("BCD");
            m2.SetStartTime("2017/04/07 13:13:15");
            m2.SetEndTime("2017/04/08 13:13:15");
            MeetingNode m3 = new MeetingNode();

            m3.SetMeetingID("34567");
            m3.SetMeetingTitle("CDE");
            m3.SetStartTime("2017/04/08 13:13:15");
            m3.SetEndTime("2017/04/09 13:13:15");
            meetingList.AddLast(m1);
            meetingList.AddLast(m2);
            meetingList.AddLast(m3);

            FileNode f1 = new FileNode();

            f1.SetFileName("f1a");
            f1.AddMeetings("12345");
            FileNode f2 = new FileNode();

            f2.SetFileName("f2a");
            f2.AddMeetings("34567");
            FileNode f3 = new FileNode();

            f3.SetFileName("f3a");
            f3.AddMeetings("34567");
            attachmentList.AddLast(f1);
            attachmentList.AddLast(f2);
            attachmentList.AddLast(f3);

            XMLProcessor x = new XMLProcessor();

            x.ProcessFileWithMeetingList(meetingList, attachmentList);
            x.Write();
        }
Esempio n. 2
0
        //for test main method
        public static void Main(string[] args)
        {
            XMLProcessor x = new XMLProcessor();

            x.GetRFXML(); //date and time not implemented
            while (!File.Exists(x.tempPath))
            {
                ;
            }
            Thread.Sleep(1000); //temporary solution for process conflicts
            x.RemoveXMLdeclaration();
            while (x.sync == 1)
            {
                ;
            }
            x.ReadRecords();

            for (LinkedListNode <FileNode> node = x.fileList.First; node != x.fileList.Last.Next; node = node.Next)
            {
                Console.WriteLine(node.Value.GetFileName());
            }
        }