private XElement ProcessShellListFile(string nation) { return(BigworldXmlPreprocessor.LoadFile(_paths.GetShellListFile(nation)) .TrimNameTail() .RemoveElement("icons") .ProcessElements(e => e.NameToAttribute("shell") .ProcessPriceElement() .LocalizeValue("userString", _localization))); }
internal LocalGameClientPackageImage(LocalGameClientPath paths) { _paths = paths; using (var reader = new BigworldXmlReader(_paths.GetShellListFile(_paths.Nations[0]))) { var element = XElement.Load(reader); _shellIcons = element.Element("icons") .Elements() .ToDictionary(e => e.Name.ToString(), e => PackageImage.Load(_paths.GuiPackageFile, "gui/maps/icons/shell/" + e.Value.Split(' ').First())); } _accessoryIcons = new Dictionary <string, ImageSource>(); _skillIcons = new Dictionary <string, ImageSource>(); _skillSmallIcons = new Dictionary <string, ImageSource>(); _nationSmallIcons = new Dictionary <string, ImageSource>(); _tankSmallIcons = new Dictionary <string, ImageSource>(); _tankBigIcons = new Dictionary <string, ImageSource>(); _tankCountorIcons = new Dictionary <string, ImageSource>(); using (var reader = new BigworldXmlReader(_paths.CommonCrewDataFile)) { var element = XElement.Load(reader); _crewRoleIcons = element.Element("roles") .Elements() .ToDictionary(e => e.Name.ToString(), e => PackageImage.Load(_paths.GuiPackageFile, "gui/maps/icons/tankmen/roles/big/" + e.Element("icon").Value)); _crewRoleSmallIcons = element.Element("roles") .Elements() .ToDictionary(e => e.Name.ToString(), e => PackageImage.Load(_paths.GuiPackageFile, "gui/maps/icons/tankmen/roles/small/" + e.Element("icon").Value)); } }