Event PenEvent
This event is raised when the pen is lifted or lowered in the simple dialog mode.
Namespace: Sig.DeviceAPI
Assembly: SigDeviceAPI.dll
Syntax
event EventHandler<PenEventArgs> PenEvent
Returns
Type | Description |
---|---|
System.EventHandler<PenEventArgs> |
Examples
Error r;
bool finished = false;
void OnPenEvent(object sender, PenEventArgs e)
{
int column = e.X;
int row = e.Y;
string message = "The pen was "
+ (PenEventType.PenDown == e.PenEventType ? "lowered" : "lifted")
+ $" at (column, row) = ({column}, {row}).";
Console.WriteLine(message);
if (column + row < 40)
finished = true;
};
driver.PenEvent += OnPenEvent;
r = driver.SetSimpleDialogMode();
Console.WriteLine("Click in the upper left corner to finish.");
while (!finished)
Thread.Sleep(500);