Browse Source

注释- 封装通用属性

chenrongqian@kdanmobile.com 2 years ago
parent
commit
1f64146a2a

+ 1 - 0
PDF Office/PDF Office.csproj

@@ -493,6 +493,7 @@
     <Compile Include="ViewModels\Dialog\HomePageToolsDialogs\HomePageBatchProcessing\HomePageWatermark\HomePageWatermarkTemplateListTextContentViewModel.cs" />
     <Compile Include="ViewModels\HomePanel\PDFTools\PDFToolsContentViewModel.cs" />
     <Compile Include="ViewModels\HomePanel\PDFTools\QuickToolsContentViewModel.cs" />
+    <Compile Include="ViewModels\PropertyPanel\AnnotPanel\AnnotBasePropertyVM.cs" />
     <Compile Include="ViewModels\PropertyPanel\AnnotPanel\MultiSelectAnnotPropertyViewModel.cs" />
     <Compile Include="ViewModels\PropertyPanel\AnnotPanel\SignatureAnnotPropertyViewModel.cs" />
     <Compile Include="ViewModels\PropertyPanel\AnnotPanel\SignatureCreateDialogViewModel.cs" />

+ 128 - 0
PDF Office/ViewModels/PropertyPanel/AnnotPanel/AnnotBasePropertyVM.cs

@@ -0,0 +1,128 @@
+using ComPDFKitViewer.AnnotEvent;
+using Prism.Mvvm;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+
+namespace PDF_Office.ViewModels.PropertyPanel.AnnotPanel
+{
+
+    public class AnnotBasePropertyVM : BindableBase
+    {
+        //注释类型
+        private AnnotArgsType _annotType;
+        public AnnotArgsType AnnotType
+        {
+            get { return _annotType; }
+            set => SetProperty(ref _annotType, value);
+        }
+
+        //注释类型名称
+        private string _annotTypeTitle;
+        public string AnnotTypeTitle
+        {
+            get { return _annotTypeTitle; }
+            set => SetProperty(ref _annotTypeTitle, value);
+        }
+
+        //线条粗细大小
+        private double _annotThickness = 1;
+        public double AnnotThickness
+        {
+            get { return _annotThickness; }
+            set => SetProperty(ref _annotThickness, value);
+        }
+
+        //线条样式
+        private DashStyle dash = new DashStyle();
+        public DashStyle Dash
+        {
+            get { return dash; }
+            set => SetProperty(ref dash, value);
+        }
+
+        #region 填充
+        //填充颜色透明度
+        private double fillOpacity = 1;
+        public double FillOpacity
+        {
+            get { return fillOpacity; }
+            set => SetProperty(ref fillOpacity, value);
+        }
+
+        //当前填充颜色
+        private Brush _currentFillColor = new SolidColorBrush(Colors.Transparent);
+        public Brush CurrentFillColor
+        {
+            get { return _currentFillColor; }
+            set => SetProperty(ref _currentFillColor, value);
+        }
+
+        //填充颜色
+        private Brush fillColor = new SolidColorBrush(Colors.Transparent);
+        public Brush FillColor
+        {
+            get { return fillColor; }
+            set { SetProperty(ref fillColor, value); CurrentFillColor = fillColor; }
+        }
+        #endregion 填充
+
+        #region 边框
+        //边框颜色透明度
+        private double _borderOpacity = 1;
+        public double BorderOpacity
+        {
+            get { return _borderOpacity; }
+            set => SetProperty(ref _borderOpacity, value);
+        }
+
+        private Brush _borderColor = new SolidColorBrush(Colors.Transparent);
+        public Brush BorderColor
+        {
+            get { return _borderColor; }
+            set { SetProperty(ref _borderColor, value); CurrentBorderColor = _borderColor; }
+        }
+
+        //当前边框颜色
+        private Brush _currentBorderColor = new SolidColorBrush(Colors.Transparent);
+        public Brush CurrentBorderColor
+        {
+            get { return _currentBorderColor; }
+            set => SetProperty(ref _currentBorderColor, value);
+        }
+
+        private Brush _fontColor = new SolidColorBrush(Colors.Transparent);
+        public Brush FontColor
+        {
+            get { return _fontColor; }
+            set { SetProperty(ref _fontColor, value); CurrentFontColor = _fontColor; }
+            
+        }
+
+        //当前边框颜色
+        private Brush _currentFontColor = new SolidColorBrush(Colors.Transparent);
+        public Brush CurrentFontColor
+        {
+            get { return _currentFontColor; }
+            set => SetProperty(ref _currentFontColor, value);
+        }
+
+
+        #endregion
+
+        #region 多选
+
+        //多选注释:用处 - 多选注释使得下拉框为空内容,刷新最新的UI布局
+        private bool _isMultiSelected = false;
+        public bool IsMultiSelected{
+            get { return _isMultiSelected; }
+            set => SetProperty(ref _isMultiSelected, value);
+        }
+
+        #endregion
+    }
+
+}