using System;
using System.Collections.Generic;
using System.Text;

namespace QuestionSwapDoc.SwapWordModel
{
    /// <summary>
    /// 答题卡配置
    /// </summary>
    public class SwapDaTiKaConfig
    {
        /// <summary>
        /// 正确填涂
        /// </summary>
        public readonly string TianTuTrue = "▄";
        /// <summary>
        /// 错误填涂
        /// </summary>
        public readonly string TianTuFlase = "[√]  [✘]  [●]  [▲]";
        /// <summary>
        /// 填涂区域字体大小
        /// </summary>
        public readonly float TianTuFontSize = 8;//建议8-9
        /// <summary>
        /// 文档主要字体大小
        /// </summary>
        public readonly float WordFontSize = 9;//建议9-10

        /// <summary>
        /// 主标题文本（为null不显示）（如：xx市xxxx学年高一上册质量检测答题卡）
        /// </summary>
        public string ZhuBiaoTi { get; set; } = null;
        /// <summary>
        /// 副标题文本（为null不显示）（如：数学必修1试卷）
        /// </summary>
        public string FuBiaoTi { get; set; } = null;
        /// <summary>
        /// 答题卡样式
        /// </summary>
        public DaTiKaStyle DaTiKaType { get; set; } = DaTiKaStyle.机读卡;
        /// <summary>
        /// 纸张大小
        /// </summary>
        public PaperDaTiKa ZhiZhangDaXiao { get; set; } = PaperDaTiKa.A4竖向;
        /// <summary>
        /// 注意事项
        /// </summary>
        public string ZhuYiShiXian { get; set; } = "填涂时用2B铅笔将选项涂满涂黑。修改时用橡皮擦干净。请注意题号顺序。请保持答题卡整洁，不要折叠、乱作标记。";
        int ZhunKaoZhenHaoShu_ = 8;
        /// <summary>
        /// 准考证号的数量
        /// A4竖向不分栏（1-10）A3横向分三栏（1-8）A3横向分两栏（1-14）
        /// </summary>
        public int ZhunKaoZhenHaoShu
        {
            get => ZhunKaoZhenHaoShu_;
            set
            {
                if (value <= 0)
                    ZhunKaoZhenHaoShu_ = 1;
                else if (ZhiZhangDaXiao == PaperDaTiKa.A3横向 && value > 14)
                    ZhunKaoZhenHaoShu_ = 14;
                else if (ZhiZhangDaXiao == PaperDaTiKa.A4竖向 && value > 10)
                    ZhunKaoZhenHaoShu_ = 10;
                else if (ZhiZhangDaXiao == PaperDaTiKa.A3横向3 && value > 8)
                    ZhunKaoZhenHaoShu_ = 8;
                else
                    ZhunKaoZhenHaoShu_ = value;
            }
        }
        /// <summary>
        /// 是否显示题型分值（如果分值不为空的情况下）
        /// </summary>
        public bool IsFen { get; set; } = true;
        /// <summary>
        /// 是否显示缺考标记
        /// </summary>
        public bool IsQueKao { get; } = true;
        /// <summary>
        /// 是否显示违规标记
        /// </summary>
        public bool IsWeiGui { get; } = true;
        /// <summary>
        /// 是否显示二维码区域
        /// </summary>
        public bool IsErWeiMa { get; set; } = true;
        /// <summary>
        /// 是否显示条形码区域
        /// </summary>
        public bool IsTiaoXinMa { get; } = false;

    }
}
