Older Topaz sigs no longer showing
Posted: Thu Jul 21, 2011 8:55 am
Topaz sigs signed recently (probably since OD 11) will show, but not ones signed previously. I noticed the changes you made to rectify the 'signed with zeros' bug but adding these to my code has no effect.
How to fix?
Code: Select all
if (AnesthDataCur.SigIsTopaz == true && AnesthDataCur.Signature != "") {
sigBox.Visible = false;
sigBoxTopaz.Visible = true;
CodeBase.TopazWrapper.ClearTopaz(sigBoxTopaz);
CodeBase.TopazWrapper.SetTopazCompressionMode(sigBoxTopaz, 0);
CodeBase.TopazWrapper.SetTopazEncryptionMode(sigBoxTopaz, 0);
CodeBase.TopazWrapper.SetTopazKeyString(sigBoxTopaz, "0000000000000000");
CodeBase.TopazWrapper.SetTopazAutoKeyData(sigBoxTopaz, AnesthDataCur.AnestheticRecordNum.ToString());//AnesthDataCur.Notes + AnestheticRecordCur.ProvNum.ToString());
CodeBase.TopazWrapper.SetTopazEncryptionMode(sigBoxTopaz, 2);//high encryption
CodeBase.TopazWrapper.SetTopazCompressionMode(sigBoxTopaz, 2);//high compression
CodeBase.TopazWrapper.SetTopazSigString(sigBoxTopaz, AnesthDataCur.Signature);
//older notes may have been signed with zeros due to a bug. We still want to show the sig in that case.
//but if a sig is not showing, then set the key string to try to get it to show.
if (CodeBase.TopazWrapper.GetTopazNumberOfTabletPoints(sigBoxTopaz) == 0) {
CodeBase.TopazWrapper.SetTopazAutoKeyData(sigBoxTopaz, AnesthDataCur.Signature);
CodeBase.TopazWrapper.SetTopazSigString(sigBoxTopaz, AnesthDataCur.Signature);
}
//If sig is not showing, then try encryption mode 3 for signatures signed with old SigPlusNet.dll.
if (CodeBase.TopazWrapper.GetTopazNumberOfTabletPoints(sigBoxTopaz) == 0) {
CodeBase.TopazWrapper.SetTopazEncryptionMode(sigBoxTopaz, 3);//Unknown mode (told to use via TopazSystems)
CodeBase.TopazWrapper.SetTopazSigString(sigBoxTopaz, AnesthDataCur.Signature);
}
sigBoxTopaz.Refresh();
}