Esempio n. 1
0
        public static GDMNotes AddNote(this IGDMStructWithNotes _struct, GDMNoteRecord noteRec)
        {
            GDMNotes note = null;

            if (noteRec != null)
            {
                note      = new GDMNotes();
                note.XRef = noteRec.XRef;
                _struct.Notes.Add(note);
            }

            return(note);
        }
Esempio n. 2
0
        public static GDMNotes AddNote(this IGDMStructWithNotes _struct, GDMNoteRecord noteRec)
        {
            GDMNotes note = null;

            if (noteRec != null)
            {
                note       = new GDMNotes((GDMObject)_struct);
                note.Value = noteRec;
                _struct.Notes.Add(note);
            }

            return(note);
        }
Esempio n. 3
0
 public static GDMNotes FindNotes(this IGDMStructWithNotes _struct, GDMNoteRecord noteRec)
 {
     if (noteRec != null && _struct.HasNotes)
     {
         int num = _struct.Notes.Count;
         for (int i = 0; i < num; i++)
         {
             var notes = _struct.Notes[i];
             if (notes.XRef == noteRec.XRef)
             {
                 return(notes);
             }
         }
     }
     return(null);
 }
Esempio n. 4
0
 private static void CheckTagWithNotes(GDMTree tree, GEDCOMFormat format, IGDMStructWithNotes tag)
 {
     for (int i = tag.Notes.Count - 1; i >= 0; i--)
     {
         GDMNotes note = tag.Notes[i];
         if (!note.IsPointer)
         {
             TransformNote(tree, note);
         }
         else
         {
             if (note.Value == null)
             {
                 tag.Notes.DeleteAt(i);
             }
         }
     }
 }
Esempio n. 5
0
 private void CheckTagWithNotes(IGDMStructWithNotes tag)
 {
     for (int i = tag.Notes.Count - 1; i >= 0; i--)
     {
         GDMNotes note = tag.Notes[i];
         if (!note.IsPointer)
         {
             TransformNote(note);
         }
         else
         {
             var noteRec = fTree.GetPtrValue <GDMNoteRecord>(note);
             if (noteRec == null)
             {
                 tag.Notes.DeleteAt(i);
             }
         }
     }
 }