@@ -150,7 +150,7 @@ namespace ComPDFKit.Controls.PDFControl
}
case "Compare Documents":
{
- System.Diagnostics.Process.Start("https://www.compdf.com/pdf-sdk/document-comparison");
+ OpenFileEvent?.Invoke(this, new OpenFileEventArgs(FileOperationType.OpenFileDirectly, SampleFileName, e.Feature));
break;
case "Conversion":
@@ -197,6 +197,7 @@ namespace ComPDFKit.Controls.PDFView
dialog.Owner = Window.GetWindow((DependencyObject)sender);
dialog.OnCompareStatusChanged += (o, element) => OnCompareStatusChanged?.Invoke(this, element);
+ dialog.OpenOldFile(PdfViewControl.GetCPDFViewer().GetDocument());
dialog.ShowDialog();
@@ -536,6 +536,14 @@ namespace ComPDFKit.Controls.Comparison
+ public void OpenOldFile(CPDFDocument document)
+ {
+ OldDocument = document;
+ int select = AddOldFileList(OldDocument.FileName, document.FilePath);
+ OldFileComboBox.SelectedIndex = select;
+ InitOldDocument();
+ }
+
private void BrowseNewBtn_Click(object sender, RoutedEventArgs e)
string pdfFile = GetChoosePdf();
@@ -311,6 +311,9 @@ namespace PDFViewer
case "Measurement":
ModeComboBox.SelectedIndex = 6;
+ case "Compare Documents":
+ ModeComboBox.SelectedIndex = 7;
+ break;
default: