示例#1
0
        public static Timezone Parse(string timeZoneInfoDescription)
        {
            Timezone tz = new Timezone();

            tz._timeZoneInfo = TimeZoneInfo.GetSystemTimeZones().Where(t => t.DisplayName.Replace("&", "and") == timeZoneInfoDescription).First();
            return(tz);
        }
示例#2
0
        public override string ToString()
        {
            StringBuilder builder = new StringBuilder();

            builder.AppendLine("BEGIN:VCALENDAR");
            builder.AppendLine("VERSION:2.0");
            builder.AppendLine("METHOD:PUBLISH");
            builder.AppendLine("PRODID:Remote Calendar Access");
            builder.AppendLine("X-WR-CALNAME:" + Title);
            builder.AppendLine("X-PUBLISHED-TTL:PT5M");

            builder.Append(Timezone.ToString());

            foreach (Event e in Events)
            {
                if (e.EventType != EventType.Deleted)
                {
                    builder.Append(e.ToString(Events));
                }
            }

            builder.AppendLine("END:VCALENDAR");

            return(builder.ToString());
        }
示例#3
0
文件: Timezone.cs 项目: tandis/PnP
 public static Timezone Parse(string timeZoneInfoDescription)
 {
     Timezone tz = new Timezone();
     tz._timeZoneInfo = TimeZoneInfo.GetSystemTimeZones().Where(t => t.DisplayName.Replace("&", "and") == timeZoneInfoDescription).First();
     return tz;
 }