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

            GMHelper.SetVisibility(iRec, visible);
            return(true);
        }
Exemple #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);
         }
     }
 }
Exemple #3
0
        // Constructor, sets default values for the config
        private CConfig()
        {
            ConfigFilename       = "GEDmill Config";
            RestrictConfidential = false;
            RestrictPrivacy      = false;
            OutputFolder         = "";
            UnknownName          = "<unknown>"; // "no name" implied we knew them and they had no name.
            NameCapitalisation   = 1;
            Version                  = "1.11.0";
            HtmlExtension            = "html";
            CopyMultimedia           = true;
            ImageFolder              = "multimedia";
            RelativiseMultimedia     = false;
            ApplicationPath          = GMHelper.GetAppPath();
            BackgroundImage          = ApplicationPath + "\\bg-gedmill.jpg";
            MaxImageWidth            = 160;
            MaxImageHeight           = 160;
            MaxNumberMultimediaFiles = 32;
            AgeForOccupation         = 50;
            OwnersName               = Environment.UserName;
            NoSurname                = "No Surname";
            IndexTitle               = "Index Of Names";
            MaxSourceImageWidth      = 800;
            MaxSourceImageHeight     = 800;
            MaxThumbnailImageWidth   = 45;
            MaxThumbnailImageHeight  = 45;
            FirstRecordXRef          = "";
            SiteTitle                = "Family history";
            if (OwnersName != null && OwnersName != "")
            {
                SiteTitle += " of " + OwnersName;
            }
            InputFilename          = "";
            FrontPageImageFilename = ApplicationPath + "\\gedmill.jpg";
            TabSpaces = 8;
            PlaceWord = "in";
            CapitaliseEventDescriptions = true;
            RestrictAssociatedSources   = true;
            RenameMultimedia            = true;
            IndexLetterPerPage          = false;
            ShowFrontPageStats          = true;
            CommentaryText  = "";
            FtpServer       = "";
            FtpUsername     = "";
            FtpPassword     = "";
            FtpUploadFolder = "/";

            // Reset those settings that can be modified by the user on the config screen.
            ResetUserSettings();
        }
Exemple #4
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);
        }
Exemple #5
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++;
                }
            }
        }