private static void CheckEventPlace(GDMCustomEvent aEvent) { GDMPlace place = aEvent.FindTag(GEDCOMTagName.PLAC, 0) as GDMPlace; if (place == null) { return; } GDMPointer placeLocation = place.FindTag(GEDCOMTagName._LOC, 0) as GDMPointer; if (placeLocation == null) { return; } if (placeLocation.XRef != "" && placeLocation.Value == null) { placeLocation.XRef = ""; } if (place.StringValue != "") { GDMLocationRecord loc = placeLocation.Value as GDMLocationRecord; if (loc != null && place.StringValue != loc.LocationName) { place.StringValue = loc.LocationName; } } }
public void JumpToRecord(GDMPointer pointer) { if (pointer != null && Accept()) { fBase.SelectRecordByXRef(pointer.XRef); fView.Close(); } }
private static void CheckEventPlace(GDMCustomEvent evt) { GDMPlace place = evt.Place; GDMPointer placeLocation = place.Location; if (placeLocation.XRef != "" && placeLocation.Value == null) { placeLocation.XRef = ""; } if (place.StringValue != "") { GDMLocationRecord locRec = placeLocation.Value as GDMLocationRecord; if (locRec != null && place.StringValue != locRec.LocationName) { place.StringValue = locRec.LocationName; } } }
private void CheckEventPlace(GDMPlace place) { GDMPointer placeLocation = place.Location; GDMLocationRecord locRec = fTree.GetPtrValue <GDMLocationRecord>(placeLocation); if (placeLocation.XRef != "" && locRec == null) { placeLocation.XRef = ""; } if (place.StringValue != "") { if (locRec != null && place.StringValue != locRec.LocationName) { place.StringValue = locRec.LocationName; } } CheckTagWithNotes(place); }
private static void CheckEventPlace(GDMTree tree, GEDCOMFormat format, GDMPlace place) { GDMPointer placeLocation = place.Location; if (placeLocation.XRef != "" && placeLocation.Value == null) { placeLocation.XRef = ""; } if (place.StringValue != "") { GDMLocationRecord locRec = placeLocation.Value as GDMLocationRecord; if (locRec != null && place.StringValue != locRec.LocationName) { place.StringValue = locRec.LocationName; } } CheckTagWithNotes(tree, format, place); }
public void Test_ParseGEDCOMPointer() { using (var ptr = new GDMPointer(null)) { string remainder = ptr.ParseString(" @I1111@ test"); Assert.AreEqual("I1111", ptr.XRef); Assert.AreEqual(" test", remainder); remainder = ptr.ParseString(" @#I1111@ test21"); Assert.AreEqual("", ptr.XRef); Assert.AreEqual("@#I1111@ test21", remainder); remainder = ptr.ParseString(" test2"); Assert.AreEqual("", ptr.XRef); Assert.AreEqual("test2", remainder); remainder = ptr.ParseString(" "); Assert.AreEqual("", ptr.XRef); Assert.AreEqual("", remainder); remainder = ptr.ParseString(""); Assert.AreEqual("", ptr.XRef); Assert.AreEqual("", remainder); } }