/// <summary>
/// 获取资源文件中的值
/// </summary>
/// <param name="Type">返回类型</param>
/// <param name="TagName">key</param>
/// <returns></returns>
public static object GetResource(ResourceType Type,string TagName)
{
System.Resources.ResourceManager rm = new System.Resources.ResourceManager("Business.Resources.Resource", System.Reflection.Assembly.GetExecutingAssembly());
if (Type == ResourceType.Image)
{
return (System.Drawing.Image)rm.GetObject(TagName) as System.Drawing.Image;
}
else
{
return (string)rm.GetObject(TagName) as string;
}
}
/// 获取资源文件中的值
/// </summary>
/// <param name="Type">返回类型</param>
/// <param name="TagName">key</param>
/// <returns></returns>
public static object GetResource(ResourceType Type,string TagName)
{
System.Resources.ResourceManager rm = new System.Resources.ResourceManager("Business.Resources.Resource", System.Reflection.Assembly.GetExecutingAssembly());
if (Type == ResourceType.Image)
{
return (System.Drawing.Image)rm.GetObject(TagName) as System.Drawing.Image;
}
else
{
return (string)rm.GetObject(TagName) as string;
}
}