private void ProcessRootLevel(string[] lineArray) { switch (_currentRecord) { case GedcomRecordEnum.Individual: Individuals.Add(_currentIndividual); break; case GedcomRecordEnum.Family: Families.Add(_currentFamily); break; case GedcomRecordEnum.Note: Notes.Add(_currentNote); break; } if (lineArray[1] == "HEAD") { _currentRecord = GedcomRecordEnum.Header; _currentSubRecord = GedcomSubRecordEnum.None; } else if (lineArray[1].IndexOf("@") >= 0) { switch (lineArray[2]) { case "INDI": _currentRecord = GedcomRecordEnum.Individual; _currentIndividual = new Individual { Id = lineArray[1] }; _currentSubRecord = GedcomSubRecordEnum.None; break; case "FAM": _currentRecord = GedcomRecordEnum.Family; _currentFamily = new Family { Id = lineArray[1] }; _currentSubRecord = GedcomSubRecordEnum.None; break; case "NOTE": _currentRecord = GedcomRecordEnum.Note; _currentNote = new Note { Id = lineArray[1] }; _currentSubRecord = GedcomSubRecordEnum.None; break; } } }
Shape Render(Family fam, double x, double y) { const double height = 0.4; const double width = 0.8; var shape = _page.DrawOval(x - width / 2, y - height / 2, x + width / 2, y + height / 2); shape.Text = FormatDate(fam.MarriageDate); shape.Characters.CharProps[(short)VisCellIndices.visCharacterSize] = 8; VisioHelper.SetCustomProperty(shape, "_UID", "Unique Identification Number", fam.Uid); VisioHelper.SetCustomProperty(shape, "ID", "gedcom ID", fam.Id); VisioHelper.SetCustomProperty(shape, "MarriageDate", fam.MarriageDate); return shape; }