2018-05-30 21:12:00 +00:00
|
|
|
|
using System;
|
2018-05-30 17:15:37 +00:00
|
|
|
|
|
2018-05-30 21:12:00 +00:00
|
|
|
|
namespace SpaceNavWrapper
|
|
|
|
|
{
|
|
|
|
|
public class MotionEventArgs : EventArgs
|
2018-05-30 17:15:37 +00:00
|
|
|
|
{
|
2018-05-30 21:12:00 +00:00
|
|
|
|
public readonly int X, Y, Z;
|
|
|
|
|
public readonly int Rx, Ry, Rz;
|
|
|
|
|
|
|
|
|
|
public MotionEventArgs(int x, int y, int z, int rx, int ry, int rz)
|
|
|
|
|
{
|
|
|
|
|
X = x;
|
|
|
|
|
Y = y;
|
|
|
|
|
Z = z;
|
|
|
|
|
Rx = rx;
|
|
|
|
|
Ry = ry;
|
|
|
|
|
Rz = rz;
|
|
|
|
|
}
|
|
|
|
|
|
2018-05-30 17:15:37 +00:00
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
2018-05-30 21:12:00 +00:00
|
|
|
|
return "x=" + X + " y=" + Y + " z=" + Z +
|
|
|
|
|
" rx=" + Rz + " ry=" + Ry + " rz=" + Rz;
|
2018-05-30 17:15:37 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2018-05-30 21:12:00 +00:00
|
|
|
|
public class ButtonEventArgs : EventArgs
|
2018-05-30 21:53:56 +00:00
|
|
|
|
{
|
|
|
|
|
public readonly bool Pressed;
|
|
|
|
|
public readonly int Button;
|
2018-05-30 21:12:00 +00:00
|
|
|
|
|
2018-05-30 21:53:56 +00:00
|
|
|
|
public ButtonEventArgs(bool pressed, int button)
|
2018-05-30 21:12:00 +00:00
|
|
|
|
{
|
2018-05-30 21:53:56 +00:00
|
|
|
|
Pressed = pressed;
|
|
|
|
|
Button = button;
|
2018-05-30 21:12:00 +00:00
|
|
|
|
}
|
2018-05-30 21:53:56 +00:00
|
|
|
|
public override string ToString()
|
|
|
|
|
{
|
|
|
|
|
return string.Format("[ButtonEventArgs: button={0}, pressed={1}]", Button, Pressed);
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-05-30 17:15:37 +00:00
|
|
|
|
}
|