本文整理汇总了C#中System.IO.BinaryWriter.WritePackString方法的典型用法代码示例。如果您正苦于以下问题:C# BinaryWriter.WritePackString方法的具体用法?C# BinaryWriter.WritePackString怎么用?C# BinaryWriter.WritePackString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IO.BinaryWriter
的用法示例。
在下文中一共展示了BinaryWriter.WritePackString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: calcbodysize
public override void calcbodysize()
{
MemoryStream m = new MemoryStream();
BinaryWriter br = new BinaryWriter(m);
br.Write(lodMats.Count);
for (int i = 0; i < lodMats.Count; i++)
{
Lod texturenames = lodMats[i];
br.Write(texturenames.mats.Count);
for (int j = 0; j < texturenames.mats.Count; j++)
br.WritePackString(texturenames.mats[j].DiffuseTextureName);
}
size = Convert.ToInt32( br.BaseStream.Position);
br.Close();
}
示例2: saveheader
public override void saveheader(BinaryWriter br)
{
br.WritePackString(name);
br.Write(offset);
br.Write(forsavingformat);
calcheadersize();
br.Write(headersize);
calcbodysize();
br.Write(size);
}
示例3: savebody
public override void savebody(BinaryWriter br)
{
br.Write(lodMats.Count);
for (int i = 0; i < lodMats.Count; i++)
{
Lod texturenames = lodMats[i];
br.Write(texturenames.mats.Count);
for (int j = 0; j < texturenames.mats.Count; j++)
{
br.WritePackString(texturenames.mats[j].DiffuseTextureName);
}
}
}
示例4: saveheader
public override void saveheader(BinaryWriter bw)
{
bw.WritePackString(name);
bw.Write(offset);
bw.Write(ElementType.CollisionMesh);
calcheadersize();
bw.Write(headersize);
calcbodysize();
bw.Write(size);
}
示例5: savebody
public override void savebody(BinaryWriter bw)
{
bw.WritePackString(name);
bw.Write(Names.Count);
foreach (var meshName in Names)
{
bw.WritePackString(meshName);
}
}
示例6: saveheader
public override void saveheader(BinaryWriter bw)
{
bw.WritePackString(name);
bw.Write(offset);
bw.Write(ElementType.PNGTexture);
calcheadersize();
bw.Write(headersize);
bw.Write(data.Length);
}