- try to fix error when loading previewer panel...
f9720156
Dimitar Tsenev
committed
succeeded
1 changed file
PreviewControl.xaml.cs
/WpfDocumentPreviewer/PreviewControl.xaml.cs-2+2
/WpfDocumentPreviewer/PreviewControl.xaml.cs
Add comment 57 if (previewHandlerHost1.Open(fileName, out previewGuid) == false) {
Add comment 58 Dispatcher.BeginInvoke(System.Windows.Threading.DispatcherPriority.Normal,
Add comment 59 (Action)(() => {
Add comment 60 Minus   if (previewGuid != null && previewGuid.Value != Guid.Empty || !Images.Contains(Path.GetExtension(fileName))) {
Add comment 60 Plus   if (previewGuid != null && previewGuid.Value != Guid.Empty || !Images.Contains(Path.GetExtension(fileName).ToLowerInvariant())) {
Add comment 61 wb1.Visibility = Visibility.Visible;
Add comment 62 var activeX = wb1.GetType().InvokeMember("ActiveXInstance", BindingFlags.GetProperty | BindingFlags.Instance |
Add comment 63 BindingFlags.NonPublic, null, wb1, new object[] { }) as SHDocVw.WebBrowser;
Add comment 64 activeX.FileDownload += activeX_FileDownload;
Add comment 65 Minus   wb1.Navigate(fileName);
Add comment 65 Plus   wb1.Navigate(System.Net.WebUtility.UrlEncode(fileName));
Add comment 66 imgh1.Visibility = Visibility.Collapsed;
Add comment 67 wfh1.Visibility = Visibility.Collapsed;
Add comment 68 } else {