Example #1
0
        /// <summary>
        /// This is used to apply the selected time zone to all date/time objects in the component and convert
        /// them to the new time zone.
        /// </summary>
        /// <param name="vTimeZone">A <see cref="VTimeZone"/> object that will be used for all date/time objects
        /// in the component.</param>
        /// <remarks>When applied, all date/time values in the object will be converted to the new time zone</remarks>
        public override void ApplyTimeZone(VTimeZone vTimeZone)
        {
            CalendarObject.ApplyPropertyTimeZone(startDate, vTimeZone);
            CalendarObject.ApplyPropertyTimeZone(recurId, vTimeZone);

            base.ApplyTimeZone(vTimeZone);
        }
Example #2
0
        /// <summary>
        /// This is used to apply the selected time zone to all date/time objects in the component and convert
        /// them to the new time zone.
        /// </summary>
        /// <param name="vTimeZone">A <see cref="VTimeZone"/> object that will be used for all date/time objects
        /// in the component.</param>
        /// <remarks>When applied, all date/time values in the object will be converted to the new time zone</remarks>
        public override void ApplyTimeZone(VTimeZone vTimeZone)
        {
            if (rDates != null)
            {
                foreach (RDateProperty rdt in rDates)
                {
                    if (vTimeZone == null || rdt.TimeZoneId != vTimeZone.TimeZoneId.Value)
                    {
                        // If the time zone is null, just clear the time zone ID
                        if (vTimeZone == null)
                        {
                            rdt.TimeZoneId = null;
                        }
                        else
                        {
                            DateTimeInstance dti = VCalendar.TimeZoneToTimeZone(rdt.TimeZoneDateTime,
                                                                                rdt.TimeZoneId, vTimeZone.TimeZoneId.Value);

                            rdt.TimeZoneDateTime = dti.StartDateTime;
                            rdt.TimeZoneId       = vTimeZone.TimeZoneId.Value;
                        }
                    }
                }
            }

            if (exDates != null)
            {
                foreach (ExDateProperty edt in exDates)
                {
                    CalendarObject.ApplyPropertyTimeZone(edt, vTimeZone);
                }
            }
        }
Example #3
0
        /// <summary>
        /// This is used to apply the selected time zone to all date/time objects in the component and convert
        /// them to the new time zone.
        /// </summary>
        /// <param name="vTimeZone">A <see cref="VTimeZone"/> object that will be used for all date/time objects
        /// in the component.</param>
        /// <remarks>When applied, all date/time values in the object will be converted to the new time zone</remarks>
        public override void ApplyTimeZone(VTimeZone vTimeZone)
        {
            CalendarObject.ApplyPropertyTimeZone(startDate, vTimeZone);
            CalendarObject.ApplyPropertyTimeZone(endDate, vTimeZone);
            CalendarObject.ApplyPropertyTimeZone(recurId, vTimeZone);

            if (alarms != null)
            {
                alarms.ApplyTimeZone(vTimeZone);
            }

            base.ApplyTimeZone(vTimeZone);
        }
Example #4
0
 /// <summary>
 /// This is used to apply the selected time zone to all date/time objects in the component and convert
 /// them to the new time zone.
 /// </summary>
 /// <param name="vTimeZone">A <see cref="VTimeZone"/> object that will be used for all date/time objects
 /// in the component.</param>
 /// <remarks>When applied, all date/time values in the object will be converted to the new time zone</remarks>
 public override void ApplyTimeZone(VTimeZone vTimeZone)
 {
     CalendarObject.ApplyPropertyTimeZone(startDate, vTimeZone);
     CalendarObject.ApplyPropertyTimeZone(endDate, vTimeZone);
 }
Example #5
0
File: VAlarm.cs Project: ywscr/PDI
 /// <summary>
 /// This is used to apply the selected time zone to all date/time objects in the component and convert
 /// them to the new time zone.
 /// </summary>
 /// <param name="vTimeZone">A <see cref="VTimeZone"/> object that will be used for all date/time objects
 /// in the component.</param>
 /// <remarks>When applied, all date/time values in the object will be converted to the new time zone</remarks>
 public override void ApplyTimeZone(VTimeZone vTimeZone)
 {
     CalendarObject.ApplyPropertyTimeZone(trigger, vTimeZone);
 }