Method StartSignatureMode
StartSignatureMode(SignMode)
Starts a signature process.
Declaration
Error StartSignatureMode(SignMode mode)
Parameters
Type | Name | Description |
---|---|---|
Sign |
mode | Which kind of signature mode to start. |
Returns
Type | Description |
---|---|
Error | Error |
Remarks
Please note that you may want to set a signature rectangle before with
Set
Examples
The following example starts the standard signature mode with a signature rectangle in the lower left corner of the display.
int width = 400;
int height = 200;
int displayHeight = driver.DeviceProperties.Hardware.DisplayHeight;
Error r = driver.SetSignatureRectangle(0, displayHeight - height, width, height);
if (Error.SUCCESS != driver.StartSignatureMode(SignMode.StandardSign))
{
// something is wrong
return;
}
Console.WriteLine("Start signing, please.");
bool finished = false;
driver.SignFinished += (object sender, EventArgs e) =>
{
Console.WriteLine("Drawing has stopped.");
finished = true;
};
while (!finished)
Thread.Sleep(500);
r = driver.StopSignatureCapture();
The following example starts a document signature process in portrait mode
with a background image read from a file.
Whether the device supports portrait mode support can be queried with
Device
Then, thread waits until the Sign
C#
Bitmap page = new Bitmap("pageToBeSigned.bmp");
driver.DeviceProperties.Status.DisplayOrientation = DisplayOrientation.DEG_270;
Error r = driver.SetSignBackground(page);
int width = 400;
int height = 200;
r = driver.SetSignatureRectangle(0, 0, width, height, 0, height, SignRectOption.ScrollXY);
if (Error.SUCCESS != driver.StartSignatureMode(SignMode.DocumentSign))
{
// something is wrong
return;
}
Console.WriteLine("Start signing, please.");
bool finished = false;
driver.SignFinished += (object sender, EventArgs e) =>
{
Console.WriteLine("Drawing has stopped.");
finished = true;
};
while (!finished)
Thread.Sleep(500);
r = driver.StopSignatureCapture();