示例#1
0
        public override void Clear()
        {
            base.Clear();

            if (fAddress != null)
            {
                fAddress.Clear();
            }
            fAgency         = string.Empty;
            fCause          = string.Empty;
            fClassification = string.Empty;
            fDate.Clear();
            if (fPlace != null)
            {
                fPlace.Clear();
            }
            fReligiousAffilation = string.Empty;
            fRestriction         = GDMRestriction.rnNone;
            if (fNotes != null)
            {
                fNotes.Clear();
            }
            if (fSourceCitations != null)
            {
                fSourceCitations.Clear();
            }
            if (fMultimediaLinks != null)
            {
                fMultimediaLinks.Clear();
            }
        }
示例#2
0
        public override void Clear()
        {
            base.Clear();

            fDate.Clear();
            fPlace.Clear();
        }
示例#3
0
        public void Test_Common()
        {
            using (GDMPlace place = new GDMPlace(null)) {
                Assert.IsNotNull(place);

                place.Form = "abrakadabra";
                Assert.AreEqual("abrakadabra", place.Form);

                Assert.IsNotNull(place.Map);
                Assert.IsNotNull(place.Location);

                var note = new GDMNotes(place);
                note.Lines.Text = "place notes";
                place.Notes.Add(note);

                using (GDMPlace place2 = new GDMPlace(null)) {
                    Assert.Throws(typeof(ArgumentException), () => {
                        place2.Assign(null);
                    });

                    place2.Assign(place);

                    string buf = TestUtils.GetTagStreamText(place2, 1);
                    Assert.AreEqual("1 PLAC\r\n" +
                                    "2 NOTE place notes\r\n" +
                                    "2 FORM abrakadabra\r\n", buf);
                }

                place.ReplaceXRefs(new GDMXRefReplacer());

                Assert.IsFalse(place.IsEmpty());
                place.Clear();
                Assert.IsTrue(place.IsEmpty());
            }
        }
示例#4
0
        public override void Clear()
        {
            base.Clear();

            fDate.Clear();
            if (fPlace != null)
            {
                fPlace.Clear();
            }
        }
示例#5
0
        public override void Clear()
        {
            base.Clear();

            fAddress.Clear();
            fAgency         = string.Empty;
            fCause          = string.Empty;
            fClassification = string.Empty;
            fDate.Clear();
            fPlace.Clear();
            fReligiousAffilation = string.Empty;
            fRestriction         = GDMRestriction.rnNone;
        }
示例#6
0
        public override void Clear()
        {
            base.Clear();

            fAddress.Clear();
            fAgency         = string.Empty;
            fCause          = string.Empty;
            fClassification = string.Empty;
            fDate.Clear();
            fPlace.Clear();
            fReligiousAffilation = string.Empty;
            fRestriction         = GDMRestriction.rnNone;
            fNotes.Clear();
            fSourceCitations.Clear();
            fMultimediaLinks.Clear();
        }
示例#7
0
        public override void Clear()
        {
            base.Clear();

            fCharacterSet.Clear();
            fCopyright = string.Empty;
            fFile.Clear();
            fGEDCOM.Clear();
            fLanguage = GDMLanguageID.Unknown;
            fNote.Clear();
            fPlace.Clear();
            fReceivingSystemName = string.Empty;
            fSource.Clear();
            fSubmission.Clear();
            fSubmitter.Clear();
            fTransmissionDateTime = new DateTime(0);
        }
示例#8
0
        public void Test_Common()
        {
            using (GDMPlace place = new GDMPlace()) {
                Assert.IsNotNull(place);

                place.Form = "abrakadabra";
                Assert.AreEqual("abrakadabra", place.Form);

                Assert.IsNotNull(place.Map);
                Assert.IsNotNull(place.Location);

                var note = new GDMNotes();
                note.Lines.Text = "place notes";
                place.Notes.Add(note);

                using (GDMPlace place2 = new GDMPlace()) {
                    Assert.Throws(typeof(ArgumentException), () => {
                        place2.Assign(null);
                    });

                    var iRec = new GDMIndividualRecord(null);
                    var evt  = new GDMIndividualEvent();
                    evt.SetName("BIRT");
                    iRec.Events.Add(evt);
                    //place2.Assign(place);
                    evt.Place.Assign(place);

                    string buf = TestUtils.GetTagStreamText(iRec, 1);
                    Assert.AreEqual("0 INDI\r\n" +
                                    "1 SEX U\r\n" +
                                    "1 BIRT\r\n" +
                                    "2 PLAC\r\n" +
                                    "3 NOTE place notes\r\n" +
                                    "3 FORM abrakadabra\r\n", buf);
                }

                place.ReplaceXRefs(new GDMXRefReplacer());

                Assert.IsFalse(place.IsEmpty());
                place.Clear();
                Assert.IsTrue(place.IsEmpty());
            }
        }