|
@@ -41,6 +41,52 @@ namespace PDF_Office.ViewModels
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private double value = 0;
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 进度条当前值
|
|
|
|
+ /// </summary>
|
|
|
|
+ public double Value
|
|
|
|
+ {
|
|
|
|
+ get { return value; }
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ SetProperty(ref value, value);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private double maxValue = 100;
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 进度条最大值
|
|
|
|
+ /// </summary>
|
|
|
|
+ public double MaxValue
|
|
|
|
+ {
|
|
|
|
+ get { return maxValue; }
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ SetProperty(ref maxValue, value);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ private Visibility isProcessVisible = Visibility.Collapsed;
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// OCR进度条是否显示
|
|
|
|
+ /// </summary>
|
|
|
|
+ public Visibility IsProcessVisible
|
|
|
|
+ {
|
|
|
|
+ get { return isProcessVisible; }
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ SetProperty(ref isProcessVisible, value);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 进度条关闭的事件
|
|
|
|
+ /// </summary>
|
|
|
|
+ public Action ProcessCloseAction;
|
|
|
|
+
|
|
|
|
+
|
|
private CPDFViewer pdfViewer;
|
|
private CPDFViewer pdfViewer;
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
@@ -54,6 +100,10 @@ namespace PDF_Office.ViewModels
|
|
|
|
|
|
public DelegateCommand AddTab { get; set; }
|
|
public DelegateCommand AddTab { get; set; }
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 关闭OCR进度条
|
|
|
|
+ /// </summary>
|
|
|
|
+ public DelegateCommand CloseOCRCommand { get; set; }
|
|
|
|
|
|
public IRegionManager region;
|
|
public IRegionManager region;
|
|
|
|
|
|
@@ -80,6 +130,7 @@ namespace PDF_Office.ViewModels
|
|
InterTabClient = new InterTabClient(container);
|
|
InterTabClient = new InterTabClient(container);
|
|
|
|
|
|
AddTab = new DelegateCommand(AddTabItem);
|
|
AddTab = new DelegateCommand(AddTabItem);
|
|
|
|
+ CloseOCRCommand = new DelegateCommand(closeocr);
|
|
|
|
|
|
//第一次打开时需要自动加载Home页
|
|
//第一次打开时需要自动加载Home页
|
|
if (App.IsFirstOpen)
|
|
if (App.IsFirstOpen)
|
|
@@ -93,6 +144,17 @@ namespace PDF_Office.ViewModels
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 关闭OCR
|
|
|
|
+ /// </summary>
|
|
|
|
+ private void closeocr()
|
|
|
|
+ {
|
|
|
|
+ if(ProcessCloseAction!=null)
|
|
|
|
+ {
|
|
|
|
+ ProcessCloseAction.Invoke();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 单击+号时添加页签
|
|
/// 单击+号时添加页签
|
|
/// </summary>
|
|
/// </summary>
|