private void ShowNote() { trace.TraceInformation("NotePanel::ShowNote(start) " + this.CanFocus); textBox.Text = ""; if (selectedIndividual != null) { IList <NoteClass> noteList = selectedIndividual.GetNoteList(); if (noteList != null) { foreach (NoteClass note in noteList) { if (textBox.Text != "") { textBox.Text += "\r\n\r\n"; } textBox.Text += note.note; trace.TraceInformation("ShowNote:" + note.note); } } } trace.TraceInformation("NotePanel::ShowNote(end) "); }
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); }