コード例 #1
0
        protected void SetChildXRefId(GEDCOMTag childTag, string xRefId)
        {
            GEDCOMRecord child = ChildRecords.GetLineByTag <GEDCOMRecord>(childTag);

            if (child == null)
            {
                ChildRecords.Add(new GEDCOMRecord(Level + 1, "", xRefId, childTag.ToString(), ""));
            }
            else
            {
                child._xRefId = xRefId;
            }
        }
コード例 #2
0
        protected void SetChildData(GEDCOMTag childTag, string data)
        {
            GEDCOMRecord child = ChildRecords.GetLineByTag <GEDCOMRecord>(childTag);

            if (child == null)
            {
                ChildRecords.Add(new GEDCOMRecord(Level + 1, "", "", childTag.ToString(), data));
            }
            else
            {
                child.Data = data;
            }
        }
コード例 #3
0
        protected void SetChildData(GEDCOMTag childTag, GEDCOMTag grandChildTag, string data)
        {
            GEDCOMRecord child = ChildRecords.GetLineByTag <GEDCOMRecord>(childTag);

            if (child == null)
            {
                child = new GEDCOMRecord(Level + 1, "", "", childTag.ToString(), "");
                ChildRecords.Add(child);
            }

            GEDCOMRecord grandChild = child.ChildRecords.GetLineByTag <GEDCOMRecord>(grandChildTag);

            if (grandChild == null)
            {
                child.ChildRecords.Add(new GEDCOMRecord(Level + 2, "", "", grandChildTag.ToString(), data));
            }
            else
            {
                grandChild.Data = data;
            }
        }
コード例 #4
0
 public void WriteTag(GEDCOMTag tagName)
 {
     WriteTag(tagName.ToString());
 }