|
@@ -8,7 +8,6 @@ using Compdfkit_Tools.Helper;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Drawing;
|
|
|
-using System.IO;
|
|
|
using System.Reflection;
|
|
|
using System.Windows;
|
|
|
using System.Windows.Controls;
|
|
@@ -17,9 +16,10 @@ using System.Windows.Ink;
|
|
|
using System.Windows.Input;
|
|
|
using System.Windows.Media;
|
|
|
using System.Windows.Media.Imaging;
|
|
|
-using System.Windows.Media.Media3D;
|
|
|
+using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
|
|
using Pen = System.Windows.Media.Pen;
|
|
|
using Point = System.Windows.Point;
|
|
|
+using Window = System.Windows.Window;
|
|
|
|
|
|
namespace Compdfkit_Tools.PDFControl
|
|
|
{
|
|
@@ -27,7 +27,7 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
/// CPDFSignControl.xaml 的交互逻辑
|
|
|
/// </summary>
|
|
|
public partial class FillDigitalSignatureControl : UserControl
|
|
|
- {
|
|
|
+ {
|
|
|
private Dictionary<string, Border> TabDict { get; set; }
|
|
|
|
|
|
private SignatureConfig tempSignatureConfig = new SignatureConfig();
|
|
@@ -41,7 +41,7 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
private string reason = string.Empty;
|
|
|
|
|
|
private string _filePath = string.Empty;
|
|
|
- public string FilePath
|
|
|
+ public string signaturePath
|
|
|
{
|
|
|
get => _filePath;
|
|
|
set
|
|
@@ -57,7 +57,7 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
set
|
|
|
{
|
|
|
_password = value;
|
|
|
- signatureCertificate = CPDFPKCS12CertHelper.GetCertificateWithPKCS12Path(FilePath, Password);
|
|
|
+ signatureCertificate = CPDFPKCS12CertHelper.GetCertificateWithPKCS12Path(signaturePath, Password);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -473,14 +473,15 @@ namespace Compdfkit_Tools.PDFControl
|
|
|
{
|
|
|
location = string.Empty;
|
|
|
}
|
|
|
-
|
|
|
- Document.WriteSignatureToFilePath(signatureWidget, filePath, FilePath, Password, location, reason , false);
|
|
|
+ signatureWidget.UpdataApWithSignature(tempSignatureConfig);
|
|
|
+ Document.WriteSignatureToFilePath(signatureWidget, filePath, signaturePath, Password, location, reason, false);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
private void CancelBtn_Click(object sender, RoutedEventArgs e)
|
|
|
{
|
|
|
-
|
|
|
+ Window parentWindow = Window.GetWindow(sender as DependencyObject);
|
|
|
+ parentWindow?.Close();
|
|
|
}
|
|
|
}
|
|
|
}
|