private Boolean IsAutoAdjustDaylight_Checked(CalendarTimeZone pTimeZone) { if (pTimeZone.DaylightBias != 0 | pTimeZone.StandardBias != 0) { return(true); } else { return(false); } }
private Boolean IsAutoAdjustDaylight_Exists(CalendarTimeZone pTimeZone) { if (pTimeZone.DaylightDate.wMonth != 0 & pTimeZone.StandardDate.wMonth != 0) { return(true); } else { return(false); } }
private void ProcessZonePartEnd(CalendarEntry entry, CalendarTimeZone zone, TimeZonePart part, ComponentToken tkn) { if ((ComponentToken)GetToken(_components, entry.Value) != tkn) ReportError(entry, "Expected \"END:" + _components[(int)tkn].Text.ToUpper() + "\""); if (zone.Part == null) zone.Part = new List<TimeZonePart>(); zone.Part.Add(part); }
/// <summary> /// Processes VTimeZone parts (DayLight, Standard) /// </summary> /// <param name="zone"></param> /// <param name="tkn"></param> private void ProcessZonePart(CalendarTimeZone zone, ComponentToken tkn) { bool isDtStartValue = false; TimeZonePart part = new TimeZonePart(); CalendarEntry entry = GetNextEntry(); while (entry != null) { switch ((PropertyToken) GetToken(_properties, entry.Id)) { case PropertyToken.DtStart: part.StartDate = ProcessDate(entry, ref isDtStartValue); break; case PropertyToken.RDate: part.RecurDate = ProcessRDate(entry, part.RecurDate); break; case PropertyToken.RRule: part.RecurRule = ProcessRRule(entry); break; case PropertyToken.TzOffsetTo: part.OffsetTo = ProcessTzOffset(entry); break; case PropertyToken.End: ProcessZonePartEnd(entry, zone, part, tkn); return; } entry = GetNextEntry(); } ReportError(entry, "Expected \"END:" + _components[(int)tkn].Text.ToUpper() + "\""); }
/// <summary> /// ProcessVTimezoneEnd /// </summary> /// <param name="entry"></param> /// <param name="zone"></param> private void ProcessVTimezoneEnd(CalendarEntry entry, CalendarTimeZone zone) { if ((ComponentToken)GetToken(_components, entry.Value) != ComponentToken.VTimezone) ReportError(entry, "Expected \"END:VTIMEZONE\""); if (_CalendarTimeZone == null) _CalendarTimeZone = new List<CalendarTimeZone>(); _CalendarTimeZone.Add(zone); }
/// <summary> /// Processes VTimeZone components /// </summary> private void ProcessVTimezone() { CalendarTimeZone zone = new CalendarTimeZone(); CalendarEntry entry = GetNextEntry(); while (entry != null) { PropertyToken tkn = (PropertyToken)GetToken(_properties, entry.Id); switch (tkn) { case PropertyToken.Begin: ComponentToken ctkn = (ComponentToken) GetToken(_components, entry.Value); switch (ctkn) { case ComponentToken.Daylight: case ComponentToken.Standard: ProcessZonePart(zone, ctkn); break; } break; case PropertyToken.End: ProcessVTimezoneEnd(entry, zone); return; case PropertyToken.TzId: zone.TzId = ProcessTzId(entry); break; } entry = GetNextEntry(); } ReportError(entry, "Expected \"END:VTIMEZONE\""); }