| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- 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);
- }
- /// <summary>
- /// Saves the market RESX.
- /// </summary>
- /// <param name="hastableResx">The hastable RESX.</param>
- /// <param name="ver">The ver.</param>
- /// <param name="filePath">The file path.</param>
- public static void SaveMarketResx(Hashtable hastableResx, ulong ver, string filePath)
- {
- string path = Path.Combine(filePath, _fileName);
- ResxManagerHelper.SaveData(hastableResx, ver, path);
- }
- /// <summary>
- /// Gets the market RESX.
- /// </summary>
- /// <param name="filePath">The file path.</param>
- /// <returns>CommonResx.</returns>
- private static CommonResx GetMarketResx(string filePath)
- {
- string path = Path.Combine(filePath, _fileName);
- return ResxManagerHelper.GetData(path);
- }
- #endregion
- }
- }
|