OnSign イベントのリターン状態を取得または設定します。
このプロパティは、CLS に準拠していません。
名前空間: Microsoft.Office.Interop.InfoPath.SemiTrust
アセンブリ: Microsoft.Office.Interop.InfoPath.SemiTrust (microsoft.office.interop.infopath.semitrust.dll 内)
構文
'宣言
<DispIdAttribute(101)> _
Property ReturnStatus As Boolean
'使用
Dim instance As SignEvent
Dim value As Boolean
value = instance.ReturnStatus
instance.ReturnStatus = value
[DispIdAttribute(101)]
bool ReturnStatus { get; set; }
コメント
SignEventObject オブジェクトの ReturnStatus プロパティが false に設定されている場合は、[デジタル署名ウィザード] ダイアログ ボックスが開き、ユーザーが閉じない限り表示されたままになります。
![]() |
---|
このメンバは、現在開いているフォームと同じドメイン内で実行されているフォーム、またはドメインを越えたアクセス許可を付与されているフォームだけがアクセスできます。 |
例
次の例では、OnSign イベント ハンドラで ReturnStatus プロパティが false に設定されている場合は、署名可能なデータ セットに別の署名を追加できるように、[デジタル署名ウィザード] をもう一度表示しています。署名可能な最初のデータ セットに署名が既に 3 つ存在している場合は、ReturnStatus プロパティを true に設定して OnSign イベント ハンドラを終了しています。このようにすると、[デジタル署名ウィザード] が閉じ、警告が表示されることになります。
[InfoPathEventHandler(EventType=InfoPathEventType.OnSign)]
public void OnSign(SignEvent e)
{
Signature thisSignature = e.SignedDataBlock.Signatures.Create();
// check if the current signed data block is the first signed data block in list
// if it is the first signed data block, then do special handling
// else use the default handler (triggered by e.ReturnStatus = false)
if ( e.SignedDataBlock.Name == thisXDocument.SignedDataBlocks[0].Name )
{
// check the number of signatures in the first signed data block
// if there are three signatures, don’t add another signature and set ReturnStatus to true)
// else add the signature (use the Sign() method to show the wizard) and don’t do anything else (ReturnStatus is true)
if ( thisXDocument.SignedDataBlocks[0].Signatures.Count > 3 )
{
thisXDocument.UI.Alert("Only 3 signatures are allowed on this set of data : " + e.SignedDataBlock.Name );
e.ReturnStatus = true;
}
else
{
thisSignature.Sign();
e.ReturnStatus = true;
}
}
else
{
e.ReturnStatus = false;
}
}
関連項目
参照
SignEvent インターフェイス
SignEvent のメンバ
Microsoft.Office.Interop.InfoPath.SemiTrust 名前空間