//------------------------------------------------------------------------------ // // This code was generated by a tool. // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace G { using System.Collections; using System.Collections.Generic; using F; using F.Item; /// /// Generated from: global.xlsx /// public partial class ItemTime : Item, IItem { public const string ASSET_NAME = "global"; /// /// 1:全局次数 2:每日次数 3:每周次数 4:间隔时间 5:充能次数 /// index:1 /// public int type { get; private set; } /// /// 参数: 4[时间间隔] 5[时间间隔,最大上限] /// index:2 /// public int[] typeArgs { get; private set; } /// /// 初始次数 /// index:3 /// public int initCount { get; private set; } /// /// 最大次数 /// index:4 /// public int maxCount { get; private set; } /// /// 免费次数 /// index:5 /// public int freeCount { get; private set; } /// /// /// index:6 /// public int[] userData { get; private set; } /// /// 描述 /// index:7 /// public string description { get; private set; } public void Load(IList list) { id = list.GetInt(0); type = list.GetInt(1); typeArgs = list.GetIntArray(2); initCount = list.GetInt(3); maxCount = list.GetInt(4); freeCount = list.GetInt(5); userData = list.GetIntArray(6); description = list.GetString(7); } public static bool LoadAll(IDictionary dictionary, List result) { if (result == null) { return false; } var list = dictionary.GetList("Time"); if (list == null || list.Count == 0) { return false; } int i = 0; for (int c = list.Count; i < c; i++) { var item = CreateThis(); item.Load((IList)list[i]); result.Add(item); } return true; } private static ItemTime CreateThis() { return new ItemTime(); } } }