这里是 把ICS 拆分为独立的日历
刚写完, 我的思路是 把ICS 文件 拆分成单个日历,然后对单个日历解析 及提醒方式 循环解析
private ArrayList calendarArray = new ArrayList();
protected void Button2_Click(object sender, EventArgs e)
{
string[] s = GetStopWords(); //ICS 字符串流
int sLenth = s.Length;
List<string> singleCalendarList = new List<string>();
bool calendarBegin = false;
for (int i = 0; i < sLenth; i++)
{
if (s[i] == "BEGIN:VEVENT")
{
calendarBegin = true;
singleCalendarList.Clear();
}
else if (s[i] == "END:VEVENT")
{
calendarArray.Add(singleCalendarList);
calendarBegin = false;
}
else if(calendarBegin)
{
singleCalendarList.Add(s[i]);
}
}
}