public void AddCultureFile(ResourceFileBase file) { if (!cultures.ContainsKey(file.Culture)) cultures.Add(file.Culture, new VSCulture(file.Culture)); cultures[file.Culture].Files.Add(file); }
internal void SaveProjectFile() { if (projectXml != null) { try { var file = new FileInfo(GetProjectFilePath()); bool isReadOnly = file.IsReadOnly; if (isReadOnly) { ResourceFileBase.SetReadOnlyAttribute(file, false); } projectXml.Save(file.FullName); if (isReadOnly) { ResourceFileBase.SetReadOnlyAttribute(file, true); } projectXml = null; namespaceManager = null; } catch (Exception e) { log4net.ILog log = log4net.LogManager.GetLogger(typeof(VSProject)); log.Error("Project file could not be saved.", e); } } }
public void AddCultureFile(ResourceFileBase file) { if (!cultures.ContainsKey(file.Culture)) { cultures.Add(file.Culture, new VSCulture(file.Culture)); } cultures[file.Culture].Files.Add(file); }
internal void ChangeCulture(ResourceFileBase resourceFile, CultureInfo newCulture) { if (!cultures.ContainsKey(newCulture)) { cultures.Add(newCulture, new VSCulture(newCulture)); } if (cultures[resourceFile.Culture].Files.Contains(resourceFile)) { cultures[resourceFile.Culture].Files.Remove(resourceFile); } cultures[newCulture].Files.Add(resourceFile); }
internal void ChangeCulture(ResourceFileBase resourceFile, CultureInfo newCulture) { if (!cultures.ContainsKey(newCulture)) cultures.Add(newCulture, new VSCulture(newCulture)); if (cultures[resourceFile.Culture].Files.Contains(resourceFile)) cultures[resourceFile.Culture].Files.Remove(resourceFile); cultures[newCulture].Files.Add(resourceFile); }