Просмотр исходного кода

其他-补充阅读页顶部tip显示区域

ZhouJieSheng 2 лет назад
Родитель
Сommit
ec79149a2f

+ 11 - 0
PDF Office/Model/RegionNames.cs

@@ -39,6 +39,17 @@ namespace PDF_Office.Model
             }
         }
 
+        /// <summary>
+        /// 阅读页顶部Tip 对应的Content RegionName
+        /// </summary>
+        public static string TipContentRegionName
+        {
+            get
+            {
+                return GetRegionName("TipContentRegionName");
+            }
+        }
+
         public static string ReadRegionName
         {
             get

+ 42 - 0
PDF Office/ViewModels/ViewContentViewModel.cs

@@ -66,6 +66,11 @@ namespace PDF_Office.ViewModels
 
         public string ToolsBarContentRegionName { get; set; }
 
+        /// <summary>
+        /// 顶部提示的Content
+        /// </summary>
+        public string TipContentRegionName { get; set; }
+
         public string ReadModeRegionName { get; set; }
 
         public string ConverterBarContentRegionName { get; set; }
@@ -73,6 +78,20 @@ namespace PDF_Office.ViewModels
 
         public string BackgroundContentRegionName { get; set; }
 
+        private Visibility tipVisible = Visibility.Collapsed;
+        /// <summary>
+        /// 顶部提示栏的显示状态
+        /// </summary>
+        public Visibility TipVisible
+        {
+            get { return tipVisible; }
+            set
+            {
+                SetProperty(ref tipVisible, value);
+            }
+        }
+
+
         private Visibility readModelTip = Visibility.Collapsed;
 
         public Visibility ReadModelTip
@@ -506,6 +525,8 @@ namespace PDF_Office.ViewModels
             ToolContentVisible = Visibility.Visible;
             ToolsBarContentVisible = Visibility.Visible;
             OCRContentVisible = Visibility.Visible;
+            TipVisible = Visibility.Visible;
+            TipContentRegionName = RegionNames.TipContentRegionName;
             OCRViewerRegionName = RegionNames.OCRViewerRegionName;
             ToolContentRegionName = Guid.NewGuid().ToString();
             ToolsBarContentRegionName = Guid.NewGuid().ToString();
@@ -515,6 +536,7 @@ namespace PDF_Office.ViewModels
             ToolContentVisible = Visibility.Collapsed;
             ToolsBarContentVisible = Visibility.Collapsed;
             OCRContentVisible = Visibility.Collapsed;
+            TipVisible = Visibility.Collapsed;
             regionNameByTabItem = new Dictionary<string, string>();
             barContentByTabItem = new Dictionary<string, string>();
             InitialregionNameByTabItem(ref regionNameByTabItem);
@@ -527,6 +549,23 @@ namespace PDF_Office.ViewModels
             EnterSelectedBar("TabItemAnnotation");
         }
 
+
+        /// <summary>
+        /// 设置Tip状态栏的显示状态
+        /// </summary>
+        /// <param name="show">是否显示</param>
+        public void ShowTip(bool show)
+        {
+            if (show)
+            {
+                TipVisible = Visibility.Visible;
+            }
+            else
+            {
+                TipVisible = Visibility.Collapsed;
+            }
+        }
+
         /// <summary>
         /// 右键菜单创建链接
         /// </summary>
@@ -552,6 +591,9 @@ namespace PDF_Office.ViewModels
             }
         }
 
