Пример #1
0
        public void LoadUnions()
        {
            CSLib.File.CTextFile f       = new CSLib.File.CTextFile();
            CSLib.CVariables     Uniones = f.GetDirList(MyGenealogie.GeneaTools.UnionFolder, "*.*");

            foreach (CSLib.CVariable Unione in Uniones)
            {
                this.Add(new CUnion(Unione.Name));
            }
        }
        public void LoadPersons()
        {
            CSLib.File.CTextFile f        = new CSLib.File.CTextFile();
            CSLib.CVariables     Persones = f.GetDirList(MyGenealogie.GeneaTools.PersonFolder, "*.*");

            foreach (CSLib.CVariable Persone in Persones)
            {
                this.Add(Persone.Name);
            }

            //CPerson p = this["b07bf2bb-7209-4a62-bdf2-a9e2e668803f"];
            //p.Comment = p.LastName;
        }
Пример #3
0
        public void GeneratePersoneXML()
        {
            CSLib.File.CTextFile f        = new CSLib.File.CTextFile();
            CSLib.CVariables     Persones = f.GetDirList(PersonFolder, "*.*");

            string strXMLPersonTemplate = f.LoadFile(XMLPersonFileTemplate);

            foreach (CSLib.CVariable Persone in Persones)
            {
                string strPersonPath    = PersonFolder + @"\" + Persone.Name;
                string strPersonXMLFile = strPersonPath + @"\p.xml";

                if (!CSLib.File.CTextFile.Exist(strPersonXMLFile))
                {
                    string strXML = strXMLPersonTemplate;
                    strXML = CSLib.CSLibGlobal.PreProcess(strXML, "GUID", CSLib.CWindows.CreateGUIDKey(), "CREATION_DATE", this.Now);
                    f.LogFile(strPersonXMLFile, strXML, true);

                    System.Threading.Thread.Sleep(11);
                }
            }
        }