Esempio n. 1
0
        public LanguagesWrapper Add(string from, string to)
        {
            LanguagesWrapper w = new LanguagesWrapper(from, to);

            collection.Add(w);
            return(w);
        }
Esempio n. 2
0
 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)
     {
     }
 }
Esempio n. 3
0
 public LanguagesWrapper Add(string from, string to)
 {
     LanguagesWrapper w = new LanguagesWrapper(from, to);
     collection.Add(w);
     return w;
 }