|  | @@ -25,6 +25,9 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          //float LowPlace = 3120f;
 | 
	
		
			
				|  |  |          float NeueStartposition = 3300f;
 | 
	
		
			
				|  |  | +        private string FieldOfViewArea = "";
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          ElementSubscript subscript = new ElementSubscript();
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -146,11 +149,11 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
 | 
	
		
			
				|  |  |              setTableCellData(dev_sczs_text, str_SCZS);//视场总数
 | 
	
		
			
				|  |  |              setTableCellData(dev_flfa_text, str_FLFA);//分类方案
 | 
	
		
			
				|  |  |              setTableCellData(dev_yjctz_text, str_YJCTZ);//已检测特征
 | 
	
		
			
				|  |  | -            setTableCellData(dev_scmj_text, str_SCMJ);//视场面积
 | 
	
		
			
				|  |  | +            setTableCellData(dev_scmj_text, str_SCMJ+ "μm²");//视场面积
 | 
	
		
			
				|  |  |              setTableCellData(dev_fdbs_text, Magnification);//放大倍数
 | 
	
		
			
				|  |  |              setTableCellData(dev_bgsj_text, DateTime.Now.ToShortDateString().ToString());//报告时间:
 | 
	
		
			
				|  |  |              setTableCellData(dev_ckbz_text, TemplateClass.M_SY.str_tb_CKBZ.ToString());//参考标准
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +            FieldOfViewArea = str_SCMJ;
 | 
	
		
			
				|  |  |              #endregion
 | 
	
		
			
				|  |  |              #region 加载模板设置文档数据
 | 
	
		
			
				|  |  |              //setXRLabelData(dev_ym, TemplateClass.M_YMYJ.str_tb_ymwb.ToString());//页眉
 | 
	
	
		
			
				|  | @@ -205,7 +208,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
 | 
	
		
			
				|  |  |              dev_size_6.Text = ls_partsize_dt.Rows[0]["c6"].ToString();
 | 
	
		
			
				|  |  |              dev_size_7.Text = ls_partsize_dt.Rows[0]["c7"].ToString();
 | 
	
		
			
				|  |  |              dev_DimensionTable_2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
 | 
	
		
			
				|  |  | -            dev_DimensionTable_2.Text = dev_DimensionTable_2.Text.ToString() + TemplateClass.M_KLFXJG.str_cb_klcc_jsfs.ToString() + ", μm";
 | 
	
		
			
				|  |  | +            dev_DimensionTable_2.Text = dev_DimensionTable_2.Text.ToString() + TemplateClass.M_KLFXJG.str_cb_klcc_jsfs.ToString() + "(μm)";
 | 
	
		
			
				|  |  |              dev_DimensionTable_2.Font = new Font(Schriftart_chinese, dev_DimensionTable_2.Font.Size);
 | 
	
		
			
				|  |  |              for (int i = 0; i < surface_dt.Rows.Count; i++)
 | 
	
		
			
				|  |  |              {
 | 
	
	
		
			
				|  | @@ -574,7 +577,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
 | 
	
		
			
				|  |  |          public void setINCAtable()
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  |             
 | 
	
		
			
				|  |  | -            export_ReportTemplate.GenerateINCAtable(dev_scmj_text.Text, out DataTable dt);
 | 
	
		
			
				|  |  | +            export_ReportTemplate.GenerateINCAtable(FieldOfViewArea, out DataTable dt);
 | 
	
		
			
				|  |  |              xr_tbAreaOfInclusion.Visible = true;
 | 
	
		
			
				|  |  |              List<List<AreaOfInclusionDEVData>> list_AreaOfInclusion = new List<List<AreaOfInclusionDEVData>>();
 | 
	
		
			
				|  |  |              for (int i = 0; i < dt.Rows.Count; i++)
 | 
	
	
		
			
				|  | @@ -717,43 +720,77 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
 | 
	
		
			
				|  |  |              this.xrChart_incaSubdivision.Legend.VerticalIndent = 5;
 | 
	
		
			
				|  |  |              this.xrChart_incaSubdivision.Legend.Border.Color = Color.Red;//红色边框
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        public static Color FromHex(string hex)
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +            hex = hex.Replace("#", ""); // 移除 # 前缀  
 | 
	
		
			
				|  |  | +            byte a = 255; // 默认Alpha值为255(不透明)  
 | 
	
		
			
				|  |  | +            byte r = Convert.ToByte(hex.Substring(0, 2), 16);
 | 
	
		
			
				|  |  | +            byte g = Convert.ToByte(hex.Substring(2, 2), 16);
 | 
	
		
			
				|  |  | +            byte b = Convert.ToByte(hex.Substring(4, 2), 16);
 | 
	
		
			
				|  |  | +            return Color.FromArgb(a, r, g, b);          
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          /// <summary>
 | 
	
		
			
				|  |  |          /// 三元图
 | 
	
		
			
				|  |  |          /// </summary>
 | 
	
		
			
				|  |  |          /// <param name="TemplateClass"></param>
 | 
	
		
			
				|  |  |          public void InsertReportTemplateChart_Trianglediagram()
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  | +            this.Detail.Controls.Add(add_label("三元图"));
 | 
	
		
			
				|  |  |              List<Color> Color_list = new List<Color>();
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(238, 175, 14));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(0, 0, 238));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(0, 205, 0));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(238, 0, 0));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(153, 50, 204));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(255, 102, 153));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(160, 82, 45));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(181, 181, 181));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(250, 235, 215));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(238, 130, 238));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(174, 238, 238));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(247, 172, 189));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(202, 134, 135));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(34, 90, 31));
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(238, 175, 14));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(0, 0, 238));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(0, 205, 0));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(238, 0, 0));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(153, 50, 204));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(255, 102, 153));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(160, 82, 45));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(181, 181, 181));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(250, 235, 215));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(238, 130, 238));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(174, 238, 238));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(247, 172, 189));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(202, 134, 135));
 | 
	
		
			
				|  |  | -            Color_list.Add(Color.FromArgb(34, 90, 31));
 | 
	
		
			
				|  |  | - 
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#0f4471"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#FFD700"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#ff5722"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#5628b4"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#20BF55"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#f23557"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#118df0"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#FF00FF"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#d3327b"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#ae318a"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#993090"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#6f3071"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#7711AF"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#CF77FF"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#AE004F"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#F35872"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#FA7729"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#FFC526"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#F8E71C"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#34ADAE"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#3DDFD2"));
 | 
	
		
			
				|  |  | +            Color_list.Add(FromHex("#A0FFFF"));
 | 
	
		
			
				|  |  | +     
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(238, 175, 14));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(0, 0, 238));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(0, 205, 0));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(238, 0, 0));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(153, 50, 204));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(255, 102, 153));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(160, 82, 45));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(181, 181, 181));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(250, 235, 215));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(238, 130, 238));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(174, 238, 238));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(247, 172, 189));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(202, 134, 135));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(34, 90, 31));
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(238, 175, 14));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(0, 0, 238));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(0, 205, 0));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(238, 0, 0));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(153, 50, 204));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(255, 102, 153));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(160, 82, 45));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(181, 181, 181));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(250, 235, 215));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(238, 130, 238));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(174, 238, 238));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(247, 172, 189));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(202, 134, 135));
 | 
	
		
			
				|  |  | +            //Color_list.Add(Color.FromArgb(34, 90, 31));
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              for (int i = 0; i < TemplateClass.M_SYXT.list_lbv_syxt_mblb_index.Count; i=i+4)
 | 
	
		
			
				|  |  |              {
 | 
	
	
		
			
				|  | @@ -811,7 +848,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
 | 
	
		
			
				|  |  |              xrTable_kllb_surface.LocationF = new PointF(0, NeueStartposition + 5);
 | 
	
		
			
				|  |  |              xrTable_kllb_surface.Visible = true;
 | 
	
		
			
				|  |  |              NeueStartposition = xrTable_kllb_surface.LocationF.Y + xrTable_kllb_surface.SizeF.Height;
 | 
	
		
			
				|  |  | -            xrTableCell2.Text = "Selected particles based on:" + TemplateClass.M_KLLBXX.str_cb_kllb_sort_p1.ToString();
 | 
	
		
			
				|  |  | +            xrTableCell2.Text = "Selected particles based on:" + TemplateClass.M_KLLBXX.str_cb_kllb_sort_p1.ToString()+ "(μm)";
 | 
	
		
			
				|  |  |              DataTable dataTable = export_ReportTemplate.Get_dev_kllb_data(TemplateClass);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              for (int i = 0; i < dataTable.Rows.Count; i++)
 | 
	
	
		
			
				|  | @@ -867,7 +904,7 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
 | 
	
		
			
				|  |  |                  Template.LocationF = new PointF(0, NeueStartposition);
 | 
	
		
			
				|  |  |                  Template.Borders = DevExpress.XtraPrinting.BorderSide.All;
 | 
	
		
			
				|  |  |                  Template.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft;
 | 
	
		
			
				|  |  | -                Template.Rows[0].Font = new Font(Schriftart_chinese, 14f, FontStyle.Bold);
 | 
	
		
			
				|  |  | +                Template.Rows[0].Font = new Font(Schriftart_chinese, 14f, FontStyle.Regular);
 | 
	
		
			
				|  |  |                  Template.Rows[0].BackColor = Color.DarkGray;
 | 
	
		
			
				|  |  |                  this.Detail.Controls.Add(Template);
 | 
	
		
			
				|  |  |                  //图片
 | 
	
	
		
			
				|  | @@ -1104,8 +1141,8 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
 | 
	
		
			
				|  |  |          {
 | 
	
		
			
				|  |  |              XRPictureBox xRPicture_legend = new XRPictureBox();
 | 
	
		
			
				|  |  |           
 | 
	
		
			
				|  |  | -            xRPicture_legend.LocationF = new PointF(95f, NeueStartposition);
 | 
	
		
			
				|  |  | -            xRPicture_legend.SizeF = new SizeF(504f, 120.85f);
 | 
	
		
			
				|  |  | +            xRPicture_legend.LocationF = new PointF(400f, NeueStartposition);
 | 
	
		
			
				|  |  | +            xRPicture_legend.SizeF = new SizeF(260f, 120f);
 | 
	
		
			
				|  |  |              xRPicture_legend.Sizing = DevExpress.XtraPrinting.ImageSizeMode.ZoomImage;
 | 
	
		
			
				|  |  |              ImageSource imageSource_legend = new ImageSource(export_ReportTemplate.DrawATernaryDiagramLegend(Color_list));
 | 
	
		
			
				|  |  |              xRPicture_legend.ImageSource = imageSource_legend;
 | 
	
	
		
			
				|  | @@ -1113,6 +1150,26 @@ namespace OTSIncAReportApp._1_UI.OTSTemplateDesigner
 | 
	
		
			
				|  |  |              this.Detail.Controls.Add(xRPicture_legend);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          #endregion
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        private XRTable add_label(string str)
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +            XRTable Template = new XRTable();
 | 
	
		
			
				|  |  | +            XRTableRow Template_Rows_1 = new XRTableRow();
 | 
	
		
			
				|  |  | +            XRTableCell Template_Rows1_Cell_2 = new XRTableCell();
 | 
	
		
			
				|  |  | +            Template_Rows1_Cell_2.WidthF = 630f;
 | 
	
		
			
				|  |  | +            Template_Rows1_Cell_2.Text = str;
 | 
	
		
			
				|  |  | +            Template_Rows_1.Controls.Add(Template_Rows1_Cell_2);
 | 
	
		
			
				|  |  | +            Template.Rows.Add(Template_Rows_1);
 | 
	
		
			
				|  |  | +            Template.WidthF = 630f;
 | 
	
		
			
				|  |  | +            //Template.SizeF = new SizeF(688f, 125);
 | 
	
		
			
				|  |  | +            Template.Borders = DevExpress.XtraPrinting.BorderSide.All;
 | 
	
		
			
				|  |  | +            Template.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter;
 | 
	
		
			
				|  |  | +            Template.LocationF = new PointF(30.42f, NeueStartposition);
 | 
	
		
			
				|  |  | +            Template.BackColor = Color.DarkGray;
 | 
	
		
			
				|  |  | +            NeueStartposition = NeueStartposition + Template.SizeF.Height;
 | 
	
		
			
				|  |  | +            return Template;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          #region 颗粒列表
 | 
	
		
			
				|  |  |          private XRTable add_XRTable()
 | 
	
		
			
				|  |  |          {
 |