Пример #1
0
        private void SyncLangFile(LanguageFile lFileEng, LanguageFile lFileSync)
        {
            bool changed = false;

            foreach (EasyPropertiesNode nodeEng in lFileEng.Ps.GetChildProperties())
            {
                if (nodeEng.Name.Equals(LanguageFile.LANGUAGE_PROPERTIES_NODE_NAME))
                {
                    continue;
                }

                EasyPropertiesNode            nodeSync = lFileSync.Ps[nodeEng.Name];
                EasyPropertiesNode.Property[] valsEng  = nodeEng.GetValues();

                foreach (EasyPropertiesNode.Property valEng in valsEng)
                {
                    if (nodeSync.ContainsProperty(valEng.Name))
                    {
                        continue;
                    }
                    changed = true;
                    nodeSync.SetValue <string>(valEng.Name, (string)valEng.Value);
                }
            }
            if (!changed)
            {
                return;
            }
            lFileSync.Save();
        }
Пример #2
0
 public void SetPhrase(string name, string value)
 {
     _epn.SetValue <string>(name, value);
 }