本文整理汇总了C#中FileReader.ReadBoolean方法的典型用法代码示例。如果您正苦于以下问题:C# FileReader.ReadBoolean方法的具体用法?C# FileReader.ReadBoolean怎么用?C# FileReader.ReadBoolean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileReader
的用法示例。
在下文中一共展示了FileReader.ReadBoolean方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CardFace
public CardFace(byte[] bytes,FaceType type)
{
faceBytes = bytes;
faceType = type;
Stream stream = new MemoryStream(faceBytes);
FileReader reader = new FileReader(stream);
reader.ReadBytes(4);//skip Tag 'FACE'
bgColor = reader.ReadUInt32();
hasLogo = reader.ReadBoolean();
byte[] dataBytes;
byte[] readBytes;
int len;
if (hasLogo)
{
reader.ReadBytes(16);//skip LogoRect
logoDepth = reader.ReadUInt32();//LogoDepth
len = (int)(reader.ReadUInt32());//LogoMatrixBytes
if (len > 0)
{
logoMatrix = new Matrix(reader.ReadBytes(24));
}
len = (int)(reader.ReadUInt32());//LogoColorTransBytes
if (len > 0)
{
logoColorTrans = new ColorTransform(reader.ReadBytes(32));
}
}
len = (int)(reader.ReadUInt32());//SymbolBytes
if (len > 0)
{
symbols = new SymbolCollection(reader.ReadBytes(len));
}
len = (int)(reader.ReadUInt32());//TextBytes
if (len > 0)
{
texts = new TextCollection(reader.ReadBytes(len));
}
len = (int)(reader.ReadUInt32());//ThumbnailBytes
if (len > 0)
{
dataBytes=new byte[len];
readBytes = reader.ReadBytes(len);
readBytes.CopyTo(dataBytes,0);
thumbnail = new Thumbnail(dataBytes,ThumbnailType.CardThumbnail);
}
stream.Close();
reader.Close();
}