Beispiel #1
0
        public static string GetString(ErrMsg.ID id)
        {
            string result = "";

            try
            {
                result = Resources.ResourceManager.GetString(id.ToString());
            }
            catch (Exception e)
            {
                string error = string.Format("Unable to locate requested string resource {0}", id);
                error += e.Message + "\n" + e.StackTrace;
                throw new Exception(error);
            }

            return(result);
        }
Beispiel #2
0
 public static string FormatString(ErrMsg.ID id, int value)
 {
     return(String.Format(GetString(id), value));
 }
Beispiel #3
0
 public static string FormatString(ErrMsg.ID id, params object[] parameters)
 {
     return(String.Format(GetString(id), parameters));
 }