XpsSignatureDefinition.SignBy Özellik

Tanım

İstenen İmzalayanın belirtilen belgenin parçalarını imzalaması gereken tarih ve saati alır veya ayarlar.Gets or sets the date and time by which the requested signer must sign the parts of the specified document.

public:
 property Nullable<DateTime> SignBy { Nullable<DateTime> get(); void set(Nullable<DateTime> value); };
public DateTime? SignBy { get; set; }
member this.SignBy : Nullable<DateTime> with get, set
Public Property SignBy As Nullable(Of DateTime)

Özellik Değeri

Nullable<DateTime>

İmzalayanın, Nullable DateTime imzalayan paketi imzalaması gereken son tarihi temsil eden bir ().A (Nullable) DateTime that represents the deadline by which the signer must sign the package. Varsayılan değer: null.The default value is null.

Örnekler

Aşağıdaki örnekte, bu özelliğin nasıl ayarlanacağı gösterilmektedir.The following example shows how to set this property.


private void SignatureDefinitionCommandHandler(object sender, RoutedEventArgs e)
{
    SignatureDefinition sigDefDialog = new SignatureDefinition();
    if (sigDefDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
    {
        XpsSignatureDefinition signatureDefinition = new XpsSignatureDefinition();
        signatureDefinition.RequestedSigner = sigDefDialog.RequestedSigner.Text;
        signatureDefinition.Intent = sigDefDialog.Intent.Text;
        signatureDefinition.SigningLocale = sigDefDialog.SigningLocale.Text;
        try
        {
            signatureDefinition.SignBy = DateTime.Parse(sigDefDialog.SignBy.Text);
        }
        catch (FormatException)
        {
        }
        signatureDefinition.SpotId = Guid.NewGuid();
        IXpsFixedDocumentSequenceReader docSeq = _xpsDocument.FixedDocumentSequenceReader; //_xpsDocument is type System.Windows.Xps.Packaging.XpsDocument
        IXpsFixedDocumentReader doc = docSeq.FixedDocuments[0];
        doc.AddSignatureDefinition(signatureDefinition);
        doc.CommitSignatureDefinition();
        InitializeSignatureDisplay();
    }
}


Private Sub SignatureDefinitionCommandHandler(sender As Object, e As RoutedEventArgs)
    Using sigDefDialog As New SignatureDefinition()
        If sigDefDialog.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
            Dim signatureDefinition As New XpsSignatureDefinition With {
                .RequestedSigner = sigDefDialog.RequestedSigner.Text,
                .Intent = sigDefDialog.Intent.Text,
                .SigningLocale = sigDefDialog.SigningLocale.Text
            }
            Try
                signatureDefinition.SignBy = Date.Parse(sigDefDialog.SignBy.Text)
            Catch e1 As FormatException
            End Try
            signatureDefinition.SpotId = Guid.NewGuid()
            Dim docSeq As IXpsFixedDocumentSequenceReader = _xpsDocument.FixedDocumentSequenceReader '_xpsDocument is type System.Windows.Xps.Packaging.XpsDocument
            Dim doc As IXpsFixedDocumentReader = docSeq.FixedDocuments(0)
            doc.AddSignatureDefinition(signatureDefinition)
            doc.CommitSignatureDefinition()
            InitializeSignatureDisplay()
        End If
    End Using
End Sub

Açıklamalar

Paketlerindeki imza tanımlarının öğesi hakkında daha fazla bilgi için SignBy XML Paper Specification (XPS)XML Paper Specification (XPS) bkz. XPS 'de alabileceğiniz XPSXPS Belirtim : belirtim ve lisans İndirmeleri.For more information about the SignBy element of signature definitions in XML Paper Specification (XPS)XML Paper Specification (XPS) packages, see the XPSXPS specification, which you can obtain at XPS: Specification and License Downloads.

Şunlara uygulanır