public CountryDescriptions(MessageQueue message) { _message = message; try { XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(WOTHelper.GetSettingsFile()); XmlElement root = xmlDoc.DocumentElement; XmlNodeList nodes = root.SelectSingleNode(@"Countries").ChildNodes; foreach (XmlNode node in nodes) { _countries.Add(int.Parse(node.Attributes["Code"].Value), Translations.TranslationGet(node.Attributes["Code"].Value, "DE", node.InnerText)); } } catch (Exception) { File.Copy(Path.Combine(WOTHelper.GetEXEPath(), "settings.xml"), WOTHelper.GetSettingsFile()); XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(WOTHelper.GetSettingsFile()); XmlElement root = xmlDoc.DocumentElement; XmlNodeList nodes = root.SelectSingleNode(@"Countries").ChildNodes; foreach (XmlNode node in nodes) { _countries.Add(int.Parse(node.Attributes["Code"].Value), Translations.TranslationGet(node.Attributes["Code"].Value, "DE", node.InnerText)); } } }
protected internal string MasterBadgeImage(int masterLevel) { if (File.Exists(string.Format(@"{0}\Images\MasterBadge\{1}.png", WOTHelper.GetEXEPath(), masterLevel))) #if DEBUG { return(string.Empty); } #else { return(String.Format(@"<Image src='{0}\Images\MasterBadge\{1}.png' alt='{2}'/>", WOTHelper.GetEXEPath(), masterLevel, MasterBadgeDescription(masterLevel))); }