예제 #1
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            //if (SigPlusNET1.NumberOfTabletPoints() > 0)
            //{
            DialogResult yes = MessageBox.Show(this, "Confirm to print?", "Warning", MessageBoxButtons.YesNo);

            if (yes == DialogResult.Yes)
            {
                SigPlusNET1.ClearSigWindow(1);
                SigPlusNET1.LCDRefresh(0, 0, 0, 240, 64);

                strDateTime = DateTime.Now.ToString("dd/MM/yyyy  hh:mm tt");
                SigPlusNET1.SetTimeStamp(strDateTime);
                SigPlusNET1.SetSaveSigInfo(true);

                SigPlusNET1.SetSigCompressionMode(1);
                SigPlusNET1.AutoKeyStart();
                SigPlusNET1.SetAutoKeyData(strKeyData);
                SigPlusNET1.AutoKeyFinish();
                SigPlusNET1.SetEncryptionMode(2);

                txtImageBinary.Text = SigPlusNET1.GetSigString();
                strSignatureID      = txtImageBinary.Text;
                SigPlusNET1.SetTabletState(0);

                this.DialogResult = DialogResult.OK;
            }

            //}
            //else
            //{
            //    MessageBox.Show(this, "Please sign before continue.");
            //}
        }
예제 #2
0
        private void cmdClose_Click(object sender, EventArgs e)
        {
            //SigPlusNET1.SetTabletState(0);
            try
            {
                SigPlusNET1.ClearSigWindow(1);

                strDateTime = DateTime.Now.ToString("dd/MM/yyyy  hh:mm tt");
                SigPlusNET1.SetTimeStamp(strDateTime);
                SigPlusNET1.SetSaveSigInfo(true);

                SigPlusNET1.SetSigCompressionMode(1);
                SigPlusNET1.AutoKeyStart();
                SigPlusNET1.SetAutoKeyData(strKeyData);
                SigPlusNET1.AutoKeyFinish();
                SigPlusNET1.SetEncryptionMode(2);

                txtImageBinary.Text = SigPlusNET1.GetSigString();
                strSignatureID      = txtImageBinary.Text;
            }
            catch { }

            SigPlusNET1.SetTabletState(0);

            this.DialogResult = DialogResult.Cancel;
            this.Close();
        }