|
@@ -245,6 +245,7 @@ namespace PDF_Office.ViewModels
|
|
|
public string TextEditContentRegionName { get; set; }
|
|
|
|
|
|
public string BackgroundContentRegionName { get; set; }
|
|
|
+
|
|
|
//若point不赋值或从列表中找不到point,系统会提供默认值为(0,0)的新point,所以改用Tuple<int,int>
|
|
|
public List<Tuple<int, int>> FillAndSign = new List<Tuple<int, int>>();
|
|
|
|
|
@@ -731,6 +732,7 @@ namespace PDF_Office.ViewModels
|
|
|
public DelegateCommand CreateBlankFileCommand { get; set; }
|
|
|
|
|
|
public DelegateCommand ClosePropertyCommand { get; set; }
|
|
|
+
|
|
|
#endregion 命令
|
|
|
|
|
|
public ViewContentViewModel(IRegionManager regionManager, IDialogService dialogService, IEventAggregator eventAggregator)
|
|
@@ -1169,6 +1171,7 @@ namespace PDF_Office.ViewModels
|
|
|
ShowLeftTip(true);
|
|
|
region.RequestNavigate(LeftTipContentRegionName, "SetPasswordSuccessfullyTip");
|
|
|
break;
|
|
|
+
|
|
|
case EnumTipKind.StatusRemoveSecuritySuccessfully:
|
|
|
ShowLeftTip(false);
|
|
|
region.RequestNavigate(TipContentRegionName, "RemoveSecuritySuccessTip");
|
|
@@ -1179,6 +1182,7 @@ namespace PDF_Office.ViewModels
|
|
|
//ReadModelTip = Visibility.Collapsed;
|
|
|
TipVisible = Visibility.Collapsed;
|
|
|
break;
|
|
|
+
|
|
|
default: break;
|
|
|
}
|
|
|
}
|
|
@@ -1270,6 +1274,7 @@ namespace PDF_Office.ViewModels
|
|
|
printValue.Add(ParameterNames.PrintCurrentPage, PDFViewer.CurrentIndex);
|
|
|
dialogs.ShowDialog(DialogNames.HomePagePrinterDialog, printValue, e => { });
|
|
|
}
|
|
|
+
|
|
|
public void SelectClick()
|
|
|
{
|
|
|
if (OpenBOTA == false)
|
|
@@ -1301,10 +1306,10 @@ namespace PDF_Office.ViewModels
|
|
|
isTabItem = true;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
return isTabItem;
|
|
|
}
|
|
|
+
|
|
|
private void InitialregionNameByTabItem(ref Dictionary<string, string> dictionary)
|
|
|
{
|
|
|
dictionary.Add("TabItemPageEdit", ToolContentRegionName);
|
|
@@ -1477,23 +1482,30 @@ namespace PDF_Office.ViewModels
|
|
|
IsLoading = Visibility.Visible;
|
|
|
await Task.Delay(1);
|
|
|
PDFViewer.SetMouseMode(MouseModes.PanTool);
|
|
|
- NavigationParameters param = new NavigationParameters();
|
|
|
- param.Add(ParameterNames.PDFViewer, PDFViewer);
|
|
|
- param.Add(ParameterNames.ViewContentViewModel, this);
|
|
|
- region.RequestNavigate(ToolContentRegionName, "ReadViewContent", param);
|
|
|
|
|
|
- //ShowContent(CurrentBar, true);
|
|
|
- if (GridToolRow != 0)
|
|
|
- {
|
|
|
- GridToolRow = 0;
|
|
|
- }
|
|
|
+ #region 旧版本
|
|
|
|
|
|
- if (GridToolRowSpan != 4)
|
|
|
- {
|
|
|
- GridToolRowSpan = 4;
|
|
|
- }
|
|
|
- //isInPageEdit = true;
|
|
|
- UpdateShowContent("TabItemPageEdit");
|
|
|
+ //NavigationParameters param = new NavigationParameters();
|
|
|
+ //param.Add(ParameterNames.PDFViewer, PDFViewer);
|
|
|
+ //param.Add(ParameterNames.ViewContentViewModel, this);
|
|
|
+ //region.RequestNavigate(ToolContentRegionName, "ReadViewContent", param);
|
|
|
+
|
|
|
+ ////ShowContent(CurrentBar, true);
|
|
|
+ //if (GridToolRow != 0)
|
|
|
+ //{
|
|
|
+ // GridToolRow = 0;
|
|
|
+ //}
|
|
|
+
|
|
|
+ //if (GridToolRowSpan != 4)
|
|
|
+ //{
|
|
|
+ // GridToolRowSpan = 4;
|
|
|
+ //}
|
|
|
+ ////isInPageEdit = true;
|
|
|
+ //UpdateShowContent("TabItemPageEdit");
|
|
|
+
|
|
|
+ #endregion 旧版本
|
|
|
+
|
|
|
+ this.events.GetEvent<ReadModeEvent>().Publish(new ReadModeArgs() { Unicode = unicode, IsReadMode = true });
|
|
|
IsLoading = Visibility.Collapsed;
|
|
|
}
|
|
|
|
|
@@ -1508,25 +1520,32 @@ namespace PDF_Office.ViewModels
|
|
|
await Task.Delay(1);
|
|
|
//PDFViewer.MouseMode = MouseModes.None;
|
|
|
|
|
|
- if (region.Regions.ContainsRegionWithName(ViwerRegionName))
|
|
|
- {
|
|
|
- if (region.Regions[ViwerRegionName].Views.Contains(PDFViewer))
|
|
|
- {
|
|
|
- var contentRegion = region.Regions[ViwerRegionName];
|
|
|
- contentRegion.Remove(PDFViewer);
|
|
|
- }
|
|
|
- //还原背景色
|
|
|
- PDFViewer.SetBackgroundBrush(new System.Windows.Media.SolidColorBrush(Settings.Default.AppProperties.InitialVIew.BackGround));
|
|
|
- region.AddToRegion(ViwerRegionName, PDFViewer);
|
|
|
- }
|
|
|
- if (string.IsNullOrEmpty(CurrentBar) || CurrentBar.Equals("TabItemPageEdit", StringComparison.OrdinalIgnoreCase))
|
|
|
- {
|
|
|
- EnterSelectedBar("TabItemAnnotation");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- EnterSelectedBar(CurrentBar);
|
|
|
- }
|
|
|
+
|
|
|
+ #region 旧版本
|
|
|
+ //if (region.Regions.ContainsRegionWithName(ViwerRegionName))
|
|
|
+ //{
|
|
|
+ // if (region.Regions[ViwerRegionName].Views.Contains(PDFViewer))
|
|
|
+ // {
|
|
|
+ // var contentRegion = region.Regions[ViwerRegionName];
|
|
|
+ // contentRegion.Remove(PDFViewer);
|
|
|
+ // }
|
|
|
+ // //还原背景色
|
|
|
+ // PDFViewer.SetBackgroundBrush(new System.Windows.Media.SolidColorBrush(Settings.Default.AppProperties.InitialVIew.BackGround));
|
|
|
+ // region.AddToRegion(ViwerRegionName, PDFViewer);
|
|
|
+ //}
|
|
|
+ //if (string.IsNullOrEmpty(CurrentBar) || CurrentBar.Equals("TabItemPageEdit", StringComparison.OrdinalIgnoreCase))
|
|
|
+ //{
|
|
|
+ // EnterSelectedBar("TabItemAnnotation");
|
|
|
+ //}
|
|
|
+ //else
|
|
|
+ //{
|
|
|
+ // EnterSelectedBar(CurrentBar);
|
|
|
+ //}
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ //还原背景色
|
|
|
+ PDFViewer.SetBackgroundBrush(new System.Windows.Media.SolidColorBrush(Settings.Default.AppProperties.InitialVIew.BackGround));
|
|
|
+ this.events.GetEvent<ReadModeEvent>().Publish(new ReadModeArgs() { Unicode = unicode, IsReadMode = false });
|
|
|
bool isExist = false;
|
|
|
if (region.Regions.ContainsRegionWithName(TipContentRegionName))
|
|
|
{
|
|
@@ -1545,6 +1564,7 @@ namespace PDF_Office.ViewModels
|
|
|
region.RequestNavigate(TipContentRegionName, "ReadModelTip");
|
|
|
}
|
|
|
|
|
|
+
|
|
|
IsLoading = Visibility.Collapsed;
|
|
|
|
|
|
ShowTip(true);
|