APPSettingProperties.cs 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Media;
  8. using ComPDFKitViewer.PdfViewer;
  9. using ComPDFKitViewer;
  10. namespace PDFSettings
  11. {
  12. public class APPSettingProperties
  13. {
  14. public DescriptionPropertyClass Description = new DescriptionPropertyClass();
  15. public InitialVIewPropertyClass InitialVIew = new InitialVIewPropertyClass();
  16. public AnnotatePropertyClass Annotate = new AnnotatePropertyClass();
  17. //自定义主题色保存
  18. public List<System.Windows.Media.Color> CustomColorList = new List<System.Windows.Media.Color>();
  19. //动态图章日期格式 下拉列表索引
  20. public int DateMode = 0;
  21. public string CustomAuthor = "PDF Reader Pro";
  22. //ToolTabControl 选中项
  23. public int TabSelectedIndex = 0;
  24. //是否固定
  25. public bool IsFixed = true;
  26. //需要重启后删除的临时文件
  27. public List<string> NeedToDeletePath = new List<string>();
  28. //文件源路径集合
  29. public List<string> CustomStampFilePathLists = new List<string>();
  30. public List<string> SignatureFilePathLists = new List<string>();
  31. public string culture = System.Globalization.CultureInfo.CurrentUICulture.ToString();
  32. /// <summary>
  33. /// 0 - listView 1-GridView
  34. /// </summary>
  35. public int RecentFileListMode = 0;
  36. /// <summary>
  37. /// 删除最近文件记录时是否显示询问弹窗
  38. /// </summary>
  39. public bool DontTipBeforeDeleteRecent = false;
  40. /// <summary>
  41. /// 切换语言时 重启时需要打开的文档列表
  42. /// </summary>
  43. public List<string> NeedToOpenFileList = new List<string>();
  44. /// <summary>
  45. /// 登录密钥
  46. /// </summary>
  47. public string LoginToken = "";
  48. }
  49. public class DescriptionPropertyClass
  50. {
  51. /// <summary>
  52. /// app启动时打开上次未关闭的文档
  53. /// </summary>
  54. public bool OpenUnClosedFileWhenOpen = false;
  55. /// <summary>
  56. /// 文档打开时恢复上次视图设置
  57. /// </summary>
  58. public bool RecoveryViewWhenOpen = true;
  59. /// <summary>
  60. /// 最近打开中文档最多显示数量
  61. /// </summary>
  62. public int FileCountInRecentFiles = 10;
  63. /// <summary>
  64. /// 是否自动保存
  65. /// </summary>
  66. public bool AutoSave = true;
  67. /// <summary>
  68. /// 自动保存频次
  69. /// </summary>
  70. public int AutoSaveInterval = 5;
  71. /// <summary>
  72. /// 关闭文档 弹出保存提示
  73. /// </summary>
  74. public bool ShowSaveWhenClose = true;
  75. /// <summary>
  76. /// 关闭文档 无提示 直接保存
  77. /// </summary>
  78. public bool NotShowSaveWhenClose = false;
  79. /// <summary>
  80. ///打开图片文档 自动扫描并识别文本
  81. /// </summary>
  82. public bool AutoScanImageFile = true;
  83. /// <summary>
  84. /// 提示扫描并识别文本
  85. /// </summary>
  86. public bool TipScanImageFile = false;
  87. /// <summary>
  88. /// 用户名
  89. /// </summary>
  90. public string Author = Environment.UserName;
  91. }
  92. public class InitialVIewPropertyClass
  93. {
  94. /// <summary>
  95. /// 页面显示模式
  96. /// </summary>
  97. public ViewMode PageView = ViewMode.SingleContinuous;
  98. /// <summary>
  99. /// 缩放比例
  100. /// </summary>
  101. public FitMode ZoomMode = FitMode.FitWidth;
  102. /// <summary>
  103. /// 默认收起BOTA
  104. /// </summary>
  105. public bool NotShowBOTA = true;
  106. /// <summary>
  107. /// 记住上一次BOTA是否展开
  108. /// </summary>
  109. public bool RememberBOTA = false;
  110. /// <summary>
  111. /// 有大纲时默认显示大纲列表
  112. /// </summary>
  113. public bool ShowOutLine = false;
  114. /// <summary>
  115. ///属性面板 自动展开
  116. /// </summary>
  117. public bool AutoExpandProperty = true;
  118. /// <summary>
  119. /// 属性面板 手动展开
  120. /// </summary>
  121. public bool ClickOpenProperty = false;
  122. /// <summary>
  123. /// 阅读页背景色
  124. /// </summary>
  125. public Color BackGround = (Color)ColorConverter.ConvertFromString("#CED0D4");
  126. /// <summary>
  127. /// 全屏背景色
  128. /// </summary>
  129. public Color BackGroundInFulWindow = (Color)ColorConverter.ConvertFromString("#36383B");
  130. /// <summary>
  131. ///高亮表单
  132. /// </summary>
  133. public bool HignlightForm = true;
  134. /// <summary>
  135. /// 域高亮色
  136. /// </summary>
  137. public Color FormHighLightColor = Colors.White;
  138. /// <summary>
  139. /// 必填栏高亮色
  140. /// </summary>
  141. public Color RequiredFieldsColor = Colors.White;
  142. /// <summary>
  143. /// 高亮链接
  144. /// </summary>
  145. public bool HighlightLink = true;
  146. }
  147. public class AnnotatePropertyClass
  148. {
  149. //各类型注释默认颜色
  150. public Color HighLightColor = Color.FromArgb(0xFF, 0xFF, 0xC7, 0x00);
  151. public Color UnderLineColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);
  152. public Color StrikethroughColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);
  153. public Color FreeHandColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);
  154. public Color TextAnnoteColor = Colors.Black;
  155. public Color NoteAnnoteColor = Color.FromArgb(0xFF, 0x25, 0x26, 0x29);
  156. public Color RectangleBorderColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);
  157. public Color RectangleFillColor = Colors.White;
  158. public Color CircleBorderColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);
  159. public Color CircleFillColor = Colors.White;
  160. public Color LineColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);
  161. /// <summary>
  162. ///文本对齐方式
  163. /// </summary>
  164. public TextAlignment TextAlign = TextAlignment.Left;
  165. /// <summary>
  166. /// 文本注释 字体
  167. /// </summary>
  168. public string TextFontFamaily = "Helvetica";
  169. /// <summary>
  170. /// 标签Note 字体
  171. /// </summary>
  172. public string AnchoredFamaily = "Helvetica";
  173. }
  174. }