Ejemplo n.º 1
0
		public GedcomMultimediaRecord(GedcomDatabase database) : this()
		{
			Database = database;
			Level = 0;
						
			XRefID = database.GenerateXref("OBJE");
			database.Add(XRefID, this);
		}
Ejemplo n.º 2
0
		public GedcomNoteRecord(GedcomDatabase database) : this()
		{
			Level = 0;
			Database = database;
			XRefID = database.GenerateXref("NOTE");
			Text = string.Empty;
			
			database.Add(XRefID, this);
		}	
Ejemplo n.º 3
0
		public GedcomSubmitterRecord(GedcomDatabase database) : this()
		{
			Database = database;

			Level = 0;
			XRefID = database.GenerateXref("S");
						
			database.Add(XRefID, this);
		}
Ejemplo n.º 4
0
		public GedcomRepositoryRecord(GedcomDatabase database) : this()
		{		
			Database = database;
			Level = 0;
			
			Name = "New Repository";
			
			XRefID = database.GenerateXref("REPO");
			database.Add(XRefID, this);
		}
Ejemplo n.º 5
0
		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.Indi = indi1.XRefID;
				indi1.SpouseIn.Add(link);
				
				if (indi2 != null)
				{
					link = new GedcomFamilyLink();
					link.Database = database;
					link.Family = XRefID;
					link.Indi = 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);
		}
Ejemplo n.º 6
0
		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);
		}
Ejemplo n.º 7
0
		public GedcomIndividualRecord(GedcomDatabase database, string surname) : this()
		{
			Database = database;
			Level = 0;
			Sex = GedcomSex.Undetermined;
			XRefID = database.GenerateXref("I");

            if (!surname.Equals("unknown"))
            {
                GedcomName name = new GedcomName();
                name.Level = 1;
                name.Database = database;
                name.Name = "unknown /" + surname + "/";
                name.PreferedName = true;

                Names.Add(name);
            }
			
			database.Add(XRefID, this);
		}