|
@@ -57,5 +57,34 @@ namespace PDF_Master.Views.HomePanel.RecentFiles
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ private void Grid_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
|
|
|
|
+ {
|
|
|
|
+ var grid = sender as Grid;
|
|
|
|
+ if (grid != null&&CoverImage.Source==null)
|
|
|
|
+ {
|
|
|
|
+ var data = grid.DataContext as OpenFileInfo;
|
|
|
|
+ if (data == null) return;
|
|
|
|
+
|
|
|
|
+ if (data.IsGuidPDF && App.IsGuidPDFUpdated)
|
|
|
|
+ {
|
|
|
|
+ RecNewMark.Visibility = Visibility.Visible;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (!string.IsNullOrEmpty(data.ThumbImgPath))
|
|
|
|
+ CoverImage.Source = ToolMethod.GetFileThumbImg(data.ThumbImgPath);
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ CPDFDocument tempdoc = CPDFDocument.InitWithFilePath(data.FilePath);
|
|
|
|
+ if (tempdoc != null && (bool)(tempdoc.IsLocked))
|
|
|
|
+ {
|
|
|
|
+ CoverImage.Source = ToolMethod.GetFileThumbImg("pack://application:,,,/Resources/FilesType/ic_propertybar_file_pdf_lock.png");
|
|
|
|
+ }
|
|
|
|
+ else
|
|
|
|
+ CoverImage.Source = ToolMethod.GetFileThumbImg("pack://application:,,,/Resources//FilesType/ic_propertybar_file_png_Large.png");
|
|
|
|
+ tempdoc?.Release();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|