Example #1
0
        public void ParseICS()
        {
            string contents = File.ReadAllText(@"birthday_cal.ics");
            var    calendar = (VCalendar)CalendarObject.Parse(contents);

            this.myfriends = new ArrayList();
            foreach (var item in calendar.Children)
            {
                string name = item.Properties[1].Value;
                string id   = item.Properties[4].Value;
                string date = item.Properties[0].Value;

                friend x = new friend(name, id, date);
                myfriends.Add(x);
                //Console.WriteLine("Name : " + item.Properties[1].Value);
                //Console.WriteLine("ID : " + item.Properties[4].Value);
                //Console.WriteLine("Date : " + item.Properties[0].Value);
            }

            //MessageBox.Show("Parsing Done! See Console");
        }
 public void ParseUsHolidaysTest()
 {
     var content  = ReadResource("USHolidays.ics");
     var calendar = (VCalendar)CalendarObject.Parse(content);
 }
 public void ParseYogamTest()
 {
     var content  = ReadResource("yogam.ics");
     var calendar = (VCalendar)CalendarObject.Parse(content);
 }