//This code create by CodeEngine ,don't modify using System; using System.Collections.Generic; using System.Collections; using Module.Log; namespace GCGame.Table { public class Tab_TestingCopy{ public const string TAB_FILE_DATA = "TestingCopy"; private const int _varCount = 16; public int GetId() { return Id; } public static bool Validate(string line) { var segments = 0; foreach (char c in line) if (c == '\t') segments++; // Note: skip the 2nd column as it's the description; var result = segments == _varCount; if (!result) LogModule.ErrorLog(string.Format("Load {0} error as CodeSize:{1} not Equal DataSize:{2}", TAB_FILE_DATA, _varCount, segments)); return result; } public Tab_TestingCopy() { } public Tab_TestingCopy(string line) { var segments = line.Split('\t'); Id = int.Parse(segments[0]); UnlockLevel = int.Parse(segments[2]); TestingName = segments[3].Trim(); TestingMenuItemUnSelectIcon = segments[4].Trim(); TestingMenuItemSelectIcon = segments[5].Trim(); TestingRule = segments[6].Trim(); CanTeamChallenge = int.Parse(segments[7]); TeamChellangeNeedMembers = int.Parse(segments[8]); CanSingleChallenge = int.Parse(segments[9]); RewardId = int.Parse(segments[10]); UIName = segments[11].Trim(); TargetId = int.Parse(segments[12]); DiffcultyEnumValue[0] = int.Parse(segments[13]); DiffcultyEnumValue[1] = int.Parse(segments[14]); DiffcultyEnumValue[2] = int.Parse(segments[15]); DiffcultyEnumValue[3] = int.Parse(segments[16]); } public int Id { get; private set; } public int UnlockLevel { get; private set; } public string TestingName { get; private set; } public string TestingMenuItemUnSelectIcon { get; private set; } public string TestingMenuItemSelectIcon { get; private set; } public string TestingRule { get; private set; } public int CanTeamChallenge { get; private set; } public int TeamChellangeNeedMembers { get; private set; } public int CanSingleChallenge { get; private set; } public int RewardId { get; private set; } public string UIName { get; private set; } public int TargetId { get; private set; } public readonly int[] DiffcultyEnumValue = new int[4]; public int getDiffcultyEnumValueCount() { return DiffcultyEnumValue.Length; } public int GetDiffcultyEnumValuebyIndex(int idx) { if(idx >= 0 && idx < DiffcultyEnumValue.Length) return DiffcultyEnumValue[idx]; return default(int); } } }