APPSettingProperties.cs 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  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. //OCR文件下载链接
  49. public string OCRFile_Url = "";
  50. //OCRMD5
  51. public string OCRmodelMD5 = "";
  52. }
  53. public class DescriptionPropertyClass
  54. {
  55. /// <summary>
  56. /// app启动时打开上次未关闭的文档
  57. /// </summary>
  58. public bool OpenUnClosedFileWhenOpen = false;
  59. /// <summary>
  60. /// 文档打开时恢复上次视图设置
  61. /// </summary>
  62. public bool RecoveryViewWhenOpen = true;
  63. /// <summary>
  64. /// 最近打开中文档最多显示数量
  65. /// </summary>
  66. public int FileCountInRecentFiles = 10;
  67. /// <summary>
  68. /// 是否自动保存
  69. /// </summary>
  70. public bool AutoSave = true;
  71. /// <summary>
  72. /// 自动保存频次
  73. /// </summary>
  74. public int AutoSaveInterval = 5;
  75. /// <summary>
  76. /// 关闭文档 弹出保存提示
  77. /// </summary>
  78. public bool ShowSaveWhenClose = true;
  79. /// <summary>
  80. /// 关闭文档 无提示 直接保存
  81. /// </summary>
  82. public bool NotShowSaveWhenClose = false;
  83. /// <summary>
  84. ///打开图片文档 自动扫描并识别文本
  85. /// </summary>
  86. public bool AutoScanImageFile = true;
  87. /// <summary>
  88. /// 提示扫描并识别文本
  89. /// </summary>
  90. public bool TipScanImageFile = false;
  91. /// <summary>
  92. /// 用户名
  93. /// </summary>
  94. public string Author = Environment.UserName;
  95. }
  96. public class InitialVIewPropertyClass
  97. {
  98. /// <summary>
  99. /// 页面显示模式
  100. /// </summary>
  101. public ViewMode PageView = ViewMode.SingleContinuous;
  102. /// <summary>
  103. /// 缩放比例
  104. /// </summary>
  105. public FitMode ZoomMode = FitMode.FitWidth;
  106. /// <summary>
  107. /// 默认收起BOTA
  108. /// </summary>
  109. public bool NotShowBOTA = true;
  110. /// <summary>
  111. /// 记住上一次BOTA是否展开
  112. /// </summary>
  113. public bool RememberBOTA = false;
  114. /// <summary>
  115. /// 有大纲时默认显示大纲列表
  116. /// </summary>
  117. public bool ShowOutLine = false;
  118. /// <summary>
  119. ///属性面板 自动展开
  120. /// </summary>
  121. public bool AutoExpandProperty = true;
  122. /// <summary>
  123. /// 属性面板 手动展开
  124. /// </summary>
  125. public bool ClickOpenProperty = false;
  126. /// <summary>
  127. /// 阅读页背景色
  128. /// </summary>
  129. public Color BackGround = (Color)ColorConverter.ConvertFromString("#CED0D4");
  130. /// <summary>
  131. /// 全屏背景色
  132. /// </summary>
  133. public Color BackGroundInFulWindow = (Color)ColorConverter.ConvertFromString("#36383B");
  134. /// <summary>
  135. ///高亮表单
  136. /// </summary>
  137. public bool HignlightForm = true;
  138. /// <summary>
  139. /// 域高亮色
  140. /// </summary>
  141. public Color FormHighLightColor = Colors.White;
  142. /// <summary>
  143. /// 必填栏高亮色
  144. /// </summary>
  145. public Color RequiredFieldsColor = Colors.White;
  146. /// <summary>
  147. /// 高亮链接
  148. /// </summary>
  149. public bool HighlightLink = true;
  150. }
  151. public class AnnotatePropertyClass
  152. {
  153. //各类型注释默认颜色
  154. public Color HighLightColor = Color.FromArgb(0xFF, 0xFF, 0xC7, 0x00);
  155. public Color UnderLineColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);
  156. /// <summary>
  157. /// 删除线
  158. /// </summary>
  159. public Color StrikethroughColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);
  160. public Color FreeHandColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);
  161. /// <summary>
  162. /// 文本字体颜色
  163. /// </summary>
  164. public Color TextAnnoteColor = Colors.Black;
  165. /// <summary>
  166. /// 便签默认颜色
  167. /// </summary>
  168. /// #FFD573
  169. public Color NoteAnnoteColor = Color.FromArgb(0xFF, 0xFF, 0xD5, 0x73);
  170. public Color RectangleBorderColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);
  171. public Color RectangleFillColor = Colors.Transparent;
  172. public Color CircleBorderColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);
  173. public Color CircleFillColor = Colors.Transparent;
  174. public Color LineColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);
  175. public Color ArrowColor = Colors.Red;
  176. /// <summary>
  177. ///文本对齐方式
  178. /// </summary>
  179. public TextAlignment TextAlign = TextAlignment.Left;
  180. /// <summary>
  181. /// 文本注释 字体
  182. /// </summary>
  183. public string TextFontFamaily = "Helvetica";
  184. /// <summary>
  185. /// 标签Note 字体
  186. /// </summary>
  187. public string AnchoredFamaily = "Helvetica";
  188. }
  189. }