void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.pdfViewer = ((MergePDFs.PDFViewer)(target)); return; case 2: this.webBrowser1 = ((System.Windows.Controls.WebBrowser)(target)); return; } this._contentLoaded = true; }
public void OnLeftDoubleClickExecuted(object parameter) { if (parameter != null) { PDFData data = (PDFData)parameter; try { PDFViewer pdfViewer = new PDFViewer(); pdfViewer.SetPDFPath(data.Filename); pdfViewer.Show(); } catch (Exception ex) { MessageBox.Show("Error message:\n\n" + ex.Message, "Warning", MessageBoxButton.OK, MessageBoxImage.Warning); } } }