本文整理汇总了C#中NewTOAPIA.BufferChunk.NextUInt32方法的典型用法代码示例。如果您正苦于以下问题:C# BufferChunk.NextUInt32方法的具体用法?C# BufferChunk.NextUInt32怎么用?C# BufferChunk.NextUInt32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NewTOAPIA.BufferChunk
的用法示例。
在下文中一共展示了BufferChunk.NextUInt32方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: UnpackGRADIENT_RECT
GRADIENT_RECT[] UnpackGRADIENT_RECT(BufferChunk chunk)
{
int nRects = chunk.NextInt32();
GRADIENT_RECT[] pMesh = new GRADIENT_RECT[nRects];
for (int i = 0; i < nRects; i++)
{
pMesh[i].UpperLeft = chunk.NextUInt32();
pMesh[i].LowerRight = chunk.NextUInt32();
}
return pMesh;
}
示例2: ReceiveData
public virtual void ReceiveData(BufferChunk aRecord)
{
// First read out the record type
int recordType = aRecord.NextInt32();
Console.WriteLine("SpaceCommandDecoder.ReceiveData: {0}", recordType);
switch (recordType)
{
case SpaceControlChannel.SC_CreateSurface:
{
Guid uniqueID = CodecUtils.UnpackGuid(aRecord);
int x = aRecord.NextInt32();
int y = aRecord.NextInt32();
int width = aRecord.NextInt32();
int height = aRecord.NextInt32();
OnCreateSurface("title",new RECT(x,y,width,height), uniqueID);
}
break;
case SpaceControlChannel.SC_InvalidateSurfaceRect:
{
Guid uniqueID = CodecUtils.UnpackGuid(aRecord);
int x = aRecord.NextInt32();
int y = aRecord.NextInt32();
int width = aRecord.NextInt32();
int height = aRecord.NextInt32();
OnInvalidateSurfaceRect(uniqueID, new RECT(x, y, width, height));
}
break;
case SpaceControlChannel.SC_MouseEvent:
{
Guid sourceID = CodecUtils.UnpackGuid(aRecord);
uint mouseID = aRecord.NextUInt32();
MouseEventType eventType = (MouseEventType)aRecord.NextInt32();
MouseButtons buttons = (MouseButtons)aRecord.NextInt32();
int x = aRecord.NextInt32();
int y = aRecord.NextInt32();
int clicks = aRecord.NextInt32();
int delta = aRecord.NextInt32();
MouseEventArgs args = new MouseEventArgs(mouseID, eventType, buttons, clicks, x, y, delta, sourceID);
OnMouseActivity(this, args);
}
break;
case SpaceControlChannel.SC_KeyboardEvent:
break;
//case SpaceControlChannel.SC_BitBlt:
// {
// // Get the X, Y
// int x = aRecord.NextInt32();
// int y = aRecord.NextInt32();
// int width = aRecord.NextInt32();
// int height = aRecord.NextInt32();
// // Now create a pixbuff on the specified size
// PixelBuffer pixBuff = new PixelBuffer(width, height);
// int dataSize = aRecord.NextInt32();
// // Copy the received data into it right pixel data pointer
// aRecord.CopyTo(pixBuff.Pixels.Data, dataSize);
// // And finally, call the BitBlt function
// OnBitBlt(x,y,pixBuff);
//}
// break;
case SpaceControlChannel.SC_CopyPixels:
{
// Get the X, Y
int x = aRecord.NextInt32();
int y = aRecord.NextInt32();
int width = aRecord.NextInt32();
int height = aRecord.NextInt32();
// Now create a pixbuff on the specified size
PixelBuffer pixBuff = new PixelBuffer(width, height);
int dataSize = aRecord.NextInt32();
// Copy the received data into it right pixel data pointer
aRecord.CopyTo(pixBuff.Pixels.Data, dataSize);
// And finally, call the BitBlt function
OnCopyPixels(x, y, width, height, pixBuff);
}
break;
case SpaceControlChannel.SC_AlphaBlend:
{
// Get the X, Y
int x = aRecord.NextInt32();
int y = aRecord.NextInt32();
int width = aRecord.NextInt32();
int height = aRecord.NextInt32();
//.........这里部分代码省略.........
示例3: ReceiveData
public virtual void ReceiveData(BufferChunk aRecord)
{
// First read out the record type
int recordType = aRecord.NextInt32();
// Then deserialize the rest from there
switch (recordType)
{
case GDI32.EMR_HEADER:
break;
// Transform related
case GDI32.EMR_SCALEVIEWPORTEXTEX:
case GDI32.EMR_SCALEWINDOWEXTEX:
break;
case GDI32.EMR_SETWINDOWEXTEX:
{
int width = aRecord.NextInt32();
int height = aRecord.NextInt32();
SetWindowExtent(width, height);
}
break;
case GDI32.EMR_SETWINDOWORGEX:
{
int x = aRecord.NextInt32();
int y = aRecord.NextInt32();
SetWindowOrigin(x, y);
}
break;
case GDI32.EMR_SETVIEWPORTEXTEX:
{
int width = aRecord.NextInt32();
int height = aRecord.NextInt32();
SetViewportExtent(width, height);
}
break;
case GDI32.EMR_SETVIEWPORTORGEX:
{
int x = aRecord.NextInt32();
int y = aRecord.NextInt32();
SetViewportOrigin(x, y);
}
break;
case GDI32.EMR_SETWORLDTRANSFORM:
case GDI32.EMR_MODIFYWORLDTRANSFORM:
break;
case GDI32.EMR_SETBRUSHORGEX:
break;
case GDI32.EMR_EOF:
Flush();
break;
case GDI32.EMR_SETPIXELV:
{
int x = aRecord.NextInt32();
int y = aRecord.NextInt32();
UInt32 colorref = aRecord.NextUInt32();
SetPixel(x, y, colorref);
}
break;
case GDI32.EMR_SETMAPPERFLAGS:
break;
case GDI32.EMR_SETPOLYFILLMODE:
SetPolyFillMode(aRecord.NextInt32());
break;
case GDI32.EMR_SETSTRETCHBLTMODE:
break;
case GDI32.EMR_SETMAPMODE:
MappingModes aMode = (MappingModes)aRecord.NextInt32();
SetMappingMode(aMode);
break;
case GDI32.EMR_SETTEXTCOLOR:
SetTextColor(aRecord.NextUInt32());
break;
case GDI32.EMR_SETBKCOLOR:
SetBkColor(aRecord.NextUInt32());
break;
case GDI32.EMR_SETDCBRUSHCOLOR:
SetDefaultBrushColor(aRecord.NextUInt32());
break;
//.........这里部分代码省略.........
示例4: UnpackGPen
public static GDIPen UnpackGPen(BufferChunk chunk)
{
uint penColor;
PenStyle penStyle;
Guid uniqueID;
int penSize;
penStyle = (PenStyle)chunk.NextInt32();
penSize = chunk.NextInt32();
penColor = chunk.NextUInt32();
uniqueID = UnpackGuid(chunk);
GDIPen aPen = new GDIPen(PenType.Cosmetic, PenStyle.Solid, PenJoinStyle.Round, PenEndCap.Round, penColor, penSize, uniqueID);
return aPen;
}