using System;
using System.Resources;
using System.Threading;
using System.Globalization;
using System.Reflection;
namespace FCKPro
{
/// <summary>
/// ResManager 的摘要描述。
/// </summary>
public class ResManager
{
private static ResourceManager wRM;
private static ResManager mResManager;
/// <summary>
/// 私有構造函數
/// </summary>
/// <param name="_resourceFileName">資源檔的名字</param>
private ResManager(string _resourceFileName)
{
//
// TODO: 在此加入建構函式的程式碼
//
wRM = new ResourceManager(_str, Assembly.GetExecutingAssembly());
}
/// <summary>
/// 靜態函數,獲取本地化資源
/// </summary>
/// <param name="_name">需要本地化資源的名字,需在資源檔中有定義</param>
/// <param name="_resourceFileName">資源檔的名字</param>
/// <returns>從資源檔中取得_name所對應的本地化資源</returns>
public static string GetString(string _name,string _resourceFileName)
{
if(mResManager==null)
mResManager=new ResManager(_resourceFileName);
return wRM.GetString(_name);
}
public static string GetString(string _name)
{
return GetString(_name,"FCKPro.ResourceEnglish");
}
}
}