浏览代码

补充 OtherSelection

cxs 1 年之前
父节点
当前提交
6fd5ca2568

+ 12 - 11
Bin/x64/Debug/Config/ReportTemplate/ReportTemplateConfig.xml

@@ -1,10 +1,9 @@
 <XmlConfig>
   <M_SY>
-    <str_tb_ZBT>Cleanness Report</str_tb_ZBT>
-    <str_tb_FBT>宁德时代</str_tb_FBT>
+    <str_tb_ZBT>OTS Report</str_tb_ZBT>
+    <str_tb_FBT>XX有限公司</str_tb_FBT>
     <str_tb_YPBH>0001</str_tb_YPBH>
-    <str_tb_CKBZ>
-    </str_tb_CKBZ>
+    <str_tb_CKBZ>GB30834</str_tb_CKBZ>
     <b_ck_ypsm>True</b_ck_ypsm>
     <b_ck_jggk>True</b_ck_jggk>
     <str_bz>
@@ -34,7 +33,7 @@
     <b_ck_klcc_xfl>False</b_ck_klcc_xfl>
   </M_KLFXJG>
   <M_YSFXJG>
-    <b_ck_ysfx_xsmk>False</b_ck_ysfx_xsmk>
+    <b_ck_ysfx_xsmk>True</b_ck_ysfx_xsmk>
     <index_cb_yxfx_jsfs>0</index_cb_yxfx_jsfs>
     <index_cb_ysfx_klfw>0</index_cb_ysfx_klfw>
     <str_tb_ysfx_xsys>Al,Si,C,S,N,O,Fe,Ti,Mn,Mg,Ca,Ce,La</str_tb_ysfx_xsys>
@@ -63,7 +62,7 @@
     </list_str_tb_yscf_ysxx>
   </M_YSFXJG>
   <M_SYXT>
-    <b_ck_syxt_xsmk>False</b_ck_syxt_xsmk>
+    <b_ck_syxt_xsmk>True</b_ck_syxt_xsmk>
     <index_cb_syxt_jsfs>0</index_cb_syxt_jsfs>
     <index_cb_syxt_klfw>0</index_cb_syxt_klfw>
     <str_cb_syxt_mhxssl>2</str_cb_syxt_mhxssl>
@@ -112,11 +111,13 @@
     <b_ck_kllb_fjzt>True</b_ck_kllb_fjzt>
     <list_str_kllb_qcys>
       <YS0>C</YS0>
+      <YS1>Fe</YS1>
     </list_str_kllb_qcys>
-    <str_kllb_qcys>C</str_kllb_qcys>
-    <str_kllb_DeleteClass>misc</str_kllb_DeleteClass>
+    <str_kllb_qcys>C,Fe</str_kllb_qcys>
+    <str_kllb_DeleteClass>FeO,SiC</str_kllb_DeleteClass>
     <list_str_kllb_DeleteClass>
-      <YS0>misc</YS0>
+      <YS0>FeO</YS0>
+      <YS1>SiC</YS1>
     </list_str_kllb_DeleteClass>
     <list_int_kllb_number>20</list_int_kllb_number>
   </M_KLLBXX>
@@ -124,7 +125,7 @@
     <Path>./Config/ReportTemplate/ReportTemplateConfig.xml</Path>
   </M_address>
   <M_JZWZB>
-    <b_ck_surface>False</b_ck_surface>
-    <b_ck_chart>False</b_ck_chart>
+    <b_ck_surface>True</b_ck_surface>
+    <b_ck_chart>True</b_ck_chart>
   </M_JZWZB>
 </XmlConfig>

+ 26 - 2
Bin/x64/Debug/Config/SysData/OTSStage.stg

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<XMLData Modify="true" PathName=".\Config\SysData\OTSStage.stg" WorkingStageId="0">
+<XMLData Modify="true" PathName=".\Config\SysData\OTSStage.stg" WorkingStageId="3">
   <Collection RegName="Stagelist">
     <Member strName="圆形九圆孔50mm">
       <Member RegName="boundary" PolygonPoint="" rectDomian="0,0,50000,0" shape="0:ROUND" />
@@ -54,7 +54,7 @@
         <Member HoleName="7" rectDomian="-23000,0,15000,0" shape="0" />
       </Collection>
     </Member>
-    <Member strName="Apero12_90">
+    <Member strName="Apero90mm">
       <Member RegName="boundary" PolygonPoint="" rectDomian="0,0,90000,90000" shape="1:RECTANGLE" />
       <Member RegName="std" PolygonPoint="" rectDomian="6300,0,2,0" shape="0:ROUND" />
       <Collection RegName="Holes">
@@ -78,5 +78,29 @@
         <Member HoleName="18" rectDomian="-14500,-24500,12000,0" shape="0" />
       </Collection>
     </Member>
