本文整理汇总了C#中System.IO.BinaryWriter.WriteLpUnicode方法的典型用法代码示例。如果您正苦于以下问题:C# BinaryWriter.WriteLpUnicode方法的具体用法?C# BinaryWriter.WriteLpUnicode怎么用?C# BinaryWriter.WriteLpUnicode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IO.BinaryWriter
的用法示例。
在下文中一共展示了BinaryWriter.WriteLpUnicode方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteData
protected override void WriteData(BinaryWriter writer)
{
writer.WriteLpUnicode(Value);
}
示例2: Write
public void Write(BinaryWriter writer)
{
writer.WriteLpUnicode(Name);
writer.WriteBooleanAsInt32(IsVisible);
writer.Write(Color.Red);
writer.Write(Color.Green);
writer.Write(Color.Blue);
writer.Write(Color.Alpha);
writer.Write(Index);
}
示例3: BinaryReader_WriteLpUnicode
public void BinaryReader_WriteLpUnicode()
{
byte[] writtenData;
using (var stream = new MemoryStream())
{
using (var writer = new BinaryWriter(stream))
{
writer.WriteLpUnicode("sound/NS2.fev/ambient/sydney train texture");
}
writtenData = stream.ToArray();
}
byte[] expected = File.ReadAllBytes("Content/Tests/Extensions/LpUnicode.bin");
Assert.AreEqual(BitConverter.ToString(expected), BitConverter.ToString(writtenData));
}
示例4: WriteMeta
private void WriteMeta(BinaryWriter writer)
{
if (Viewports == null)
{
return;
}
writer.Write(ViewportsDelcaration);
long sizePosition = writer.BaseStream.Position;
writer.Seek(4, SeekOrigin.Current);
long startPosition = writer.BaseStream.Position;
writer.WriteLpUnicode(Viewports.ToString(SaveOptions.DisableFormatting));
long endPosition = writer.BaseStream.Position;
writer.Seek((int)sizePosition, SeekOrigin.Begin);
writer.Write((int)(endPosition - startPosition));
writer.Seek((int)endPosition, SeekOrigin.Begin);
}
示例5: Write
public void Write(BinaryWriter writer)
{
writer.WriteLpUnicode(Name);
writer.Write(Unknown);
writer.Write(Color.Red);
writer.Write(Color.Green);
writer.Write(Color.Blue);
writer.Write(Color.Alpha);
writer.Write(Id);
}