예제 #1
0
        public static string GetString(string name, object[] args)
        {
            EntityRes loader = EntityRes.GetLoader();

            if (loader != null)
            {
                string str = loader.resources.GetString(name, EntityRes.Culture);
                if (args == null || (int)args.Length <= 0)
                {
                    return(str);
                }
                else
                {
                    for (int i = 0; i < (int)args.Length; i++)
                    {
                        string str1 = args[i] as string;
                        if (str1 != null && str1.Length > 0x400)
                        {
                            args[i] = string.Concat(str1.Substring(0, 0x3fd), "...");
                        }
                    }
                    return(string.Format(CultureInfo.CurrentCulture, str, args));
                }
            }
            else
            {
                return(null);
            }
        }
예제 #2
0
        public static string GetString(string name)
        {
            EntityRes loader = EntityRes.GetLoader();

            if (loader != null)
            {
                return(loader.resources.GetString(name, EntityRes.Culture));
            }
            else
            {
                return(null);
            }
        }