Upravit

Sdílet prostřednictvím


SignatureLine.Sign(String, String, String, String) Method

Definition

Displays the Sign dialog box with the specified signature image or stamp, and the suggested signer name, title, and e-mail address.

public:
 abstract bool Sign(System::String ^ imageUrl, System::String ^ suggestedSigner, System::String ^ suggestedSignerTitle, System::String ^ suggestedSignerEmail);
public abstract bool Sign (string imageUrl, string suggestedSigner, string suggestedSignerTitle, string suggestedSignerEmail);
abstract member Sign : string * string * string * string -> bool
Public MustOverride Function Sign (imageUrl As String, suggestedSigner As String, suggestedSignerTitle As String, suggestedSignerEmail As String) As Boolean

Parameters

imageUrl
String

The path to the signature or stamp image to display in the control.

suggestedSigner
String

The name of the suggested signer.

suggestedSignerTitle
String

The title of the suggested signer.

suggestedSignerEmail
String

The e-mail address of the suggested signer.

Returns

true if the signing operation succeeds; otherwise, false.

Examples

The following code example accesses the first Signature Line control in the current view, and then calls the Sign(String, String, String, String) method to display the Sign dialog box for signing the entire form or set of data associated with the control. After the control is signed, the code displays a message box that shows the value of the SignatureAppearanceType property for the control.

SignatureLine mySignatureLine = 
   this.CurrentView.SignatureLines[0];
mySignatureLine.Sign(@"C:\Users\Larry\Pictures\MySignature.jpg",
   "Larry Zhang", "Sales Associate", "larry@contoso.com");
MessageBox.Show(mySignatureLine.SignatureAppearanceType.ToString());
Dim mySignatureLine As SignatureLine = _
   Me.CurrentView.SignatureLines(0)
mySignatureLine.Sign("C:\Users\Larry\Pictures\MySignature.jpg", _
   "Larry Zhang", "Sales Associate", "larry@contoso.com")
MessageBox.Show(mySignatureLine.SignatureAppearanceType.ToString())

Remarks

The values for all of the parameters of the Sign(String, String, String, String) method are optional. To omit any parameter, pass a null reference (Nothing in Visual Basic) for that parameter. You can also pass String.Empty for the suggestedSigner, suggestedSignerTitle, and suggestedSignerEmail parameters. If you pass a null reference (Nothing in Visual Basic) or String.Empty for a parameter and the value of the corresponding property was previously set programmatically or in the Signature Line control at design time, that value will be used when the form or set of data is signed.

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

This type or member can be accessed only from code running in forms opened in Microsoft InfoPath Filler.

Applies to