Ejemplo n.º 1
0
        private static bool RestrictProc(GDMIndividualRecord iRec, TreeTools.TreeWalkMode mode, object extData)
        {
            bool visible = (bool)extData;

            GMHelper.SetVisibility(iRec, visible);
            return(true);
        }
Ejemplo n.º 2
0
 // Marks the given source citation as (un)restricted
 public static void RestrictSource(GDMTree tree, GDMSourceCitation sc, bool visible)
 {
     if (tree != null && sc != null)
     {
         var sourceRec = tree.GetPtrValue <GDMSourceRecord>(sc);
         if (sourceRec != null)
         {
             GMHelper.SetVisibility(sourceRec, visible);
         }
     }
 }
Ejemplo n.º 3
0
        public static int SetAllMFRsVisible(GDMTree tree, GDMRecord record, bool visible)
        {
            int nChanged = 0;

            foreach (GDMMultimediaLink mfr in record.MultimediaLinks)
            {
                var mmRec = tree.GetPtrValue <GDMMultimediaRecord>(mfr);
                if (mmRec != null && GMHelper.GetVisibility(mmRec) != visible)
                {
                    GMHelper.SetVisibility(mmRec, visible);
                    nChanged++;
                }
            }
            return(nChanged);
        }
Ejemplo n.º 4
0
        public static void RestrictUnmarked(GDMTree tree, List <GDMRecord> marks, out int changed)
        {
            changed = 0;
            var       treeEnum = tree.GetEnumerator(GDMRecordType.rtIndividual);
            GDMRecord record;

            while (treeEnum.MoveNext(out record))
            {
                if (!marks.Contains(record))
                {
                    GMHelper.SetVisibility(record, false);
                    changed++;
                }
            }
        }