|
@@ -48,6 +48,8 @@ using PDFSettings;
|
|
|
using PDF_Master.Views;
|
|
|
using System.Windows.Documents;
|
|
|
using ComPDFKit.PDFPage;
|
|
|
+using ComPDFKitViewer;
|
|
|
+using SplitMode = PDF_Master.EventAggregators.SplitMode;
|
|
|
|
|
|
namespace PDF_Master.ViewModels
|
|
|
{
|
|
@@ -709,10 +711,12 @@ namespace PDF_Master.ViewModels
|
|
|
private bool isCreateLink = false;
|
|
|
internal bool IsRightMenuSelectedTextAddLink = false;
|
|
|
internal bool IsSelectedTextAddLink = false;
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 上下左右滑动的距离
|
|
|
/// </summary>
|
|
|
private double scrolloffset = 50;
|
|
|
+
|
|
|
public string LinkAnnotTipText
|
|
|
{
|
|
|
get { return linkAnnotTipText; }
|
|
@@ -724,6 +728,7 @@ namespace PDF_Master.ViewModels
|
|
|
|
|
|
private bool botaState = false;
|
|
|
private bool propertyOpenState = false;
|
|
|
+
|
|
|
#endregion 属性、变量
|
|
|
|
|
|
#region 命令
|
|
@@ -2095,7 +2100,7 @@ namespace PDF_Master.ViewModels
|
|
|
botaState = OpenBOTA;
|
|
|
propertyOpenState = IsPropertyOpen;
|
|
|
|
|
|
- //5.6注释
|
|
|
+ //5.6注释
|
|
|
//已调整左右侧边栏层级,暂时注释掉,修复展开BOTA,进入阅读模式再退出后,BOTA保持展开,但没有选中的问题
|
|
|
//留意测试阶段是否会有问题,如果没问题,在上线前删除
|
|
|
|
|
@@ -2187,28 +2192,32 @@ namespace PDF_Master.ViewModels
|
|
|
}
|
|
|
}
|
|
|
///退出阅读模式 显示视图面板
|
|
|
- //IsPropertyOpen = true;
|
|
|
- //if (region.Regions.ContainsRegionWithName(PropertyRegionName))
|
|
|
- //{
|
|
|
- // NavigationParameters param = new NavigationParameters();
|
|
|
- // param.Add(ParameterNames.PDFViewer, PDFViewer);
|
|
|
- // param.Add(ParameterNames.BottomToolContentViewModel, this);
|
|
|
- // region.RequestNavigate(RegionNames.PropertyRegionName, "ViewModularContent", param);
|
|
|
- //}
|
|
|
- if (region.Regions.ContainsRegionWithName(BottomToolRegionName))
|
|
|
+ BottomToolContent bottomTool = null;
|
|
|
+ BottomToolContentViewModel bottomToolVM = GetBottomToolContentVM(ref bottomTool);
|
|
|
+ if (bottomToolVM != null)
|
|
|
{
|
|
|
- var views = region.Regions[BottomToolRegionName].Views;
|
|
|
- var isHasView = views.FindFirst(q => q is BottomToolContent);
|
|
|
- if (isHasView is BottomToolContent bottomToolContent)
|
|
|
+ bottomToolVM.IsShowViewModular = propertyOpenState;
|
|
|
+ IsPropertyOpen = propertyOpenState;
|
|
|
+ if (bottomToolVM.IsShowViewModular && bottomTool != null)
|
|
|
{
|
|
|
- BottomToolContentViewModel toolContentViewModel = bottomToolContent.DataContext as BottomToolContentViewModel;
|
|
|
- toolContentViewModel.IsShowViewModular = propertyOpenState;
|
|
|
- IsPropertyOpen = propertyOpenState;
|
|
|
+ bottomToolVM.ShowViewModularCommand.Execute(true);
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
+ //if (region.Regions.ContainsRegionWithName(BottomToolRegionName))
|
|
|
+ //{
|
|
|
+ // var views = region.Regions[BottomToolRegionName].Views;
|
|
|
+ // var isHasView = views.FindFirst(q => q is BottomToolContent);
|
|
|
+ // if (isHasView is BottomToolContent bottomToolContent)
|
|
|
+ // {
|
|
|
+ // BottomToolContentViewModel toolContentViewModel = bottomToolContent.DataContext as BottomToolContentViewModel;
|
|
|
+ // toolContentViewModel.IsShowViewModular = propertyOpenState;
|
|
|
+ // IsPropertyOpen = propertyOpenState;
|
|
|
+ // }
|
|
|
+ //}
|
|
|
|
|
|
IsLoading = Visibility.Collapsed;
|
|
|
- //5.6注释
|
|
|
+ //5.6注释
|
|
|
//已调整左右侧边栏层级,暂时注释掉,修复展开BOTA,进入阅读模式再退出后,BOTA保持展开,但没有选中的问题
|
|
|
//留意测试阶段是否会有问题,如果没问题,在上线前删除
|
|
|
//5.15
|
|
@@ -2228,6 +2237,22 @@ namespace PDF_Master.ViewModels
|
|
|
TipVisible = Visibility.Collapsed;
|
|
|
}
|
|
|
|
|
|
+ public BottomToolContentViewModel GetBottomToolContentVM(ref BottomToolContent bottomTool)
|
|
|
+ {
|
|
|
+ BottomToolContentViewModel viewModel = null;
|
|
|
+ if (region.Regions.ContainsRegionWithName(BottomToolRegionName))
|
|
|
+ {
|
|
|
+ var views = region.Regions[BottomToolRegionName].Views;
|
|
|
+ var isHasView = views.FindFirst(q => q is BottomToolContent);
|
|
|
+ if (isHasView is BottomToolContent bottomToolContent)
|
|
|
+ {
|
|
|
+ bottomTool = bottomToolContent;
|
|
|
+ viewModel = bottomToolContent.DataContext as BottomToolContentViewModel;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return viewModel;
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 高级功能前弹出比较表
|
|
|
/// </summary>
|
|
@@ -2686,8 +2711,6 @@ namespace PDF_Master.ViewModels
|
|
|
string tempPath = PDFViewer.Document.FilePath + ".temp.pdf";
|
|
|
if (PDFViewer.Document.Descrypt(tempPath))
|
|
|
{
|
|
|
-
|
|
|
-
|
|
|
PDFViewer.CloseDocument();
|
|
|
PDFViewer.InitDocument(tempPath);
|
|
|
PDFViewer.Document.Encrypt(openPassword, permissionsPassword, cPDFPermissionsInfo);
|