+    <Member strName="Apero">
+      <Member RegName="boundary" PolygonPoint="" rectDomian="0,0,130000,120000" shape="1:RECTANGLE" />
+      <Member RegName="std" PolygonPoint="" rectDomian="6300,0,2,0" shape="0:ROUND" />
+      <Collection RegName="Holes">
+        <Member HoleName="9" rectDomian="0,0,10000,0" shape="0" />
+        <Member HoleName="2" rectDomian="0,25000,10000,0" shape="0" />
+        <Member HoleName="3" rectDomian="-15000,25000,10000,0" shape="0" />
+        <Member HoleName="1" rectDomian="15000,25500,10000,0" shape="0" />
+        <Member HoleName="4" rectDomian="22000,13000,10000,0" shape="0" />
+        <Member HoleName="5" rectDomian="7000,13000,10000,0" shape="0" />
+        <Member HoleName="6" rectDomian="-7500,13000,10000,0" shape="0" />
+        <Member HoleName="7" rectDomian="-22500,13000,10000,0" shape="0" />
+        <Member HoleName="8" rectDomian="14000,0,10000,0" shape="0" />
+        <Member HoleName="10" rectDomian="-15000,0,10000,0" shape="0" />
+        <Member HoleName="11" rectDomian="-30000,0,10000,0" shape="0" />
+        <Member HoleName="12" rectDomian="22000,-12500,10000,0" shape="0" />
+        <Member HoleName="13" rectDomian="7000,-12500,10000,0" shape="0" />
+        <Member HoleName="14" rectDomian="-7500,-12500,10000,0" shape="0" />
+        <Member HoleName="15" rectDomian="-22500,-12500,10000,0" shape="0" />
+        <Member HoleName="16" rectDomian="14500,-24500,10000,0" shape="0" />
+        <Member HoleName="17" rectDomian="-500,-24500,10000,0" shape="0" />
+        <Member HoleName="18" rectDomian="-14500,-24500,10000,0" shape="0" />
+      </Collection>
+    </Member>
   </Collection>
 </XMLData>

+ 281 - 0
OTSIncAMeasureApp/7-OTSProgMgrInfo/OtherSelection.Designer.cs

