|
@@ -18,6 +18,7 @@ namespace PDF_Master.Model.AnnotPanel
|
|
{
|
|
{
|
|
//注释类型
|
|
//注释类型
|
|
private AnnotArgsType _annotType;
|
|
private AnnotArgsType _annotType;
|
|
|
|
+
|
|
public AnnotArgsType AnnotType
|
|
public AnnotArgsType AnnotType
|
|
{
|
|
{
|
|
get { return _annotType; }
|
|
get { return _annotType; }
|
|
@@ -26,6 +27,7 @@ namespace PDF_Master.Model.AnnotPanel
|
|
|
|
|
|
//注释类型名称
|
|
//注释类型名称
|
|
private string _annotTypeTitle;
|
|
private string _annotTypeTitle;
|
|
|
|
+
|
|
public string AnnotTypeTitle
|
|
public string AnnotTypeTitle
|
|
{
|
|
{
|
|
get { return _annotTypeTitle; }
|
|
get { return _annotTypeTitle; }
|
|
@@ -36,6 +38,7 @@ namespace PDF_Master.Model.AnnotPanel
|
|
|
|
|
|
//线条粗细大小
|
|
//线条粗细大小
|
|
private double _annotThickness = 1;
|
|
private double _annotThickness = 1;
|
|
|
|
+
|
|
public double AnnotThickness
|
|
public double AnnotThickness
|
|
{
|
|
{
|
|
get { return _annotThickness; }
|
|
get { return _annotThickness; }
|
|
@@ -44,6 +47,7 @@ namespace PDF_Master.Model.AnnotPanel
|
|
|
|
|
|
//线条样式
|
|
//线条样式
|
|
private DashStyle dash = new DashStyle();
|
|
private DashStyle dash = new DashStyle();
|
|
|
|
+
|
|
public DashStyle Dash
|
|
public DashStyle Dash
|
|
{
|
|
{
|
|
get { return dash; }
|
|
get { return dash; }
|
|
@@ -53,8 +57,10 @@ namespace PDF_Master.Model.AnnotPanel
|
|
#endregion 线条
|
|
#endregion 线条
|
|
|
|
|
|
#region 填充
|
|
#region 填充
|
|
|
|
+
|
|
//填充颜色透明度
|
|
//填充颜色透明度
|
|
private double fillOpacity = 1;
|
|
private double fillOpacity = 1;
|
|
|
|
+
|
|
public double FillOpacity
|
|
public double FillOpacity
|
|
{
|
|
{
|
|
get { return fillOpacity; }
|
|
get { return fillOpacity; }
|
|
@@ -63,6 +69,7 @@ namespace PDF_Master.Model.AnnotPanel
|
|
|
|
|
|
//当前填充颜色
|
|
//当前填充颜色
|
|
private Brush _currentFillColor = new SolidColorBrush(Colors.Transparent);
|
|
private Brush _currentFillColor = new SolidColorBrush(Colors.Transparent);
|
|
|
|
+
|
|
public Brush CurrentFillColor
|
|
public Brush CurrentFillColor
|
|
{
|
|
{
|
|
get { return _currentFillColor; }
|
|
get { return _currentFillColor; }
|
|
@@ -71,6 +78,7 @@ namespace PDF_Master.Model.AnnotPanel
|
|
|
|
|
|
//填充颜色
|
|
//填充颜色
|
|
private Brush fillColor = new SolidColorBrush(Colors.Transparent);
|
|
private Brush fillColor = new SolidColorBrush(Colors.Transparent);
|
|
|
|
+
|
|
public Brush FillColor
|
|
public Brush FillColor
|
|
{
|
|
{
|
|
get { return fillColor; }
|
|
get { return fillColor; }
|
|
@@ -79,6 +87,7 @@ namespace PDF_Master.Model.AnnotPanel
|
|
|
|
|
|
//边框颜色集合
|
|
//边框颜色集合
|
|
private List<ColorItem> _colorItems = new List<ColorItem>();
|
|
private List<ColorItem> _colorItems = new List<ColorItem>();
|
|
|
|
+
|
|
public List<ColorItem> ColorItems
|
|
public List<ColorItem> ColorItems
|
|
{
|
|
{
|
|
get { return _colorItems; }
|
|
get { return _colorItems; }
|
|
@@ -87,16 +96,20 @@ namespace PDF_Master.Model.AnnotPanel
|
|
|
|
|
|
//填充颜色集合
|
|
//填充颜色集合
|
|
private List<ColorItem> _fillColorItems = new List<ColorItem>();
|
|
private List<ColorItem> _fillColorItems = new List<ColorItem>();
|
|
|
|
+
|
|
public List<ColorItem> FillColorItems
|
|
public List<ColorItem> FillColorItems
|
|
{
|
|
{
|
|
get { return _fillColorItems; }
|
|
get { return _fillColorItems; }
|
|
set => SetProperty(ref _fillColorItems, value);
|
|
set => SetProperty(ref _fillColorItems, value);
|
|
}
|
|
}
|
|
|
|
+
|
|
#endregion 填充
|
|
#endregion 填充
|
|
|
|
|
|
#region 边框
|
|
#region 边框
|
|
|
|
+
|
|
//边框颜色透明度
|
|
//边框颜色透明度
|
|
private double _borderOpacity = 1;
|
|
private double _borderOpacity = 1;
|
|
|
|
+
|
|
public double BorderOpacity
|
|
public double BorderOpacity
|
|
{
|
|
{
|
|
get { return _borderOpacity; }
|
|
get { return _borderOpacity; }
|
|
@@ -104,6 +117,7 @@ namespace PDF_Master.Model.AnnotPanel
|
|
}
|
|
}
|
|
|
|
|
|
private Brush _borderColor = new SolidColorBrush(Colors.Transparent);
|
|
private Brush _borderColor = new SolidColorBrush(Colors.Transparent);
|
|
|
|
+
|
|
public Brush BorderColor
|
|
public Brush BorderColor
|
|
{
|
|
{
|
|
get { return _borderColor; }
|
|
get { return _borderColor; }
|
|
@@ -112,6 +126,7 @@ namespace PDF_Master.Model.AnnotPanel
|
|
|
|
|
|
//当前边框颜色
|
|
//当前边框颜色
|
|
private Brush _currentBorderColor = new SolidColorBrush(Colors.Transparent);
|
|
private Brush _currentBorderColor = new SolidColorBrush(Colors.Transparent);
|
|
|
|
+
|
|
public Brush CurrentBorderColor
|
|
public Brush CurrentBorderColor
|
|
{
|
|
{
|
|
get { return _currentBorderColor; }
|
|
get { return _currentBorderColor; }
|
|
@@ -119,15 +134,16 @@ namespace PDF_Master.Model.AnnotPanel
|
|
}
|
|
}
|
|
|
|
|
|
private Brush _fontColor = new SolidColorBrush(Colors.Transparent);
|
|
private Brush _fontColor = new SolidColorBrush(Colors.Transparent);
|
|
|
|
+
|
|
public Brush FontColor
|
|
public Brush FontColor
|
|
{
|
|
{
|
|
get { return _fontColor; }
|
|
get { return _fontColor; }
|
|
set { SetProperty(ref _fontColor, value); CurrentFontColor = _fontColor; }
|
|
set { SetProperty(ref _fontColor, value); CurrentFontColor = _fontColor; }
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
//当前边框颜色
|
|
//当前边框颜色
|
|
private Brush _currentFontColor = new SolidColorBrush(Colors.Transparent);
|
|
private Brush _currentFontColor = new SolidColorBrush(Colors.Transparent);
|
|
|
|
+
|
|
public Brush CurrentFontColor
|
|
public Brush CurrentFontColor
|
|
{
|
|
{
|
|
get { return _currentFontColor; }
|
|
get { return _currentFontColor; }
|
|
@@ -136,6 +152,7 @@ namespace PDF_Master.Model.AnnotPanel
|
|
|
|
|
|
//是否为实线
|
|
//是否为实线
|
|
private bool _isSolidLine = true;
|
|
private bool _isSolidLine = true;
|
|
|
|
+
|
|
public bool IsSolidLine
|
|
public bool IsSolidLine
|
|
{
|
|
{
|
|
get { return _isSolidLine; }
|
|
get { return _isSolidLine; }
|
|
@@ -144,6 +161,7 @@ namespace PDF_Master.Model.AnnotPanel
|
|
|
|
|
|
//是否为虚线
|
|
//是否为虚线
|
|
private bool _isDashLine = true;
|
|
private bool _isDashLine = true;
|
|
|
|
+
|
|
public bool IsDashLine
|
|
public bool IsDashLine
|
|
{
|
|
{
|
|
get { return _isDashLine; }
|
|
get { return _isDashLine; }
|
|
@@ -152,30 +170,44 @@ namespace PDF_Master.Model.AnnotPanel
|
|
|
|
|
|
//外部UI引用,其他:例如形状注释类型
|
|
//外部UI引用,其他:例如形状注释类型
|
|
public string strOtherTag { get; private set; }
|
|
public string strOtherTag { get; private set; }
|
|
|
|
+
|
|
//VM赋值
|
|
//VM赋值
|
|
public void SetOtherTag(string str)
|
|
public void SetOtherTag(string str)
|
|
{
|
|
{
|
|
strOtherTag = str;
|
|
strOtherTag = str;
|
|
}
|
|
}
|
|
|
|
|
|
- #endregion
|
|
|
|
|
|
+ #endregion 边框
|
|
|
|
|
|
#region 多选
|
|
#region 多选
|
|
|
|
|
|
//多选注释:用处 - 多选注释使得下拉框为空内容,刷新最新的UI布局
|
|
//多选注释:用处 - 多选注释使得下拉框为空内容,刷新最新的UI布局
|
|
private bool _isMultiSelected = false;
|
|
private bool _isMultiSelected = false;
|
|
|
|
+
|
|
public bool IsMultiSelected
|
|
public bool IsMultiSelected
|
|
{
|
|
{
|
|
get { return _isMultiSelected; }
|
|
get { return _isMultiSelected; }
|
|
set => SetProperty(ref _isMultiSelected, value);
|
|
set => SetProperty(ref _isMultiSelected, value);
|
|
}
|
|
}
|
|
|
|
|
|
- #endregion
|
|
|
|
|
|
+ private bool isSharpAnnotSelected = false;
|
|
|
|
+
|
|
|
|
+ public bool IsSharpAnnotSelected
|
|
|
|
+ {
|
|
|
|
+ get { return isSharpAnnotSelected; }
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ SetProperty(ref isSharpAnnotSelected, value);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ #endregion 多选
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// VM触发到外部UI事件
|
|
/// VM触发到外部UI事件
|
|
/// </summary>
|
|
/// </summary>
|
|
public event EventHandler<object> SelectedAnnotInvokeToUI;
|
|
public event EventHandler<object> SelectedAnnotInvokeToUI;
|
|
|
|
+
|
|
//Todo:由于考虑到有些UI在VM不太方便处理,因此需要触发该函数到外部xaml.cs里更改UI属性。
|
|
//Todo:由于考虑到有些UI在VM不太方便处理,因此需要触发该函数到外部xaml.cs里更改UI属性。
|
|
//更改多个属性:value可为键值对集合
|
|
//更改多个属性:value可为键值对集合
|
|
//适应范围:若VM在Loaded进行绑定,需要UI初始化之后,才能起到作用
|
|
//适应范围:若VM在Loaded进行绑定,需要UI初始化之后,才能起到作用
|
|
@@ -183,7 +215,5 @@ namespace PDF_Master.Model.AnnotPanel
|
|
{
|
|
{
|
|
SelectedAnnotInvokeToUI?.Invoke(sender, value);
|
|
SelectedAnnotInvokeToUI?.Invoke(sender, value);
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
-}
|
|
|
|
|
|
+}
|