using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Collections; using Muchinfo.PC.Common.Bosn; namespace Muchinfo.MTPClient.Resources { public class MarketResxManager { private const string _fileName = "MarketResx.dll"; public static CommonResx MarketResx { get; set; } public static string MarketDesc(string constKey) { if (MarketResx != null && MarketResx.ResourceHashtable != null && MarketResx.ResourceHashtable.ContainsKey(constKey)) { return MarketResx.ResourceHashtable[constKey] as string; } else { return Client_Resource.ResourceManager.GetString(constKey); } } #region 数据存在UserData目录 public static void InitMarketResx(string filePath) { MarketResx = GetMarketResx(filePath); } /// /// Saves the market RESX. /// /// The hastable RESX. /// The ver. /// The file path. public static void SaveMarketResx(Hashtable hastableResx, ulong ver, string filePath) { string path = Path.Combine(filePath, _fileName); ResxManagerHelper.SaveData(hastableResx, ver, path); } /// /// Gets the market RESX. /// /// The file path. /// CommonResx. private static CommonResx GetMarketResx(string filePath) { string path = Path.Combine(filePath, _fileName); return ResxManagerHelper.GetData(path); } #endregion } }