@@ -0,0 +1,281 @@
+
+namespace OTSMeasureApp._7_OTSProgMgrInfo
+{
+    partial class OtherSelectionForm
+    {
+        /// <summary>
+        /// Required designer variable.
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary>
+        /// Clean up any resources being used.
+        /// </summary>
+        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region Windows Form Designer generated code
+
+        /// <summary>
+        /// Required method for Designer support - do not modify
+        /// the contents of this method with the code editor.
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.cB_Dmax = new System.Windows.Forms.CheckBox();
+            this.tB_Dmax_min = new System.Windows.Forms.TextBox();
+            this.tB_Dmax_max = new System.Windows.Forms.TextBox();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label1 = new System.Windows.Forms.Label();
+            this.tB_Dmin_max = new System.Windows.Forms.TextBox();
+            this.tB_Dmin_min = new System.Windows.Forms.TextBox();
+            this.cB_Dmin = new System.Windows.Forms.CheckBox();
+            this.label2 = new System.Windows.Forms.Label();
+            this.tB_Aspect_max = new System.Windows.Forms.TextBox();
+            this.tB_Aspect_min = new System.Windows.Forms.TextBox();
+            this.cB_Aspect = new System.Windows.Forms.CheckBox();
+            this.label4 = new System.Windows.Forms.Label();
+            this.tB_orientation_max = new System.Windows.Forms.TextBox();
+            this.tB_orientation_min = new System.Windows.Forms.TextBox();
+            this.cB_orientation = new System.Windows.Forms.CheckBox();
+            this.panel1 = new System.Windows.Forms.Panel();
+            this.btn_ok = new System.Windows.Forms.Button();
+            this.btn_cancel = new System.Windows.Forms.Button();
+            this.panel1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // cB_Dmax
+            // 
+            this.cB_Dmax.AutoSize = true;
+            this.cB_Dmax.Location = new System.Drawing.Point(19, 19);
+            this.cB_Dmax.Name = "cB_Dmax";
+            this.cB_Dmax.Size = new System.Drawing.Size(48, 16);
+            this.cB_Dmax.TabIndex = 0;
+            this.cB_Dmax.Text = "Dmax";
+            this.cB_Dmax.UseVisualStyleBackColor = true;
+            // 
+            // tB_Dmax_min
+            // 
+            this.tB_Dmax_min.Location = new System.Drawing.Point(121, 17);
+            this.tB_Dmax_min.Name = "tB_Dmax_min";
+            this.tB_Dmax_min.Size = new System.Drawing.Size(72, 21);
+            this.tB_Dmax_min.TabIndex = 3;
+            this.tB_Dmax_min.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // tB_Dmax_max
+            // 
+            this.tB_Dmax_max.Location = new System.Drawing.Point(236, 17);
+            this.tB_Dmax_max.Name = "tB_Dmax_max";
+            this.tB_Dmax_max.Size = new System.Drawing.Size(72, 21);
+            this.tB_Dmax_max.TabIndex = 4;
+            this.tB_Dmax_max.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(210, 26);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(11, 12);
+            this.label3.TabIndex = 5;
+            this.label3.Text = "~";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(210, 65);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(11, 12);
+            this.label1.TabIndex = 9;
+            this.label1.Text = "~";
+            // 
+            // tB_Dmin_max
+            // 
+            this.tB_Dmin_max.Location = new System.Drawing.Point(236, 56);
+            this.tB_Dmin_max.Name = "tB_Dmin_max";
+            this.tB_Dmin_max.Size = new System.Drawing.Size(72, 21);
+            this.tB_Dmin_max.TabIndex = 8;
+            this.tB_Dmin_max.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // tB_Dmin_min
+            // 
+            this.tB_Dmin_min.Location = new System.Drawing.Point(121, 56);
+            this.tB_Dmin_min.Name = "tB_Dmin_min";
+            this.tB_Dmin_min.Size = new System.Drawing.Size(72, 21);
+            this.tB_Dmin_min.TabIndex = 7;
+            this.tB_Dmin_min.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // cB_Dmin
+            // 
+            this.cB_Dmin.AutoSize = true;
+            this.cB_Dmin.Location = new System.Drawing.Point(19, 58);
+            this.cB_Dmin.Name = "cB_Dmin";
+            this.cB_Dmin.Size = new System.Drawing.Size(48, 16);
+            this.cB_Dmin.TabIndex = 6;
+            this.cB_Dmin.Text = "Dmin";
+            this.cB_Dmin.UseVisualStyleBackColor = true;
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(210, 105);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(11, 12);
+            this.label2.TabIndex = 13;
+            this.label2.Text = "~";
+            // 
+            // tB_Aspect_max
+            // 
+            this.tB_Aspect_max.Location = new System.Drawing.Point(236, 96);
+            this.tB_Aspect_max.Name = "tB_Aspect_max";
+            this.tB_Aspect_max.Size = new System.Drawing.Size(72, 21);
+            this.tB_Aspect_max.TabIndex = 12;
+            this.tB_Aspect_max.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // tB_Aspect_min
+            // 
+            this.tB_Aspect_min.Location = new System.Drawing.Point(121, 96);
+            this.tB_Aspect_min.Name = "tB_Aspect_min";
+            this.tB_Aspect_min.Size = new System.Drawing.Size(72, 21);
+            this.tB_Aspect_min.TabIndex = 11;
+            this.tB_Aspect_min.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // cB_Aspect
+            // 
+            this.cB_Aspect.AutoSize = true;
+            this.cB_Aspect.Location = new System.Drawing.Point(19, 98);
+            this.cB_Aspect.Name = "cB_Aspect";
+            this.cB_Aspect.Size = new System.Drawing.Size(60, 16);
+            this.cB_Aspect.TabIndex = 10;
+            this.cB_Aspect.Text = "Aspect";
+            this.cB_Aspect.UseVisualStyleBackColor = true;
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(210, 144);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(11, 12);
+            this.label4.TabIndex = 17;
+            this.label4.Text = "~";
+            // 
+            // tB_orientation_max
+            // 
+            this.tB_orientation_max.Location = new System.Drawing.Point(236, 135);
+            this.tB_orientation_max.Name = "tB_orientation_max";
+            this.tB_orientation_max.Size = new System.Drawing.Size(72, 21);
+            this.tB_orientation_max.TabIndex = 16;
+            this.tB_orientation_max.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // tB_orientation_min
+            // 
+            this.tB_orientation_min.Location = new System.Drawing.Point(121, 135);
+            this.tB_orientation_min.Name = "tB_orientation_min";
+            this.tB_orientation_min.Size = new System.Drawing.Size(72, 21);
+            this.tB_orientation_min.TabIndex = 15;
+            this.tB_orientation_min.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // cB_orientation
+            // 
+            this.cB_orientation.AutoSize = true;
+            this.cB_orientation.Location = new System.Drawing.Point(19, 137);
+            this.cB_orientation.Name = "cB_orientation";
+            this.cB_orientation.Size = new System.Drawing.Size(90, 16);
+            this.cB_orientation.TabIndex = 14;
+            this.cB_orientation.Text = "Orientation";
+            this.cB_orientation.UseVisualStyleBackColor = true;
+            // 
+            // panel1
+            // 
+            this.panel1.Controls.Add(this.cB_Dmax);
+            this.panel1.Controls.Add(this.label4);
+            this.panel1.Controls.Add(this.tB_Dmax_min);
+            this.panel1.Controls.Add(this.tB_orientation_max);
+            this.panel1.Controls.Add(this.tB_Dmax_max);
+            this.panel1.Controls.Add(this.tB_orientation_min);
+            this.panel1.Controls.Add(this.label3);
+            this.panel1.Controls.Add(this.cB_orientation);
+            this.panel1.Controls.Add(this.cB_Dmin);
+            this.panel1.Controls.Add(this.label2);
+            this.panel1.Controls.Add(this.tB_Dmin_min);
+            this.panel1.Controls.Add(this.tB_Aspect_max);
+            this.panel1.Controls.Add(this.tB_Dmin_max);
+            this.panel1.Controls.Add(this.tB_Aspect_min);
+            this.panel1.Controls.Add(this.label1);
+            this.panel1.Controls.Add(this.cB_Aspect);
+            this.panel1.Location = new System.Drawing.Point(12, 12);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(324, 184);
+            this.panel1.TabIndex = 18;
+            // 
+            // btn_ok
+            // 
+            this.btn_ok.Location = new System.Drawing.Point(180, 202);
+            this.btn_ok.Name = "btn_ok";
+            this.btn_ok.Size = new System.Drawing.Size(75, 23);
+            this.btn_ok.TabIndex = 19;
+            this.btn_ok.Text = "OK";
+            this.btn_ok.UseVisualStyleBackColor = true;
+            this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
+            // 
+            // btn_cancel
+            // 
+            this.btn_cancel.Location = new System.Drawing.Point(261, 202);
+            this.btn_cancel.Name = "btn_cancel";
+            this.btn_cancel.Size = new System.Drawing.Size(75, 23);
+            this.btn_cancel.TabIndex = 20;
+            this.btn_cancel.Text = "Cancel";
+            this.btn_cancel.UseVisualStyleBackColor = true;
+            this.btn_cancel.Click += new System.EventHandler(this.btn_cancel_Click);
+            // 
+            // OtherSelectionForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
+            this.ClientSize = new System.Drawing.Size(351, 233);
+            this.Controls.Add(this.btn_cancel);
+            this.Controls.Add(this.btn_ok);
+            this.Controls.Add(this.panel1);
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "OtherSelectionForm";
+            this.ShowIcon = false;
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+            this.Text = "OtherSelection";
+            this.Load += new System.EventHandler(this.OtherSelection_Load);
+            this.panel1.ResumeLayout(false);
+            this.panel1.PerformLayout();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.CheckBox cB_Dmax;
+        private System.Windows.Forms.TextBox tB_Dmax_min;
+        private System.Windows.Forms.TextBox tB_Dmax_max;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.TextBox tB_Dmin_max;
+        private System.Windows.Forms.TextBox tB_Dmin_min;
+        private System.Windows.Forms.CheckBox cB_Dmin;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.TextBox tB_Aspect_max;
+        private System.Windows.Forms.TextBox tB_Aspect_min;
+        private System.Windows.Forms.CheckBox cB_Aspect;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.TextBox tB_orientation_max;
+        private System.Windows.Forms.TextBox tB_orientation_min;
+        private System.Windows.Forms.CheckBox cB_orientation;
+        private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.Button btn_ok;
+        private System.Windows.Forms.Button btn_cancel;
+    }
+}

