SignEventObject - Interface

Objet d'événement utilisé pendant l'événement OnSign.

Espace de noms :  Microsoft.Office.Interop.InfoPath
Assembly :  Microsoft.Office.Interop.InfoPath (dans Microsoft.Office.Interop.InfoPath.dll)

Syntaxe

'Déclaration
<GuidAttribute("096CD71D-0786-11D1-95FA-0080C78EE3BB")> _
Public Interface SignEventObject _
    Inherits SignEvent
'Utilisation
Dim instance As SignEventObject
[GuidAttribute("096CD71D-0786-11D1-95FA-0080C78EE3BB")]
public interface SignEventObject : SignEvent

Remarques

Ce type est le wrapper d’une coclasse requise par le code managé pour l’interopérabilité COM. Utilisez ce type pour accéder aux membres de l’interface COM implémentée par cette coclasse. Pour plus d’informations sur l’interface COM et pour accéder à un lien vers les descriptions de ses membres, voirSignEvent.

Utilisez la propriété SignedDataBlock de l'objet SignedDataBlockObject pour déterminer quel jeu de données pouvant être signé, déclenche l'événement OnSign . L'événement OnSign peut être personnalisé pour un modèle de formulaire entièrement fiable uniquement.

Exemples

Dans l'exemple suivant, l'objet SignEvent est utilisée pour ajouter une signature et un horodatage à un objet 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;
}

Voir aussi

Référence

SignEventObject - Membres

Microsoft.Office.Interop.InfoPath - Espace de noms