ExcelTool
This commit is contained in:
@@ -0,0 +1,146 @@
|
||||
/*
|
||||
* auto generated by tools(注意:千万不要手动修改本文件)
|
||||
* official_room
|
||||
*/
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
|
||||
[Serializable]
|
||||
public class official_room : IBinarySerializable
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string RoomOwner { get; set; }
|
||||
public string Notes { get; set; }
|
||||
public string RoomName { get; set; }
|
||||
public string RoomBriefly { get; set; }
|
||||
public string RoomDetails { get; set; }
|
||||
public string BgPathId { get; set; }
|
||||
public string ScenesId { get; set; }
|
||||
public string Address { get; set; }
|
||||
public int Recommend { get; set; }
|
||||
public int SubLine { get; set; }
|
||||
public int IsCanPackage { get; set; }
|
||||
public int IsMute { get; set; }
|
||||
public List<float> BirthPosition { get; set; }
|
||||
public List<float> Offset { get; set; }
|
||||
|
||||
public void DeSerialize(BinaryReader reader)
|
||||
{
|
||||
Id = reader.ReadInt32();
|
||||
RoomOwner = reader.ReadString();
|
||||
Notes = reader.ReadString();
|
||||
RoomName = reader.ReadString();
|
||||
RoomBriefly = reader.ReadString();
|
||||
RoomDetails = reader.ReadString();
|
||||
BgPathId = reader.ReadString();
|
||||
ScenesId = reader.ReadString();
|
||||
Address = reader.ReadString();
|
||||
Recommend = reader.ReadInt32();
|
||||
SubLine = reader.ReadInt32();
|
||||
IsCanPackage = reader.ReadInt32();
|
||||
IsMute = reader.ReadInt32();
|
||||
var BirthPositionCount = reader.ReadInt32();
|
||||
if (BirthPositionCount > 0)
|
||||
{
|
||||
BirthPosition = new List<float>();
|
||||
for (int i = 0; i < BirthPositionCount; i++)
|
||||
{
|
||||
BirthPosition.Add(reader.ReadSingle());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
BirthPosition = null;
|
||||
}
|
||||
var OffsetCount = reader.ReadInt32();
|
||||
if (OffsetCount > 0)
|
||||
{
|
||||
Offset = new List<float>();
|
||||
for (int i = 0; i < OffsetCount; i++)
|
||||
{
|
||||
Offset.Add(reader.ReadSingle());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Offset = null;
|
||||
}
|
||||
}
|
||||
|
||||
public void Serialize(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(Id);
|
||||
writer.Write(RoomOwner);
|
||||
writer.Write(Notes);
|
||||
writer.Write(RoomName);
|
||||
writer.Write(RoomBriefly);
|
||||
writer.Write(RoomDetails);
|
||||
writer.Write(BgPathId);
|
||||
writer.Write(ScenesId);
|
||||
writer.Write(Address);
|
||||
writer.Write(Recommend);
|
||||
writer.Write(SubLine);
|
||||
writer.Write(IsCanPackage);
|
||||
writer.Write(IsMute);
|
||||
if (BirthPosition == null || BirthPosition.Count == 0)
|
||||
{
|
||||
writer.Write(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.Write(BirthPosition.Count);
|
||||
for (int i = 0; i < BirthPosition.Count; i++)
|
||||
{
|
||||
writer.Write(BirthPosition[i]);
|
||||
}
|
||||
}
|
||||
if (Offset == null || Offset.Count == 0)
|
||||
{
|
||||
writer.Write(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.Write(Offset.Count);
|
||||
for (int i = 0; i < Offset.Count; i++)
|
||||
{
|
||||
writer.Write(Offset[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public partial class official_roomConfig : IBinarySerializable
|
||||
{
|
||||
public List<official_room> official_roomInfos = new List<official_room>();
|
||||
public void DeSerialize(BinaryReader reader)
|
||||
{
|
||||
int count = reader.ReadInt32();
|
||||
for (int i = 0;i < count; i++)
|
||||
{
|
||||
official_room tempData = new official_room();
|
||||
tempData.DeSerialize(reader);
|
||||
official_roomInfos.Add(tempData);
|
||||
}
|
||||
}
|
||||
|
||||
public void Serialize(BinaryWriter writer)
|
||||
{
|
||||
writer.Write(official_roomInfos.Count);
|
||||
for (int i = 0; i < official_roomInfos.Count; i++)
|
||||
{
|
||||
official_roomInfos[i].Serialize(writer);
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<official_room> QueryById(int id)
|
||||
{
|
||||
var datas = from d in official_roomInfos
|
||||
where d.Id == id
|
||||
select d;
|
||||
return datas;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user