+ 167 - 0
OTSIncAMeasureApp/7-OTSProgMgrInfo/OtherSelection.cs

@@ -0,0 +1,167 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace OTSMeasureApp._7_OTSProgMgrInfo
+{
+    public partial class OtherSelectionForm : Form
+    {
+        string _OtherSelection = "";
+        public string OtherSelection
+        {
+            set
+            {
+                _OtherSelection = value;
+            }
+            get
+            {
+                return _OtherSelection;
+            }
+        }
+        public OtherSelectionForm()
+        {
+            InitializeComponent();
+        }
+
+        private void OtherSelection_Load(object sender, EventArgs e)
+        {
+            Init();
+        }
+
+        private void btn_ok_Click(object sender, EventArgs e)
+        {
+            if(!CheckAndSaveParams())
+            {
+                MessageBox.Show("Please check params!");
+                return;
+            }
+            this.DialogResult = DialogResult.OK;
+        }
+        void Init()
+        {
+            string[] strit = _OtherSelection.Split(',');
+            foreach( string str in strit)
+            {
+                string[] stit = str.Split(':');
+                switch(stit[0])
+                {
+                    case "dmax":
+                        cB_Dmax.Checked = true;
+                        string[] sit = stit[1].Split('-');
+                        tB_Dmax_min.Text = sit[0];
+                        tB_Dmax_max.Text = sit[1];
+                        break;
+                    case "dmin":
+                        cB_Dmin.Checked = true;
+                        string[] sit1 = stit[1].Split('-');
+                        tB_Dmin_min.Text = sit1[0];
+                        tB_Dmin_max.Text = sit1[1];
+                        break;
+                    case "aspect":
+                        cB_Aspect.Checked = true;
+                        string[] sit2 = stit[1].Split('-');
+                        tB_Aspect_min.Text = sit2[0];
+                        tB_Aspect_max.Text = sit2[1];
+                        break;
+                    case "orientation":
+                        cB_orientation.Checked = true;
+                        string[] sit3 = stit[1].Split('-');
+                        tB_orientation_min.Text = sit3[0];
+                        tB_orientation_max.Text = sit3[1];
+                        break;
+                    default:
+                        break;
+                }
+            }
+        }
+        bool CheckAndSaveParams()
+        {
+            _OtherSelection = "";
+            double dia;
+            if (cB_Dmax.Checked)
+            {
+                if (!double.TryParse(tB_Dmax_min.Text, out dia))
+                {
+                    return false;
+                }
+                _OtherSelection += "dmax:" + dia.ToString() + "-";
+                if (!double.TryParse(tB_Dmax_max.Text, out dia))
+                {
+                    return false;
+                }
+                if(double.Parse(tB_Dmax_min.Text)>=dia)
+                {
+                    return false;
+                }
+                _OtherSelection += dia.ToString() + ",";
+            }
+            if (cB_Dmin.Checked)
+            {
+                if (!double.TryParse(tB_Dmin_min.Text, out dia))
+                {
+                    return false;
+                }
+                _OtherSelection += "dmin:" + dia.ToString() + "-";
+                if (!double.TryParse(tB_Dmin_max.Text, out dia))
+                {
+                    return false;
+                }
+                if (double.Parse(tB_Dmin_min.Text) >= dia)
+                {
+                    return false;
+                }
+                _OtherSelection += dia.ToString() + ",";
+            }
+            if (cB_Aspect.Checked)
+            {
+                if (!double.TryParse(tB_Aspect_min.Text, out dia))
+                {
+                    return false;
+                }
+                _OtherSelection += "aspect:" + dia.ToString() + "-";
+                if (!double.TryParse(tB_Aspect_max.Text, out dia))
+                {
+                    return false;
+                }
+                if (double.Parse(tB_Aspect_min.Text) >= dia)
+                {
+                    return false;
+                }
+                _OtherSelection += dia.ToString() + ",";
+            }
+            if (cB_orientation.Checked)
+            {
+                if (!double.TryParse(tB_orientation_min.Text, out dia))
+                {
+                    return false;
+                }
+                _OtherSelection += "orientation:" + dia.ToString() + "-";
+                if (!double.TryParse(tB_orientation_max.Text, out dia))
+                {
+                    return false;
+                }
+                if (double.Parse(tB_orientation_min.Text) >= dia)
+                {
+                    return false;
+                }
+                _OtherSelection += dia.ToString() +",";
+            }
+            if(_OtherSelection!="")
+            {
+                _OtherSelection=_OtherSelection.Substring(0, _OtherSelection.Length - 1);
+            }
+            return true;
+        }
+
+        private void btn_cancel_Click(object sender, EventArgs e)
+        {
+            this.DialogResult = DialogResult.Cancel;
+        }
+    }
+}

