public static DeclareActiveWeek Create(int in_activeId, int in_id, string in_name, string in_time, int in_week) { DeclareActiveWeek tmp = new DeclareActiveWeek(); tmp._activeId = in_activeId; tmp._id = in_id; tmp._name = in_name; tmp._time = in_time; tmp._week = in_week; return(tmp); }
public static void Convert(Dictionary <int, DeclareActiveWeek> data) { if (data == null) { return; } data.Clear(); data.Add(101, DeclareActiveWeek.Create(6, 101, StringDefines.Key_3722, StringDefines.Key_35795, 1)); data.Add(102, DeclareActiveWeek.Create(42, 102, StringDefines.Key_30778, StringDefines.Key_35796, 1)); data.Add(103, DeclareActiveWeek.Create(40, 103, StringDefines.Key_3989, StringDefines.Key_35797, 1)); data.Add(104, DeclareActiveWeek.Create(20, 104, StringDefines.Key_18369, StringDefines.Key_35798, 1)); data.Add(105, DeclareActiveWeek.Create(38, 105, StringDefines.Key_3987, StringDefines.Key_35799, 1)); data.Add(106, DeclareActiveWeek.Create(42, 106, StringDefines.Key_30778, StringDefines.Key_35800, 1)); data.Add(201, DeclareActiveWeek.Create(28, 201, StringDefines.Key_3963, StringDefines.Key_35801, 2)); data.Add(202, DeclareActiveWeek.Create(42, 202, StringDefines.Key_30778, StringDefines.Key_35796, 2)); data.Add(203, DeclareActiveWeek.Create(39, 203, StringDefines.Key_14831, StringDefines.Key_35802, 2)); data.Add(204, DeclareActiveWeek.Create(43, 204, StringDefines.Key_30783, StringDefines.Key_35881, 2)); data.Add(205, DeclareActiveWeek.Create(45, 205, StringDefines.Key_14701, StringDefines.Key_35799, 2)); data.Add(206, DeclareActiveWeek.Create(42, 206, StringDefines.Key_30778, StringDefines.Key_35800, 2)); data.Add(301, DeclareActiveWeek.Create(6, 301, StringDefines.Key_3722, StringDefines.Key_35795, 3)); data.Add(302, DeclareActiveWeek.Create(42, 302, StringDefines.Key_30778, StringDefines.Key_35796, 3)); data.Add(303, DeclareActiveWeek.Create(40, 303, StringDefines.Key_3989, StringDefines.Key_35797, 3)); data.Add(304, DeclareActiveWeek.Create(20, 304, StringDefines.Key_18369, StringDefines.Key_35798, 3)); data.Add(305, DeclareActiveWeek.Create(38, 305, StringDefines.Key_3987, StringDefines.Key_35799, 3)); data.Add(306, DeclareActiveWeek.Create(42, 306, StringDefines.Key_30778, StringDefines.Key_35800, 3)); data.Add(401, DeclareActiveWeek.Create(28, 401, StringDefines.Key_3963, StringDefines.Key_35801, 4)); data.Add(402, DeclareActiveWeek.Create(42, 402, StringDefines.Key_30778, StringDefines.Key_35796, 4)); data.Add(403, DeclareActiveWeek.Create(39, 403, StringDefines.Key_14831, StringDefines.Key_35802, 4)); data.Add(404, DeclareActiveWeek.Create(43, 404, StringDefines.Key_30783, StringDefines.Key_35881, 4)); data.Add(405, DeclareActiveWeek.Create(45, 405, StringDefines.Key_14701, StringDefines.Key_35799, 4)); data.Add(406, DeclareActiveWeek.Create(42, 406, StringDefines.Key_30778, StringDefines.Key_35800, 4)); data.Add(501, DeclareActiveWeek.Create(6, 501, StringDefines.Key_3722, StringDefines.Key_35795, 5)); data.Add(502, DeclareActiveWeek.Create(42, 502, StringDefines.Key_30778, StringDefines.Key_35796, 5)); data.Add(503, DeclareActiveWeek.Create(40, 503, StringDefines.Key_3989, StringDefines.Key_35797, 5)); data.Add(504, DeclareActiveWeek.Create(20, 504, StringDefines.Key_18369, StringDefines.Key_35798, 5)); data.Add(505, DeclareActiveWeek.Create(38, 505, StringDefines.Key_3987, StringDefines.Key_35799, 5)); data.Add(506, DeclareActiveWeek.Create(42, 506, StringDefines.Key_30778, StringDefines.Key_35800, 5)); data.Add(601, DeclareActiveWeek.Create(28, 601, StringDefines.Key_3963, StringDefines.Key_35801, 6)); data.Add(602, DeclareActiveWeek.Create(42, 602, StringDefines.Key_30778, StringDefines.Key_35796, 6)); data.Add(603, DeclareActiveWeek.Create(39, 603, StringDefines.Key_14831, StringDefines.Key_35802, 6)); data.Add(604, DeclareActiveWeek.Create(43, 604, StringDefines.Key_30783, StringDefines.Key_35881, 6)); data.Add(605, DeclareActiveWeek.Create(45, 605, StringDefines.Key_14701, StringDefines.Key_35799, 6)); data.Add(606, DeclareActiveWeek.Create(42, 606, StringDefines.Key_30778, StringDefines.Key_35800, 6)); data.Add(701, DeclareActiveWeek.Create(6, 701, StringDefines.Key_3722, StringDefines.Key_35795, 7)); data.Add(702, DeclareActiveWeek.Create(42, 702, StringDefines.Key_30778, StringDefines.Key_35796, 7)); data.Add(703, DeclareActiveWeek.Create(40, 703, StringDefines.Key_3989, StringDefines.Key_35797, 7)); data.Add(704, DeclareActiveWeek.Create(20, 704, StringDefines.Key_18369, StringDefines.Key_35798, 7)); data.Add(705, DeclareActiveWeek.Create(15, 705, StringDefines.Key_30676, StringDefines.Key_35882, 7)); data.Add(706, DeclareActiveWeek.Create(42, 706, StringDefines.Key_30778, StringDefines.Key_35800, 7)); }
public static void SetData() { if (_dataCaches == null && LuaEnv.isLoadLuaCfg) { long startTime = DateTime.Now.Ticks; Dictionary <int, int[]> dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataActiveWeek"); if (dic == null) { LuaEnv.SharedLuaEnv.DoString("DataActiveWeek = require 'Lua/Config/DataActiveWeek'"); dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataActiveWeek"); } if (dic != null) { _dataCaches = new Dictionary <int, DeclareActiveWeek>(42); foreach (var item in dic) { DeclareActiveWeek tmp = new DeclareActiveWeek(); tmp.ActiveId = item.Value[0]; tmp.Id = item.Value[1]; tmp.Name = CfgStringLua.Get(item.Value[2]); tmp.Time = CfgStringLua.Get(item.Value[3]); tmp.Week = item.Value[4]; _dataCaches.Add(item.Key, tmp); } } Record(startTime, DateTime.Now.Ticks, "ActiveWeek"); } if (_dataCaches == null && _fillDataCallBack != null) { if (_dataCaches == null) { long startTime = DateTime.Now.Ticks; _dataCaches = new Dictionary <int, DeclareActiveWeek>(42); _fillDataCallBack(_dataCaches); Record(startTime, DateTime.Now.Ticks, "ActiveWeek"); } } }