コード例 #1
0
ファイル: VCalendar.cs プロジェクト: modulexcite/PDI
        /// <summary>
        /// The method can be called to clear all current property values in the calendar.  The version is left
        /// unchanged.
        /// </summary>
        /// <remarks>Because time zone information is shared amongst all calendars, the <see cref="TimeZones"/>
        /// collection will not be cleared.  If you want it cleared, you must do it manually.</remarks>
        public override void ClearProperties()
        {
            prodId = null;
            calScale = null;
            method = null;
            geo = null;
            tz = null;
            daylight = null;

            events = null;
            todos = null;
            journals = null;
            freebusy = null;

            customProps = null;
        }
コード例 #2
0
ファイル: VCalendar.cs プロジェクト: modulexcite/PDI
        /// <summary>
        /// This is overridden to allow copying of the additional properties
        /// </summary>
        /// <param name="p">The PDI object from which the settings are to be copied</param>
        protected override void Clone(PDIObject p)
        {
            VCalendar o = (VCalendar)p;

            this.ClearProperties();

            prodId = (ProductIdProperty)o.ProductId.Clone();
            calScale = (CalendarScaleProperty)o.CalendarScale.Clone();
            method = (MethodProperty)o.Method.Clone();
            geo = (GeographicPositionProperty)o.VCalendarGeographicPosition.Clone();
            tz = (TimeZoneProperty)o.VCalendarTimeZone.Clone();
            daylight = (DaylightProperty)o.VCalendarDaylightRule.Clone();

            this.Events.CloneRange(o.Events);
            this.ToDos.CloneRange(o.ToDos);
            this.Journals.CloneRange(o.Journals);
            this.FreeBusys.CloneRange(o.FreeBusys);
            this.CustomProperties.CloneRange(o.CustomProperties);
        }
コード例 #3
0
ファイル: VCard.cs プロジェクト: modulexcite/PDI
        /// <summary>
        /// This is overridden to allow copying of the additional properties
        /// </summary>
        /// <param name="p">The PDI object from which the settings are to be copied</param>
        protected override void Clone(PDIObject p)
        {
            VCard o = (VCard)p;

            this.ClearProperties();

            groupName = o.Group;

            fn = (FormattedNameProperty)o.FormattedName.Clone();
            name = (NameProperty)o.Name.Clone();
            title = (TitleProperty)o.Title.Clone();
            role = (RoleProperty)o.Role.Clone();
            mailer = (MailerProperty)o.Mailer.Clone();
            url = (UrlProperty)o.Url.Clone();
            org = (OrganizationProperty)o.Organization.Clone();
            uid = (UniqueIdProperty)o.UniqueId.Clone();
            bday = (BirthDateProperty)o.BirthDate.Clone();
            rev = (LastRevisionProperty)o.LastRevision.Clone();
            tz = (TimeZoneProperty)o.TimeZone.Clone();
            geo = (GeographicPositionProperty)o.GeographicPosition.Clone();
            key = (PublicKeyProperty)o.PublicKey.Clone();
            photo = (PhotoProperty)o.Photo.Clone();
            logo = (LogoProperty)o.Logo.Clone();
            sound = (SoundProperty)o.Sound.Clone();

            this.Notes.CloneRange(o.Notes);
            this.Addresses.CloneRange(o.Addresses);
            this.Labels.CloneRange(o.Labels);
            this.Telephones.CloneRange(o.Telephones);
            this.EMailAddresses.CloneRange(o.EMailAddresses);
            this.Agents.CloneRange(o.Agents);
            this.CustomProperties.CloneRange(o.CustomProperties);

            addProfile = o.AddProfile;
            mimeName = (MimeNameProperty)o.MimeName.Clone();
            mimeSource = (MimeSourceProperty)o.MimeSource.Clone();
            prodId = (ProductIdProperty)o.ProductId.Clone();
            nickname = (NicknameProperty)o.Nickname.Clone();
            sortString = (SortStringProperty)o.SortString.Clone();
            classification = (ClassificationProperty)o.Classification.Clone();
            categories = (CategoriesProperty)o.Categories.Clone();
        }
コード例 #4
0
ファイル: VCard.cs プロジェクト: modulexcite/PDI
        /// <summary>
        /// The method can be called to clear all current property values from the vCard.  The version is left
        /// unchanged.
        /// </summary>
        public void ClearProperties()
        {
            groupName = null;

            fn = null;
            name = null;
            title = null;
            role = null;
            mailer = null;
            url = null;
            org = null;
            uid = null;
            bday = null;
            rev = null;
            tz = null;
            geo = null;
            key = null;
            photo = null;
            logo = null;
            sound = null;

            notes = null;
            addrs = null;
            labels = null;
            phones = null;
            email = null;
            agents = null;
            customProps = null;

            addProfile = false;
            mimeName = null;
            mimeSource = null;
            prodId = null;
            nickname = null;
            sortString = null;
            classification = null;
            categories = null;
        }
コード例 #5
0
ファイル: TimeZoneProperty.cs プロジェクト: modulexcite/PDI
        //=====================================================================

        /// <summary>
        /// This is overridden to allow cloning of a PDI object
        /// </summary>
        /// <returns>A clone of the object</returns>
        public override object Clone()
        {
            TimeZoneProperty o = new TimeZoneProperty();
            o.Clone(this);
            return o;
        }