public LanguagesWrapper Add(string from, string to) { LanguagesWrapper w = new LanguagesWrapper(from, to); collection.Add(w); return(w); }
private void init_languages() { try { var xml = new XmlDocument(); using (var stream = ResourcesHelper.ReadResources <DBDriverProvice>("Setting.Languages.xml")) { xml.Load(stream); } var root = xml.SelectSingleNode("/Languages"); if (root.HasChildNodes) { foreach (XmlNode item in root.ChildNodes) { string key = item.Attributes["From"].Value; string to = item.Attributes["To"].Value; LanguagesWrapper w = languages.Add(key, to); if (item.HasChildNodes) { foreach (XmlNode child in item) { w.languages.Add(new LanguagesType(child.Attributes["From"].Value, child.Attributes["To"].Value)); } } } } } catch (Exception ex) { } }
public LanguagesWrapper Add(string from, string to) { LanguagesWrapper w = new LanguagesWrapper(from, to); collection.Add(w); return w; }