private void DigSignature_Load(object sender, EventArgs e) { counter = 1; Font f = new System.Drawing.Font("Arial", 9.0F, System.Drawing.FontStyle.Regular); string[] s; s = strKeyData.Split('|'); switch (strTransaction) { case "ServiceUtilisation": data = "Dear member " + s[0] + ", please read and confirm the service(s) utilised before sign"; if (dtServiceUtilisationTable != null) { maxScreen = dtServiceUtilisationTable.Rows.Count; } break; case "CreditUtilisation": data = "Dear member " + s[0] + ", please read and confirm the credit(s) utilised before sign"; if (dtCreditPackageUsageTable != null) { if (dtCreditPackageUsageTable.Rows.Count > 0) { maxScreen = dtCreditPackageUsageTable.Rows.Count; } else { if (drCrPktUsageTable != null) { if (drCrPktUsageTable.GetLength(0) > 0) { maxScreen = drCrPktUsageTable.GetLength(0); } } } } else { if (drCrPktUsageTable != null) { if (drCrPktUsageTable.GetLength(0) > 0) { maxScreen = drCrPktUsageTable.GetLength(0); } } } break; case "Redemption": data = "Dear member " + s[2] + ", please read and confirm the redemption(s) details before sign"; maxScreen = 1; break; } SigPlusNET1.SetTabletState(1); SigPlusNET1.SetImagePenWidth(8); SigPlusNET1.SetDisplayPenWidth(8); SigPlusNET1.LCDRefresh(0, 0, 0, 240, 64); SigPlusNET1.SetTranslateBitmapEnable(false); //Images sent to the background SigPlusNET1.LCDSendGraphic(1, 2, 0, 20, sign); SigPlusNET1.LCDSendGraphic(1, 2, 207, 4, ok); SigPlusNET1.LCDSendGraphic(1, 2, 15, 4, clear); //Get LCD size in pixels. lcdSize = SigPlusNET1.LCDGetLCDSize(); lcdX = (int)(lcdSize & 0xFFFF); lcdY = (int)((lcdSize >> 16) & 0xFFFF); string[] words = data.Split(new char[] { ' ' }); string writeData = "", tempData = ""; int xSize, ySize, i, yPos = 0; for (i = 0; i < words.Length; i++) { tempData += words[i]; xSize = SigPlusNET1.LCDStringWidth(f, tempData); if (xSize < lcdX) { writeData = tempData; tempData += " "; xSize = SigPlusNET1.LCDStringWidth(f, tempData); if (xSize < lcdX) { writeData = tempData; } } else { ySize = SigPlusNET1.LCDStringHeight(f, tempData); SigPlusNET1.LCDWriteString(0, 2, 0, yPos, f, writeData); tempData = ""; writeData = ""; yPos += (short)ySize; i--; } } if (writeData != "") { SigPlusNET1.LCDWriteString(0, 2, 0, yPos, f, writeData); } //Hotspot text SigPlusNET1.LCDWriteString(0, 2, 15, 45, f, "Continue"); //Create the hot spots for the Continue button SigPlusNET1.KeyPadAddHotSpot(0, 1, 12, 40, 40, 15); //For Continue button SigPlusNET1.ClearTablet(); SigPlusNET1.LCDSetWindow(0, 0, 1, 1); SigPlusNET1.SetSigWindow(1, 0, 0, 1, 1); //Sets the area where ink is permitted in the SigPlus object SigPlusNET1.SetLCDCaptureMode(2); //Sets mode so ink will not disappear after a few seconds screen = 0; }