+        /// <summary>
+        /// 在文件资源管理器中显示
+        /// </summary>
         private void ShowInFolder()
         {
             CommonHelper.ShowFileBrowser(PDFViewer.Document.FilePath);

+ 6 - 0
PDF Office/Views/ViewContent.xaml

@@ -367,6 +367,12 @@
                 VerticalScrollBarVisibility="Auto">
                 <ContentControl Height="{Binding ElementName=Scroller, Path=ViewportHeight}" prism:RegionManager.RegionName="{Binding PropertyRegionName}" />
             </ScrollViewer>
+            <!--  阅读页顶部提示栏区域  -->
+            <ContentControl
+                Grid.Column="2"
+                VerticalAlignment="Top"
+                prism:RegionManager.RegionName="{Binding TipContentRegionName}"
+                Visibility="{Binding TipVisible}" />
             <Border
                 Name="LinkAnnotTip"
                 Grid.Column="2"

+ 28 - 31
PDFSettings/APPSettingProperties.cs

@@ -15,18 +15,14 @@ namespace PDFSettings
         public DescriptionPropertyClass Description = new DescriptionPropertyClass();
         public InitialVIewPropertyClass InitialVIew = new InitialVIewPropertyClass();
         public AnnotatePropertyClass Annotate = new AnnotatePropertyClass();
-
         //自定义主题色保存
         public List<System.Windows.Media.Color> CustomColorList = new List<System.Windows.Media.Color>();
-
         //动态图章日期格式   下拉列表索引
         public int DateMode = 0;
 
         public string CustomAuthor = "PDF Reader Pro";
-
         //ToolTabControl 选中项
         public int TabSelectedIndex = 0;
-
         //是否固定
         public bool IsFixed = true;
 
@@ -35,7 +31,6 @@ namespace PDFSettings
 
         //文件源路径集合
         public List<string> CustomStampFilePathLists = new List<string>();
-
         public List<string> SignatureFilePathLists = new List<string>();
 
         public string culture = System.Globalization.CultureInfo.CurrentUICulture.ToString();
@@ -78,6 +73,7 @@ namespace PDFSettings
         /// </summary>
         public int AutoSaveInterval = 5;
 
+
         /// <summary>
         /// 关闭文档 弹出保存提示
         /// </summary>
@@ -109,89 +105,89 @@ namespace PDFSettings
         /// <summary>
         /// 页面显示模式
         /// </summary>
-        private ViewMode PageView = ViewMode.SingleContinuous;
+        public ViewMode PageView = ViewMode.SingleContinuous;
 
         /// <summary>
         /// 缩放比例
         /// </summary>
-        private FitMode ZoomMode = FitMode.FitWidth;
+        public FitMode ZoomMode = FitMode.FitWidth;
 
         /// <summary>
         /// 默认收起BOTA
         /// </summary>
-        private bool NotShowBOTA = true;
+        public bool NotShowBOTA = true;
 
         /// <summary>
         /// 记住上一次BOTA是否展开
         /// </summary>
-        private bool RememberBOTA = false;
+        public bool RememberBOTA = false;
 
         /// <summary>
         /// 记录本次BOTA的展开状态
         /// </summary>
-        private bool IsBOTAOpen = false;
+        public bool IsBOTAOpen = false;
 
         /// <summary>
         /// 有大纲时默认显示大纲列表
         /// </summary>
-        private bool ShowOutLine = true;
+        public bool ShowOutLine = true;
 
         /// <summary>
         ///属性面板 自动展开
         /// </summary>
-        private bool AutoExpandProperty = true;
+        public bool AutoExpandProperty = true;
 
         /// <summary>
         /// 属性面板 手动展开
         /// </summary>
-        private bool ClickOpenProperty = true;
+        public bool ClickOpenProperty = true;
 
         /// <summary>
         /// 阅读页背景色
         /// </summary>
-        private Color BackGround = Color.White;
+        public Color BackGround = Color.White;
 
         /// <summary>
         /// 全屏背景色
         /// </summary>
-        private Color BackGroundInFulWindow = Color.White;
+        public Color BackGroundInFulWindow = Color.White;
 
         /// <summary>
         ///高亮表单
         /// </summary>
-        private bool HignlightForm = true;
+        public bool HignlightForm = true;
 
         /// <summary>
         /// 域高亮色
         /// </summary>
-        private Color FormHighLightColor = Color.White;
+        public Color FormHighLightColor = Color.White;
 
         /// <summary>
         /// 必填栏高亮色
         /// </summary>
-        private Color RequiredFieldsColor = Color.White;
+        public Color RequiredFieldsColor = Color.White;
 
         /// <summary>
         /// 高亮链接
         /// </summary>
-        private bool HighlightLink = true;
+        public bool HighlightLink = true; 
     }
 
     public class AnnotatePropertyClass
     {
         //各类型注释默认颜色
 
-        private Color HighLightColor = Color.White;
-        private Color UnderLineColor = Color.White;
-        private Color StrikethroughColor = Color.White;
-        private Color FreeHandColor = Color.White;
-        private Color TextAnnoteColor = Color.White;
-        private Color NoteAnnoteColor = Color.White;
-        private Color RectangleBorderColor = Color.White;
-        private Color RectangleFillColor = Color.White;
-        private Color CircleBorderColor = Color.White;
-        private Color CircleFillColor = Color.White;
-        private Color LineColor = Color.White;
+        public Color HighLightColor = Color.White;
+        public Color UnderLineColor = Color.White;
+        public Color StrikethroughColor = Color.White;
+        public Color FreeHandColor = Color.White;
+        public Color TextAnnoteColor = Color.White;
+        public Color NoteAnnoteColor = Color.White;
+        public Color RectangleBorderColor = Color.White;
+        public Color RectangleFillColor = Color.White;
+        public Color CircleBorderColor = Color.White;
+        public Color CircleFillColor = Color.White;
+        public Color LineColor = Color.White;
 
         /// <summary>
         ///文本对齐方式
@@ -208,4 +204,5 @@ namespace PDFSettings
         /// </summary>
         public string AnchoredFamaily = "Helvetica";
     }
-}
+
+}