using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using ComPDFKitViewer.PdfViewer;
using ComPDFKitViewer;

namespace PDFSettings
{
    public class APPSettingProperties
    {
        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;

        //需要重启后删除的临时文件
        public List<string> NeedToDeletePath = new List<string>();

        //文件源路径集合
        public List<string> CustomStampFilePathLists = new List<string>();

        public List<string> SignatureFilePathLists = new List<string>();

        public string culture = System.Globalization.CultureInfo.CurrentUICulture.ToString();

        /// <summary>
        /// 0 - listView   1-GridView
        /// </summary>
        public int RecentFileListMode = 0;

        /// <summary>
        /// 删除最近文件记录时是否显示询问弹窗
        /// </summary>
        public bool DontTipBeforeDeleteRecent = false;

        /// <summary>
        /// 切换语言时 重启时需要打开的文档列表
        /// </summary>
        public List<string> NeedToOpenFileList = new List<string>();

        /// <summary>
        /// 登录密钥
        /// </summary>
        public string LoginToken = "";
    }

    public class DescriptionPropertyClass
    {
        /// <summary>
        /// app启动时打开上次未关闭的文档
        /// </summary>
        public bool OpenUnClosedFileWhenOpen = false;

        /// <summary>
        /// 文档打开时恢复上次视图设置
        /// </summary>
        public bool RecoveryViewWhenOpen = true;

        /// <summary>
        /// 最近打开中文档最多显示数量
        /// </summary>
        public int FileCountInRecentFiles = 10;

        /// <summary>
        /// 是否自动保存
        /// </summary>
        public bool AutoSave = true;

        /// <summary>
        /// 自动保存频次
        /// </summary>
        public int AutoSaveInterval = 5;

        /// <summary>
        /// 关闭文档 弹出保存提示
        /// </summary>
        public bool ShowSaveWhenClose = true;

        /// <summary>
        /// 关闭文档 无提示 直接保存
        /// </summary>
        public bool NotShowSaveWhenClose = false;

        /// <summary>
        ///打开图片文档 自动扫描并识别文本
        /// </summary>
        public bool AutoScanImageFile = true;

        /// <summary>
        /// 提示扫描并识别文本
        /// </summary>
        public bool TipScanImageFile = false;

        /// <summary>
        /// 用户名
        /// </summary>
        public string Author = Environment.UserName;
    }

    public class InitialVIewPropertyClass
    {
        /// <summary>
        /// 页面显示模式
        /// </summary>
        public ViewMode PageView = ViewMode.SingleContinuous;

        /// <summary>
        /// 缩放比例
        /// </summary>
        public FitMode ZoomMode = FitMode.FitWidth;

        /// <summary>
        /// 默认收起BOTA
        /// </summary>
        public bool NotShowBOTA = true;

        /// <summary>
        /// 记住上一次BOTA是否展开
        /// </summary>
        public bool RememberBOTA = false;

        /// <summary>
        /// 有大纲时默认显示大纲列表
        /// </summary>
        public bool ShowOutLine = false;

        /// <summary>
        ///属性面板 自动展开
        /// </summary>
        public bool AutoExpandProperty = true;

        /// <summary>
        /// 属性面板 手动展开
        /// </summary>
        public bool ClickOpenProperty = false;

        /// <summary>
        /// 阅读页背景色
        /// </summary>
        public Color BackGround = (Color)ColorConverter.ConvertFromString("#CED0D4");

        /// <summary>
        /// 全屏背景色
        /// </summary>
        public Color BackGroundInFulWindow = (Color)ColorConverter.ConvertFromString("#36383B");

        /// <summary>
        ///高亮表单
        /// </summary>
        public bool HignlightForm = true;

        /// <summary>
        /// 域高亮色
        /// </summary>
        public Color FormHighLightColor = Colors.White;

        /// <summary>
        /// 必填栏高亮色
        /// </summary>
        public Color RequiredFieldsColor = Colors.White;

        /// <summary>
        /// 高亮链接
        /// </summary>
        public bool HighlightLink = true;
    }

    public class AnnotatePropertyClass
    {
        //各类型注释默认颜色

        public Color HighLightColor = Color.FromArgb(0xFF, 0xFF, 0xC7, 0x00);
        public Color UnderLineColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);

        /// <summary>
        /// 删除线
        /// </summary>
        public Color StrikethroughColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);

        public Color FreeHandColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);

        /// <summary>
        /// 文本字体颜色
        /// </summary>
        public Color TextAnnoteColor = Colors.Black;

        /// <summary>
        /// 便签默认颜色
        /// </summary>
        /// #FFD573
        public Color NoteAnnoteColor = Color.FromArgb(0xFF, 0xFF, 0xD5, 0x73);

        public Color RectangleBorderColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);
        public Color RectangleFillColor = Colors.Transparent;
        public Color CircleBorderColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);
        public Color CircleFillColor = Colors.Transparent;
        public Color LineColor = Color.FromArgb(0xFF, 0xFC, 0x1F, 0x1F);
        public Color ArrowColor = Colors.Red;

        /// <summary>
        ///文本对齐方式
        /// </summary>
        public TextAlignment TextAlign = TextAlignment.Left;

        /// <summary>
        /// 文本注释 字体
        /// </summary>
        public string TextFontFamaily = "Helvetica";

        /// <summary>
        /// 标签Note 字体
        /// </summary>
        public string AnchoredFamaily = "Helvetica";
    }
}