public string GetText(MyPeople myPeople, int currentYear) { string retString = "Family (HOME): Generation " + Generation + "\r\n"; if (Generation == 0) { retString += "\tGENERATION ZERO\r\n"; } else { retString += "\tBride: " + myPeople.allPeople[BridePersonIndex].GetText(currentYear, BridePersonIndex) + "\r\n" + "\t\tWife's parents family index: " + myPeople.allPeople[BridePersonIndex].BirthFamilyIndex + "\r\n" + "\tGroom: " + myPeople.allPeople[GroomPersonIndex].GetText(currentYear, GroomPersonIndex) + "\r\n" + "\t\tHusband's parents family index: " + myPeople.allPeople[GroomPersonIndex].BirthFamilyIndex + "\r\n" + "\tMarriage: " + MarriageDate + "\r\n"; } foreach (int childPersonIndex in ChildrenPersonIndexList) { retString += "\t\tChild: " + myPeople.allPeople[childPersonIndex].GetText(currentYear, childPersonIndex) + "\r\n"; } return retString; }
public FamilyEvent(MyPeople myPeople, List<Family> allFamilies, FamilyEventType type, string date, int bridePersonIndex, int groomPersonIndex) { Date = date; EventType = type; BridePersonIndex = bridePersonIndex; GroompersonIndex = groomPersonIndex; Generation = allFamilies[myPeople.allPeople[groomPersonIndex].BirthFamilyIndex].Generation + 1; }