示例#1
0
        public void Add(string[] value, Report report)
        {
            textPropertyArray = value;

            this.font = ConvertUtil.GetFont(value[0], value[1], value[2], value[3], value[4], value[5], report);

            //this.brush = ConvertUtil.getBrush(value[6], value[7]);
            //前景色默认为空,则取黑色 , 背景色为空,则取白色
            this.foreBrush = ConvertUtil.GetBrush(string.IsNullOrEmpty(value[6]) ? "" : value[6]);

            if (Color.White.ToArgb() == ((SolidBrush)foreBrush).Color.ToArgb())
            {
                foreBrush = Brushes.Black;
            }

            this.backgroupBrush = ConvertUtil.GetBrush(string.IsNullOrEmpty(value[7]) ? "" : value[7]);

            //字位置

            this.valign = ConvertUtil.GetStringFormat(value[8], value[9]);

            //上下左右边框
            this.boundaryLine.UpperBoundaryLine  = value[10].Trim().Equals("1") || value[10].Trim().Equals(string.Empty);
            this.boundaryLine.LowerBoundaryLine  = value[11].Trim().Equals("1") || value[11].Trim().Equals(string.Empty);
            this.boundaryLine.LeftBoundaryLine   = value[12].Trim().Equals("1") || value[12].Trim().Equals(string.Empty);
            this.boundaryLine.RightBooundaryLine = value[13].Trim().Equals("1") || value[13].Trim().Equals(string.Empty);


            //折行
            this.autoWrap = (value[14].Trim() == "1");

            //打印相关设置:无数据不打印以及固定不打印
            this.printStyle.NoDataNoPrint = (value[15].Equals("1"));
            this.printStyle.NoPrint       = (value[16].Equals("1"));

            //自动宽度
            this.isAdjustWeith = (value[17].Equals(string.Empty) || value[17].Equals("1"));

            //特殊线
            this.diagonal = (value[18].Equals(string.Empty) ? this.diagonal : Convert.ToInt32(value[18]));
            switch (diagonal)
            {
            case 1:
                this.boundaryLine.IsSlash = true;
                break;

            case 2:
                this.boundaryLine.IsBackSlash = true;
                break;

            case 3:
                this.boundaryLine.IsCrossLine = true;
                break;

            default:
                this.boundaryLine.IsSlash     = false;
                this.boundaryLine.IsBackSlash = false;
                this.boundaryLine.IsCrossLine = false;
                break;
            }
            this.excursion     = value[19].Trim().Equals(string.Empty) ? 0 : int.Parse(value[19]);
            this.nameZh_cn     = value[20];
            this.dynamicColumn = value[21].Equals("1");
        }