Interfaccia SignEventObject
Oggetto evento utilizzato durante l'evento OnSign.
Spazio dei nomi: Microsoft.Office.Interop.InfoPath
Assembly: Microsoft.Office.Interop.InfoPath (in microsoft.office.interop.infopath.dll)
Sintassi
<CoClassAttribute(GetType(SignEventObjectClass))> _
<GuidAttribute("096CD71D-0786-11D1-95FA-0080C78EE3BB")> _
Public Interface SignEventObject
Inherits SignEvent
Dim instance As SignEventObject
[CoClassAttribute(typeof(SignEventObjectClass))]
[GuidAttribute("096CD71D-0786-11D1-95FA-0080C78EE3BB")]
public interface SignEventObject : SignEvent
Osservazioni
Questo tipo è un wrapper per una coclasse richiesta dal codice gestito per l'interoperabilità COM. Utilizzare questo tipo per accedere ai membri dell'interfaccia COM implementata dalla coclasse. Per informazioni sull'interfaccia COM e un collegamento alle descrizioni dei relativi membri, vedere SignEvent.
Utilizzare la proprietà SignedDataBlock dell'oggetto SignedDataBlockObject per determinare quale blocco di dati firmabile sta generando l'evento OnSign. L'evento OnSign può essere personalizzato solo per i modelli di modulo completamente attendibili.
Esempio
Nell'esempio seguente, l'oggetto SignEvent viene utilizzato per aggiungere una firma e un timestamp a un oggetto SignedDataBlockObject:
public void OnSign(SignEvent e)
{
Signature signature = e.SignedDataBlock.Signatures.Create();
signature.Sign();
// Countersign the signature with a trusted timestamp.
// Get the XML node storing the signature block.
IXMLDOMNode oNodeSig = signature.SignatureBlockXmlNode;
IXMLDOMNode oNodeSigValue = oNodeSig.selectSingleNode(".//*[local-name(.)=’signatureValue’]");
// Get time stamp from timestamp service (fictitious).
MyTrustedTimeStampingService s = new MyTrustedTimeStampingService();
string strVerifiedTimeStamp = s.AddTimeStamp(oNodeSigValue.text);
//Add the value returned from the timestamping service to the
//unsigned part of the signature block.
IXMLDOMNode oNodeObj = oNodeSig.selectSingleNode(".//*[local-name(.)=’Object’]");
IXMLDOMNode oNode = oNodeObj.cloneNode(false);
oNode.text = strVerifiedTimeStamp;
oNodeObj.parentNode.appendChild(oNode);
e.ReturnStatus = true;
}
Vedere anche
Riferimenti
Membri SignEventObject
Spazio dei nomi Microsoft.Office.Interop.InfoPath