+ 120 - 0
OTSIncAMeasureApp/7-OTSProgMgrInfo/OtherSelection.resx

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 55 - 57
OTSIncAReportApp/1-UI/Control_Grids/ParticlesGridDevidePage/ParticlesGridDevidePage.cs

@@ -1897,7 +1897,11 @@ namespace OTSIncAReportGrids
                     cell.SetCellValue(dgV_ParticlesDevidePage.Columns[i_cell].HeaderText);
                 }
 
-
+                IDrawing patriarch;
+                IClientAnchor anchor;
+                int pictureIdx;
+                Bitmap bp;
+                byte[] bytes;
                 //插入表内容
                 for (int i_row = 0; i_row < dgV_ParticlesDevidePage.Rows.Count; i_row++)
                 {
@@ -1913,88 +1917,82 @@ namespace OTSIncAReportGrids
 
                         if (i_cell == 2)
                         {
-                            //颗粒图像列
-                            Bitmap bp = (Bitmap)dgV_ParticlesDevidePage.Rows[i_row].Cells[2].Value;
-
-                            byte[] bytes = ImageConvertToBytes(bp);
+                            if (sfd.Picture)
+                            {
+                                //颗粒图像列
+                                bp = (Bitmap)dgV_ParticlesDevidePage.Rows[i_row].Cells[2].Value;
 
-                            //第二步,将图片添加到workbook中,指定图片的格式,返回图片所在workbook->paicture数组中的索引的地址,从1开始
-                            int pictureIdx = workbook.AddPicture(bytes, PictureType.JPEG);
+                                bytes = ImageConvertToBytes(bp);
 
-                            //第三步,在sheet中创建画布
-                            IDrawing patriarch = sheet.CreateDrawingPatriarch();
+                                //第二步,将图片添加到workbook中,指定图片的格式,返回图片所在workbook->paicture数组中的索引的地址,从1开始
+                                pictureIdx = workbook.AddPicture(bytes, PictureType.JPEG);
 
-                            //第四步,设置锚点,(在起始单元格的X坐标0-1023,Y的坐标0-255,在终止单元格的X坐标0-1023,Y的坐标0-255,起始单元格行数,列数,终止单元格行数,列数)
-                            IClientAnchor anchor = patriarch.CreateAnchor(1, 1, 2, 2, i_cell, i_row + 2, i_cell + 1, i_row + 3);//终止比开始位置大1,会自动缩放到一个单元格内的
+                                //第三步,在sheet中创建画布
+                                patriarch = sheet.CreateDrawingPatriarch();
 
-                            //第五步,创建图片
-                            IPicture pict = patriarch.CreatePicture(anchor, pictureIdx);
+                                //第四步,设置锚点,(在起始单元格的X坐标0-1023,Y的坐标0-255,在终止单元格的X坐标0-1023,Y的坐标0-255,起始单元格行数,列数,终止单元格行数,列数)
+                                anchor = patriarch.CreateAnchor(1, 1, 2, 2, i_cell, i_row + 2, i_cell + 1, i_row + 3);//终止比开始位置大1,会自动缩放到一个单元格内的
 
-                            //图像效果不好,自己另外导出吧,这里对该列宽进行了设置0
+                                //第五步,创建图片
+                                IPicture pict = patriarch.CreatePicture(anchor, pictureIdx);
+                            }
                         }
                         else
                         {
                             //非图像列
-                            double dbl = 0;
-                            if (double.TryParse(dgV_ParticlesDevidePage[i_cell, i_row].Value.ToString(), out dbl))
-                            {
-                                cell.SetCellValue(dbl);
-                            }
-                            else
-                            {
-                                cell.SetCellValue(dgV_ParticlesDevidePage[i_cell, i_row].Value.ToString());
-                            }
+                            cell.SetCellValue(dgV_ParticlesDevidePage[i_cell, i_row].Value.ToString());
                         }
 
                     }
                 }
