コード例 #1
0
 private static void SetDayLight(vCalendar cal, string line)
 {
     DayLightSavings savings = new DayLightSavings();
     string[] compounds = line.Split(':')[1].Split(';');
     if(compounds[0].ToUpper()=="TRUE")
     {
         savings.IsObserved = true;
         savings.Offset = System.Int32.Parse(compounds[1]);
         savings.Start = ActiveUp.Net.Groupware.vCard.Parser.ParseDate(compounds[2]);
         savings.End = ActiveUp.Net.Groupware.vCard.Parser.ParseDate(compounds[3]);
         savings.StandardTimeDesignation = compounds[4];
         savings.Designation = compounds[5];
     }
     else savings.IsObserved = false;
     cal.DayLightSavings = savings;
 }
コード例 #2
0
        private static void SetDayLight(vCalendar cal, string line)
        {
            DayLightSavings savings = new DayLightSavings();

            string[] compounds = line.Split(':')[1].Split(';');
            if (compounds[0].ToUpper() == "TRUE")
            {
                savings.IsObserved = true;
                savings.Offset     = System.Int32.Parse(compounds[1]);
                savings.Start      = ActiveUp.Net.Groupware.vCard.Parser.ParseDate(compounds[2]);
                savings.End        = ActiveUp.Net.Groupware.vCard.Parser.ParseDate(compounds[3]);
                savings.StandardTimeDesignation = compounds[4];
                savings.Designation             = compounds[5];
            }
            else
            {
                savings.IsObserved = false;
            }
            cal.DayLightSavings = savings;
        }