Beispiel #1
0
        public static ItemResource[] LoadResources(Assembly assembly, LocaleType localeType)
        {
            string _Locale = localeType.ToString();

            string[] names = assembly.GetManifestResourceNames();

            List <string> lst    = new List <string>();
            string        locale = string.Format(".{0}.", _Locale);

            foreach (string s in names)
            {
                if (s.EndsWith(".lng") && s.Contains(locale))
                {
                    lst.Add(s);
                }
            }

            names = lst.ToArray();

            List <ItemResource> lstResult = new List <ItemResource>();

            foreach (String resourcename in names)
            {
                ItemResource[] res = LoadResourceByName(assembly, resourcename);
                lstResult.AddRange(res);
            }


            return(lstResult.ToArray());
        }
Beispiel #2
0
        public static ItemResource[] LoadResources(Assembly assembly, LocaleType localeType)
        {
            string _Locale = localeType.ToString();
            string[] names = assembly.GetManifestResourceNames();

            List<string> lst = new List<string>();
            string locale = string.Format(".{0}.", _Locale);
            foreach (string s in names)
            {
                if (s.EndsWith(".lng") && s.Contains(locale))
                    lst.Add(s);
            }

            names = lst.ToArray();

            List<ItemResource> lstResult = new List<ItemResource>();

            foreach (String resourcename in names)
            {
                ItemResource[] res = LoadResourceByName(assembly, resourcename);
                lstResult.AddRange(res);
            }

            return lstResult.ToArray();
        }
Beispiel #3
0
        private Uri BuildHistoryUrl(int type, LocaleType locale, string idOrName, OrderType bid)
        {
            string apiRelativeUrl = String.Format("history/for/type/{0}/{1}/{2}/bid/{3}", type, locale.ToString().ToLower(), idOrName, (int)bid);

            Uri apiUrl = new Uri(String.Format(ApiFormat, apiRelativeUrl, String.Empty));

            return(apiUrl);
        }