override public void FromBytes(BinaryReader br) { base.FromBytes(br); int pictureCount = DecodeInteger(br); for (int i = 0; i < pictureCount; i++) { ClassTypeInfo classTypeInfo = (ClassTypeInfo)BaseInfo.CreateInstance(br); ClassType.Add(classTypeInfo); } }
override public void FromBytes(BinaryReader br) { base.FromBytes(br); int count = DecodeInteger(br); for (int i = 0; i < count; i++) { ClassTypeInfo classTypeInfo = new ClassTypeInfo(); DecodeInteger(br); classTypeInfo.FromBytes(br); _ClassType.Add(classTypeInfo); } }
public static BaseInfo CreateInstance(BinaryReader br) { BaseInfo baseInfo = null; InfoType infoType = (InfoType)DecodeInteger(br); switch (infoType) { case InfoType.Result: baseInfo = new ResultInfo(); break; case InfoType.Header: baseInfo = new HeaderInfo(); break; case InfoType.Home: baseInfo = new HomeInfo(); break; case InfoType.User: baseInfo = new UserInfo(); break; case InfoType.UserDetail: baseInfo = new UserDetailInfo(); break; case InfoType.Room: baseInfo = new RoomInfo(); break; case InfoType.RoomList: baseInfo = new RoomListInfo(); break; case InfoType.RoomDetail: baseInfo = new RoomDetailInfo(); break; case InfoType.String: baseInfo = new StringInfo(); break; case InfoType.Voice: baseInfo = new VoiceInfo(); break; case InfoType.Video: baseInfo = new VideoInfo(); break; case InfoType.Present: baseInfo = new IconInfo(); break; case InfoType.Give: baseInfo = new GiveInfo(); break; case InfoType.Game: baseInfo = new GameInfo(); break; case InfoType.GameList: baseInfo = new GameListInfo(); break; case InfoType.GameDetail: baseInfo = new GameDetailInfo(); break; case InfoType.ChatHistory: baseInfo = new ChatHistoryInfo(); break; case InfoType.PointHistory: baseInfo = new PointHistoryInfo(); break; case InfoType.ChargeHistory: baseInfo = new ChargeHistoryInfo(); break; case InfoType.EvalHistory: baseInfo = new EvalHistoryInfo(); break; case InfoType.PresentHistory: baseInfo = new PresentHistoryInfo(); break; case InfoType.GameHistory: baseInfo = new GameHistoryInfo(); break; case InfoType.UserList: baseInfo = new UserListInfo(); break; case InfoType.AskChat: baseInfo = new AskChatInfo(); break; case InfoType.Board: baseInfo = new BoardInfo(); break; case InfoType.Betting: baseInfo = new BettingInfo(); break; case InfoType.Table: baseInfo = new TableInfo(); break; case InfoType.Sicbo: baseInfo = new SicboInfo(); break; case InfoType.Dice: baseInfo = new DiceInfo(); break; case InfoType.DzCard: baseInfo = new DzCardInfo(); break; case InfoType.Horse: baseInfo = new HorseInfo(); break; case InfoType.BumperCar: baseInfo = new BumperCarInfo(); break; case InfoType.Fish: baseInfo = new FishInfo(); break; case InfoType.FishSend: baseInfo = new FishSendInfo(); break; case InfoType.AddScore: baseInfo = new AddScoreInfo(); break; case InfoType.SendCard: baseInfo = new SendCardInfo(); break; case InfoType.Musice: baseInfo = new MusiceInfo(); break; case InfoType.MusiceState: baseInfo = new MusiceStateInfo(); break; case InfoType.ClassInfo: baseInfo = new ClassInfo(); break; case InfoType.ClassList: baseInfo = new ClassListInfo(); break; case InfoType.ClassTypeInfo: baseInfo = new ClassTypeInfo(); break; case InfoType.ClassTypeList: baseInfo = new ClassTypeListInfo(); break; case InfoType.ClassPictureDetail: baseInfo = new ClassPictureDetailInfo(); break; case InfoType.RoomValue: baseInfo = new RoomPrice(); break; case InfoType.Payment: baseInfo = new PaymentInfo(); break; case InfoType.DWGameFile: baseInfo = new DWGameFileInfo(); break; case InfoType.UserState: baseInfo = new UserState(); break; case InfoType.Server: baseInfo = new ServerInfo(); break; case InfoType.AVMsg: baseInfo = new AVMsg(); break; } if (baseInfo != null) { baseInfo.FromBytes(br); } return(baseInfo); }