Ejemplo n.º 1
0
        public bool Save(string xmlPath, StringCollection collection = null, bool exportStrings = true)
        {
            xmlPath = Path.GetFullPath(xmlPath);
            SavePropertiesXml(xmlPath);

            if (exportStrings)
            {
                var folder = Path.GetDirectoryName(xmlPath);
                if (string.IsNullOrEmpty(folder))
                {
                    return(false);
                }

                if (collection == null)
                {
                    foreach (var sCollection in StringCollections.Values)
                    {
                        sCollection.Save(Path.Combine(folder, sCollection.Key + @".xml"));
                    }
                }
                else
                {
                    collection.Save(Path.Combine(folder, collection.Key + @".xml"));
                }
            }

            return(true);
        }