private string CreateToolString() { string str = xref + "\n"; if (family != null) { IndividualEventClass ev = family.GetEvent(IndividualEventClass.EventType.FamMarriage); if (ev != null) { str += "Married "; FamilyDateTimeClass date = ev.GetDate(); if ((date != null) && (date.GetDateType() != FamilyDateTimeClass.FamilyDateType.Unknown)) { str += date.ToString(); } AddressClass address = ev.GetAddress(); if (address != null) { str += " in " + address.ToString(); } else { PlaceStructureClass place = ev.GetPlace(); if (place != null) { str += " in " + place.ToString(); } } str += "\n"; } IList <IndividualXrefClass> childList = family.GetChildList(); int children = 0; if (childList != null) { children = childList.Count; } IList <IndividualXrefClass> parentList = family.GetParentList(); int parents = 0; if (parentList != null) { parents = parentList.Count; } str += parents + " parents and " + children + " children"; } return(str); }
private string CreateToolString() { IndividualEventClass ev; FamilyDateTimeClass date; AddressClass address; string str = ""; str = individual.GetName() + "\n"; ev = individual.GetEvent(IndividualEventClass.EventType.Birth); if (ev != null) { str += "Born "; date = ev.GetDate(); if (date.GetDateType() != FamilyDateTimeClass.FamilyDateType.Unknown) { str += date.ToString(); } address = ev.GetAddress(); if (address != null) { str += " in " + address.ToString(); } else { PlaceStructureClass place = ev.GetPlace(); if (place != null) { str += " in " + place.ToString(); } } } str += "\n";// Environment.NewLine; ev = individual.GetEvent(IndividualEventClass.EventType.Death); if (ev != null) { str += "Died "; date = ev.GetDate(); if (date.GetDateType() != FamilyDateTimeClass.FamilyDateType.Unknown) { str += date.ToString(); } address = ev.GetAddress(); if (address != null) { str += " in " + address.ToString(); } else { PlaceStructureClass place = ev.GetPlace(); if (place != null) { str += " in " + place.ToString(); } } } { IList <NoteClass> noteList = individual.GetNoteList(); if (noteList != null) { foreach (NoteClass note in noteList) { if (note.note != null) { str += "\n";//Environment.NewLine; str += note.note.Replace("\r\n", "\n").Replace("\n\n", "\n"); //trace.TraceInformation("ShowNote:" + note.note); } } } } //str = str.Replace("\r\n", "\n"); //str = str.Replace("\n\r", "\n"); return(str); }
private string CreateToolString() { IndividualEventClass ev; FamilyDateTimeClass date; AddressClass address; string str = ""; if (individual == null) { return("Updating..." + xref); } str = individual.GetName() + " (" + xref + ")\n"; ev = individual.GetEvent(IndividualEventClass.EventType.Birth); if (ev != null) { str += "Born "; date = ev.GetDate(); if (date.GetDateType() != FamilyDateTimeClass.FamilyDateType.Unknown) { str += date.ToString(); } address = ev.GetAddress(); if (address != null) { str += " in " + address.ToString(); } else { PlaceStructureClass place = ev.GetPlace(); if (place != null) { str += " in " + place.ToString(); } } } str += "\n";// Environment.NewLine; ev = individual.GetEvent(IndividualEventClass.EventType.Death); if (ev != null) { str += "Died "; date = ev.GetDate(); if (date.GetDateType() != FamilyDateTimeClass.FamilyDateType.Unknown) { str += date.ToString(); } address = ev.GetAddress(); if (address != null) { str += " in " + address.ToString(); } else { PlaceStructureClass place = ev.GetPlace(); if (place != null) { str += " in " + place.ToString(); } } } { IList <FamilyXrefClass> childList = individual.GetFamilyChildList(); int childFamilies = 0; if (childList != null) { childFamilies = childList.Count; } IList <FamilyXrefClass> spouseList = individual.GetFamilySpouseList(); int spouseFamilies = 0; if (spouseList != null) { spouseFamilies = spouseList.Count; } str += "\nChild in " + childFamilies + " families and spouse in " + spouseFamilies + " families"; } { IList <NoteClass> noteList = individual.GetNoteList(); if (noteList != null) { foreach (NoteClass note in noteList) { if (note.note != null) { str += "\n";//Environment.NewLine; str += note.note.Replace("\r\n", "\n").Replace("\n\n", "\n"); //trace.TraceInformation("ShowNote:" + note.note); } } } } //str = str.Replace("\r\n", "\n"); //str = str.Replace("\n\r", "\n"); return(str); }