本文整理匯總了C#中NewTOAPIA.BufferChunk.NextInt16方法的典型用法代碼示例。如果您正苦於以下問題:C# BufferChunk.NextInt16方法的具體用法?C# BufferChunk.NextInt16怎麽用?C# BufferChunk.NextInt16使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類NewTOAPIA.BufferChunk
的用法示例。
在下文中一共展示了BufferChunk.NextInt16方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ReceiveChunk
public virtual void ReceiveChunk(BufferChunk aRecord)
{
// First read out the record type
int recordType = aRecord.NextInt32();
// Then deserialize the rest from there
switch ((UserIOCommand)recordType)
{
case UserIOCommand.HideCursor:
HideCursor();
break;
case UserIOCommand.Showcursor:
ShowCursor();
break;
case UserIOCommand.MoveCursor:
{
int x = aRecord.NextInt32();
int y = aRecord.NextInt32();
MoveCursor(x, y);
}
break;
case UserIOCommand.KeyboardActivity:
{
KeyActivityType kEvent = (KeyActivityType)aRecord.NextInt32();
VirtualKeyCodes vk = (VirtualKeyCodes)aRecord.NextInt32();
KeyboardActivityArgs kbda = new KeyboardActivityArgs(kEvent, vk);
KeyboardActivity(this, kbda);
}
break;
case UserIOCommand.MouseActivity:
{
MouseActivityType maType = MouseActivityType.None;
MouseButtonActivity mbActivity = (MouseButtonActivity)aRecord.NextInt32();
int x = aRecord.NextInt32();
int y = aRecord.NextInt32();
int clicks = aRecord.NextInt32();
short delta = aRecord.NextInt16();
int keyflags = 0;
MouseActivityArgs ma = new MouseActivityArgs(null, maType, mbActivity,
MouseCoordinateSpace.Desktop, MouseMovementType.Absolute, IntPtr.Zero,
x, y, delta, clicks, keyflags);
MouseActivity(this, ma);
}
break;
default:
break;
}
}