Exemple #1
0
        /// <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();
        }
Exemple #2
0
        /// <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;
        }