-
-                ISheet sheet2;
-                sheet2 = workbook.CreateSheet("Peak spectrum Data");//创建工作表
-                //插入表头
-                row = sheet2.CreateRow(1);
-                row.Height = 30 * 20;
-                cell = row.CreateCell(0);
-                cell.CellStyle = cellStyle;
-                cell.SetCellValue("rowid");
-
-                for (int i_cell = 1; i_cell < 2001; i_cell++)
+                if (sfd.SpectrumData)
                 {
-                    cell = row.CreateCell(i_cell);
+                    ISheet sheet2;
+                    sheet2 = workbook.CreateSheet("Peak spectrum Data");//创建工作表
+                                                                        //插入表头
+                    row = sheet2.CreateRow(1);
+                    row.Height = 30 * 20;
+                    cell = row.CreateCell(0);
                     cell.CellStyle = cellStyle;
-                    if (i_cell == 1)
+                    cell.SetCellValue("rowid");
+
+                    for (int i_cell = 1; i_cell < 2001; i_cell++)
                     {
-                        cell.SetCellValue("PeakSpectrumData");
+                        cell = row.CreateCell(i_cell);
+                        cell.CellStyle = cellStyle;
+                        if (i_cell == 1)
+                        {
+                            cell.SetCellValue("PeakSpectrumData");
+                        }
                     }
-                }
 
-                sheet2.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(1, 1, 1, 2000));
+                    sheet2.AddMergedRegion(new NPOI.SS.Util.CellRangeAddress(1, 1, 1, 2000));
 
