Ejemplo n.º 1
0
        public void SaveAs(string fileName)
        {
            if (fileName == null)
            {
                return;
            }

            var dict =
                new Dictionary <string, XElement>
            {
                { "Root", Root.ToX() },
                { "Config", ConfigDictionary.ToX() }
            };

            ZipUtils.Compress(
                fileName,
                dict,
                ImagePartTable,
                FunctionTable);
        }
Ejemplo n.º 2
0
 private IEnumerator <KeyValuePair <string, XElement> > GetXDicts()
 {
     foreach (var name in _dictNames)
     {
         var      dname = GetDictRealName(name);
         XElement xe;
         if (IsLoad(name))
         {
             xe = new XElement("Dict");
             foreach (var value in this[name])
             {
                 xe.Add(value.ToX());
             }
         }
         else
         {
             xe      = ZipUtils.Extract(Database.FileName, dname);
             xe.Name = "Dict";
         }
         yield return(new KeyValuePair <string, XElement>(dname, xe));
     }
 }