/// <summary> /// Initializes a new instance of the <see cref="GedcomMultimediaRecord"/> class. /// </summary> /// <param name="database">The database to associate with this record.</param> public GedcomMultimediaRecord(GedcomDatabase database) : this() { Database = database; Level = 0; XRefID = database.GenerateXref("OBJE"); database.Add(XRefID, this); }
/// <summary> /// Initializes a new instance of the <see cref="GedcomNoteRecord"/> class. /// </summary> /// <param name="database">The database to associate with this record.</param> public GedcomNoteRecord(GedcomDatabase database) : this() { Level = 0; Database = database; XRefID = database.GenerateXref("NOTE"); Text = string.Empty; database.Add(XRefID, this); }
/// <summary> /// Initializes a new instance of the <see cref="GedcomSubmitterRecord"/> class. /// </summary> /// <param name="database">The database to associate with this record.</param> public GedcomSubmitterRecord(GedcomDatabase database) : this() { Database = database; Level = 0; XRefID = database.GenerateXref("S"); database.Add(XRefID, this); }
/// <summary> /// Initializes a new instance of the <see cref="GedcomRepositoryRecord"/> class. /// </summary> /// <param name="database">The database to associate with this record.</param> public GedcomRepositoryRecord(GedcomDatabase database) : this() { Database = database; Level = 0; Name = "New Repository"; XRefID = database.GenerateXref("REPO"); database.Add(XRefID, this); }
/// <summary> /// Initializes a new instance of the <see cref="GedcomFamilyRecord" /> class. /// </summary> /// <param name="database">The database to associate with this record.</param> /// <param name="indi1">The first individual.</param> /// <param name="indi2">The second individual.</param> public GedcomFamilyRecord(GedcomDatabase database, GedcomIndividualRecord indi1, GedcomIndividualRecord indi2) : this() { Level = 0; Database = database; XRefID = database.GenerateXref("FAM"); if (indi1 != null) { GedcomFamilyLink link = new GedcomFamilyLink(); link.Database = database; link.Family = XRefID; link.Individual = indi1.XRefID; indi1.SpouseIn.Add(link); if (indi2 != null) { link = new GedcomFamilyLink(); link.Database = database; link.Family = XRefID; link.Individual = indi2.XRefID; indi2.SpouseIn.Add(link); } switch (indi1.Sex) { case GedcomSex.Female: Wife = indi1.XRefID; if (indi2 != null) { Husband = indi2.XRefID; } break; default: // got to put some where if not male or female, // go with same as male Husband = indi1.XRefID; if (indi2 != null) { Wife = indi2.XRefID; } break; } } database.Add(XRefID, this); }
/// <summary> /// Initializes a new instance of the <see cref="GedcomSourceRecord"/> class. /// </summary> /// <param name="database">The database to associate with this record.</param> public GedcomSourceRecord(GedcomDatabase database) : this() { Database = database; Level = 0; Title = "New Source"; // default to filer being current user #if __MonoCS__ // bug in mono code, doesn't correctly get the real name, need to strip off , chars FiledBy = UnixUserInfo.GetRealUser().RealName.Trim(new char[] { ',' }); #endif if (string.IsNullOrEmpty(FiledBy)) { FiledBy = Environment.UserName; } XRefID = database.GenerateXref("SOURCE"); database.Add(XRefID, this); }