示例#1
0
 public static RelationsTable GetTable(List <RelationBetweenTwoPerson> relationList = null)
 {
     if (_relationsTable == null)
     {
         if (relationList == null)
         {
             _relationsTable = new RelationsTable();
         }
         else
         {
             _relationsTable = new RelationsTable(relationList);
         }
     }
     if (relationList != null)
     {
         _relationsTable._relationsList = relationList;
     }
     return(_relationsTable);
 }
示例#2
0
 public GenTree(DateTime dateOfCreate, DateTime dateOfLastEdit,
                String name, string information, int id      = -1, List <Person> personList = null,
                List <RelationBetweenTwoPerson> relationList = null)
 {
     _dateOfCreate   = dateOfCreate;
     _dateOfLastEdit = dateOfLastEdit;
     _name           = name;
     _information    = information;
     _persons        = PersonList.GetPersonList(personList);
     _relationTable  = RelationsTable.GetTable(relationList);
     if (id == -1)
     {
         _id = (name + dateOfCreate.ToString() + information).GetHashCode();
     }
     else
     {
         _id = id;
     }
 }