protected override void gameConfigCreate(string fileName, string name) { var cache = new ShareCacheStruct <ExchangeCode>(); System.IO.StreamReader stream = new System.IO.StreamReader(fileName); string line = ""; ExchangeCodeType type = (ExchangeCodeType)System.Enum.Parse(typeof(ExchangeCodeType), name, true); if ((byte)type < 0 || (byte)type > byte.MaxValue) { ConsoleLog.showErrorInfo(0, "exchangeCode type:" + fileName); } int index = 0; while ((line = stream.ReadLine()) != null) { // TODO if (false == ExchangeCodeMgr.Instance().Add((int)type, index++, line)) { ConsoleLog.showNotifyInfo(name + ":has been added", ConsoleLog.ConsoleLogType.Debug); break; } } stream.Close(); ConsoleLog.showNotifyInfo(fileName + " is update to new version."); }
public static ExchangeCodeMgr Instance() { if (null == _instance) { _instance = new ExchangeCodeMgr(); _instance.Init(); } return(_instance); }
public static ExchangeCodeMgr Instance() { if (null == _instance) { _instance = new ExchangeCodeMgr(); _instance.Init(); } return _instance; }