示例#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 Save()
        {
            if (_current == null)
            {
                return;
            }

            _current.Save();
            _current.File.Refresh();
            _currentModifyTime = _current.File.LastWriteTime;
        }