-                for (int j = 0; j < particles.Rows.Count; j++)
-                {
-                    row = sheet2.CreateRow(2 + j);
-                    cell = row.CreateCell(0);
-                    cell.CellStyle = cellStyle;
-                    cell.SetCellValue(j + 1);
-                    var tmpPart = Particledata.GetParticleXrayDataByFidAndPid(particles.Rows[j]["fieldid"].ToString(), particles.Rows[j]["particleid"].ToString());
-                    if (tmpPart != null)
+                    for (int j = 0; j < particles.Rows.Count; j++)
                     {
-                        if (tmpPart.XrayId > -1)
+                        row = sheet2.CreateRow(2 + j);
+                        cell = row.CreateCell(0);
+                        cell.CellStyle = cellStyle;
+                        cell.SetCellValue(j + 1);
+                        var tmpPart = Particledata.GetParticleXrayDataByFidAndPid(particles.Rows[j]["fieldid"].ToString(), particles.Rows[j]["particleid"].ToString());
+                        if (tmpPart != null)
                         {
-                            uint[] Analysis_xray = new uint[2000];
-                            for (int i = 0; i < 2000; i++)
+                            if (tmpPart.XrayId > -1)
                             {
-                                Analysis_xray[i] = BitConverter.ToUInt32(tmpPart.XRayData, i * 4);
-                                cell = row.CreateCell(i + 1);
-                                cell.CellStyle = cellStyle;
-                                cell.SetCellValue(Analysis_xray[i]);
+                                uint[] Analysis_xray = new uint[2000];
+                                for (int i = 0; i < 2000; i++)
+                                {
+                                    Analysis_xray[i] = BitConverter.ToUInt32(tmpPart.XRayData, i * 4);
+                                    cell = row.CreateCell(i + 1);
+                                    cell.CellStyle = cellStyle;
+                                    cell.SetCellValue(Analysis_xray[i]);
+                                }
+
                             }
 
                         }
-
                     }
                 }
-
                 if (sfd.SpectrumConfirmation)
                 {
                     ISheet sheet3;
@@ -2026,7 +2024,7 @@ namespace OTSIncAReportGrids
                         drawing = sheet3.CreateDrawingPatriarch();
                         //锚点
                         anchor3 = drawing.CreateAnchor(0, 0, 0, 0, 1, j + 2, 2, j + 3);//XSSFClientAnchor(dx1,dy1,dx2,dy2,col1,row1,col2,row2);参数说明:dx1 dy1 起始单元格中的x,y坐标.dx2 dy2 结束单元格中的x,y坐标col1, row1 指定起始的单元格,下标从0开始col2, row2 指定结束的单元格,下标从0开始
-                        CreateChart(drawing, sheet2, anchor3, j + 2);
+                        CreateChart(drawing, sheet3, anchor3, j + 2);
                     }
                 }
 

+ 34 - 6
OTSIncAReportApp/1-UI/Control_Grids/SpectrumExportConfirmation.Designer.cs

@@ -33,12 +33,14 @@ namespace OTSIncAReportApp._1_UI.Control_Grids
             this.bt_Path = new System.Windows.Forms.Button();
             this.cB_SpectrumConfirmation = new System.Windows.Forms.CheckBox();
             this.bt_Export = new System.Windows.Forms.Button();
+            this.cB_Picture = new System.Windows.Forms.CheckBox();
+            this.cB_SpectrumData = new System.Windows.Forms.CheckBox();
             this.SuspendLayout();
             // 
             // tBox1
             // 
             this.tBox1.Location = new System.Drawing.Point(8, 15);
-            this.tBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tBox1.Margin = new System.Windows.Forms.Padding(2);
             this.tBox1.Name = "tBox1";
             this.tBox1.ReadOnly = true;
             this.tBox1.Size = new System.Drawing.Size(380, 21);
@@ -47,7 +49,7 @@ namespace OTSIncAReportApp._1_UI.Control_Grids
             // bt_Path
             // 
             this.bt_Path.Location = new System.Drawing.Point(405, 11);
-            this.bt_Path.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.bt_Path.Margin = new System.Windows.Forms.Padding(2);
             this.bt_Path.MaximumSize = new System.Drawing.Size(125, 25);
             this.bt_Path.MinimumSize = new System.Drawing.Size(125, 25);
             this.bt_Path.Name = "bt_Path";
@@ -60,8 +62,8 @@ namespace OTSIncAReportApp._1_UI.Control_Grids
             // cB_SpectrumConfirmation
             // 
             this.cB_SpectrumConfirmation.AutoSize = true;
-            this.cB_SpectrumConfirmation.Location = new System.Drawing.Point(245, 59);
-            this.cB_SpectrumConfirmation.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.cB_SpectrumConfirmation.Location = new System.Drawing.Point(213, 58);
+            this.cB_SpectrumConfirmation.Margin = new System.Windows.Forms.Padding(2);
             this.cB_SpectrumConfirmation.Name = "cB_SpectrumConfirmation";
             this.cB_SpectrumConfirmation.Size = new System.Drawing.Size(132, 16);
             this.cB_SpectrumConfirmation.TabIndex = 2;
