///<summary></summary> public void FormDocSign_Load(object sender, System.EventArgs e) { IsStartingUp = true; textNote.Text = DocCur.Note; labelInvalidSig.Visible = false; sigBox.Visible = true; if (DocCur.SigIsTopaz) { if (DocCur.Signature != "") { if (Environment.OSVersion.Platform != PlatformID.Unix) { sigBox.Visible = false; sigBoxTopaz.Visible = true; sigBoxTopaz.ClearTablet(); sigBoxTopaz.SetSigCompressionMode(0); sigBoxTopaz.SetEncryptionMode(0); sigBoxTopaz.SetKeyString(ImageStore.GetHashString(DocCur, PatFolder)); //"0000000000000000"); //sigBoxTopaz.SetAutoKeyData(ProcCur.Note+ProcCur.UserNum.ToString()); sigBoxTopaz.SetEncryptionMode(2); //high encryption sigBoxTopaz.SetSigCompressionMode(2); //high compression sigBoxTopaz.SetSigString(DocCur.Signature); sigBoxTopaz.Refresh(); if (sigBoxTopaz.NumberOfTabletPoints() == 0) { labelInvalidSig.Visible = true; } } } } else { if (DocCur.Signature != "") { sigBox.Visible = true; sigBoxTopaz.Visible = false; sigBox.ClearTablet(); //sigBox.SetSigCompressionMode(0); //sigBox.SetEncryptionMode(0); sigBox.SetKeyString(ImageStore.GetHashString(DocCur, PatFolder)); //"0000000000000000"); //sigBox.SetAutoKeyData(ProcCur.Note+ProcCur.UserNum.ToString()); //sigBox.SetEncryptionMode(2);//high encryption //sigBox.SetSigCompressionMode(2);//high compression sigBox.SetSigString(DocCur.Signature); if (sigBox.NumberOfTabletPoints() == 0) { labelInvalidSig.Visible = true; } sigBox.SetTabletState(0); //not accepting input. To accept input, change the note, or clear the sig. } } IsStartingUp = false; }
private void DNCDigSignature_Load(object sender, EventArgs e) { counter = 1; data = "Dear member " + strMembershipID + ", due to Do Not Call Registry (DNC), your consent is needed for future telemarketing purposes."; Font f = new System.Drawing.Font("Arial", 9.0F, System.Drawing.FontStyle.Regular); 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 maxScreen = 2; screen = 0; }