Example #1
0
        public override void MoveTo(GDMRecord targetRecord, bool clearDest)
        {
            GDMSourceRecord targetSource = targetRecord as GDMSourceRecord;

            if (targetSource == null)
            {
                throw new ArgumentException(@"Argument is null or wrong type", "targetRecord");
            }

            GDMLines titl = new GDMLines();
            GDMLines orig = new GDMLines();
            GDMLines publ = new GDMLines();
            GDMLines text = new GDMLines();

            titl.Text = (targetSource.Title.Lines.Text + "\n" + Title.Lines.Text).Trim();
            orig.Text = (targetSource.Originator.Lines.Text + "\n" + Originator.Lines.Text).Trim();
            publ.Text = (targetSource.Publication.Lines.Text + "\n" + Publication.Lines.Text).Trim();
            text.Text = (targetSource.Text.Lines.Text + "\n" + Text.Lines.Text).Trim();

            base.MoveTo(targetRecord, clearDest);

            targetSource.Title.Lines.Assign(titl);
            targetSource.Originator.Lines.Assign(orig);
            targetSource.Publication.Lines.Assign(publ);
            targetSource.Text.Lines.Assign(text);

            while (fRepositoryCitations.Count > 0)
            {
                GDMRepositoryCitation obj = fRepositoryCitations.Extract(0);
                obj.ResetOwner(targetSource);
                targetSource.RepositoryCitations.Add(obj);
            }
        }
Example #2
0
        public GDMRepositoryCitation AddRepository(GDMRepositoryRecord repRec)
        {
            GDMRepositoryCitation cit = null;

            if (repRec != null)
            {
                cit       = new GDMRepositoryCitation(this);
                cit.Value = repRec;
                fRepositoryCitations.Add(cit);
            }

            return(cit);
        }
Example #3
0
        public GDMRepositoryCitation AddRepository(GDMRepositoryRecord repRec)
        {
            GDMRepositoryCitation cit = null;

            if (repRec != null)
            {
                cit      = new GDMRepositoryCitation();
                cit.XRef = repRec.XRef;
                fRepositoryCitations.Add(cit);
            }

            return(cit);
        }
        private static void GEDCOMRepositoryCitationTest(GDMSourceRecord sourRec, GDMRepositoryRecord repRec)
        {
            GDMRepositoryCitation repCit = sourRec.AddRepository(repRec);

            Assert.IsFalse(repCit.IsEmpty(), "repCit.IsEmpty()"); // its pointer
        }