@@ -73,7 +75,7 @@ namespace OTSIncAReportApp._1_UI.Control_Grids
             // bt_Export
             // 
             this.bt_Export.Location = new System.Drawing.Point(405, 54);
-            this.bt_Export.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.bt_Export.Margin = new System.Windows.Forms.Padding(2);
             this.bt_Export.Name = "bt_Export";
             this.bt_Export.Size = new System.Drawing.Size(125, 25);
             this.bt_Export.TabIndex = 3;
@@ -81,16 +83,40 @@ namespace OTSIncAReportApp._1_UI.Control_Grids
             this.bt_Export.UseVisualStyleBackColor = true;
             this.bt_Export.Click += new System.EventHandler(this.bt_Export_Click);
             // 
+            // cB_Picture
+            // 
+            this.cB_Picture.AutoSize = true;
+            this.cB_Picture.Location = new System.Drawing.Point(13, 58);
+            this.cB_Picture.Name = "cB_Picture";
+            this.cB_Picture.Size = new System.Drawing.Size(72, 16);
+            this.cB_Picture.TabIndex = 4;
+            this.cB_Picture.Text = "颗粒图像";
+            this.cB_Picture.UseVisualStyleBackColor = true;
+            this.cB_Picture.CheckedChanged += new System.EventHandler(this.cB_Picture_CheckedChanged);
+            // 
+            // cB_SpectrumData
+            // 
+            this.cB_SpectrumData.AutoSize = true;
+            this.cB_SpectrumData.Location = new System.Drawing.Point(108, 58);
+            this.cB_SpectrumData.Name = "cB_SpectrumData";
+            this.cB_SpectrumData.Size = new System.Drawing.Size(72, 16);
+            this.cB_SpectrumData.TabIndex = 5;
+            this.cB_SpectrumData.Text = "谱峰数据";
+            this.cB_SpectrumData.UseVisualStyleBackColor = true;
+            this.cB_SpectrumData.CheckedChanged += new System.EventHandler(this.cB_SpectrumData_CheckedChanged);
+            // 
             // SpectrumExportConfirmation
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(538, 93);
+            this.Controls.Add(this.cB_SpectrumData);
+            this.Controls.Add(this.cB_Picture);
             this.Controls.Add(this.bt_Export);
             this.Controls.Add(this.cB_SpectrumConfirmation);
             this.Controls.Add(this.bt_Path);
             this.Controls.Add(this.tBox1);
-            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Margin = new System.Windows.Forms.Padding(2);
             this.MaximizeBox = false;
             this.MinimizeBox = false;
             this.Name = "SpectrumExportConfirmation";
@@ -108,5 +134,7 @@ namespace OTSIncAReportApp._1_UI.Control_Grids
         private System.Windows.Forms.Button bt_Path;
         private System.Windows.Forms.CheckBox cB_SpectrumConfirmation;
         private System.Windows.Forms.Button bt_Export;
+        private System.Windows.Forms.CheckBox cB_Picture;
+        private System.Windows.Forms.CheckBox cB_SpectrumData;
     }
 }

+ 54 - 0
OTSIncAReportApp/1-UI/Control_Grids/SpectrumExportConfirmation.cs

@@ -13,6 +13,8 @@ namespace OTSIncAReportApp._1_UI.Control_Grids
     public partial class SpectrumExportConfirmation : Form
     {
         bool m_SpectrumConfirmation = false;
+        bool m_SpectrumData = false;
+        bool m_Picture = false;
         string m_savepath = "";
         public bool SpectrumConfirmation
         {
@@ -26,6 +28,29 @@ namespace OTSIncAReportApp._1_UI.Control_Grids
             }
         }
 
+        public bool SpectrumData
+        {
+            get
+            {
+                return m_SpectrumData;
+            }
+            set
+            {
+                m_SpectrumData = value;
+            }
+        }
+        public bool Picture
+        {
+            get
+            {
+                return m_Picture;
+            }
+            set
+            {
+                m_Picture = value;
+            }
+        }
+
         public string FileName
         {
             get
@@ -86,5 +111,34 @@ namespace OTSIncAReportApp._1_UI.Control_Grids
             }
             
         }
+
+        private void checkBox1_CheckedChanged(object sender, EventArgs e)
+        {
+
+        }
+
+        private void cB_SpectrumData_CheckedChanged(object sender, EventArgs e)
+        {
+            if (cB_SpectrumData.Checked)
+            {
+                m_SpectrumData = true;
+            }
+            else
+            {
+                m_SpectrumData = false;
+            }
+        }
+
+        private void cB_Picture_CheckedChanged(object sender, EventArgs e)
+        {
+            if (cB_Picture.Checked)
+            {
+                m_Picture = true;
+            }
+            else
+            {
+                m_Picture = false;
+            }
+        }
     }
 }