Browse Source

Merge branch 'Release2.3' of http://36.129.163.148:10080/gaoshipeng/OTS2_0 into Release2.3

gsp 3 years ago
parent
commit
f2e172ae54

+ 1 - 1
OTSIncAMeasureApp/0-OTSModel/Measure/3-MeasureFlow/CMeasure.cs

@@ -511,7 +511,7 @@ namespace OTSModelSharp
 
             // Set image scan param
             COTSImgScanPrm poImageScanParam = new COTSImgScanPrm();
-            poImageScanParam.SetStopMode(OTS_MEASURE_STOP_MODE.CoverMode);
+            poImageScanParam.SetStopMode(((int)OTS_MEASURE_STOP_MODE.CoverMode).ToString());
             poImageScanParam.SetStartImageMode(OTS_GET_IMAGE_MODE.FROM_CENTER);
             poImageScanParam.SetScanImageSpeed(OTS_IMAGE_SCANSPEED_OPTIONS.low);
             //poImageScanParam.SetImagePixelSize(OTS_FIVE_TIES_OPTIONS.TIE1);

+ 39 - 34
OTSIncAMeasureApp/0-OTSModel/Measure/3-MeasureFlow/CSmplMeasure.cs

@@ -353,7 +353,7 @@ namespace OTSModelSharp
         {
           
 
-            int nStopMode = (int)a_pScanParam.GetStopMode();
+            string sStopMode = a_pScanParam.GetStopMode();
             int nStopField = a_pScanParam.GetStopParamFields();
 
             // completed fields number
@@ -381,42 +381,47 @@ namespace OTSModelSharp
             int nParticlAim = a_pScanParam.GetStopParamParticles();
             int nMeasTimeAim = a_pScanParam.GetStopParamMeasTime();
 
-            bool bRet = true;
-            switch (nStopMode)
+            bool bRet = false;
+
+            string[] str = sStopMode.Replace(" ", "").Split('+');
+            for(int i=0;i< str.Length;i++)
             {
-                case (int)OTS_MEASURE_STOP_MODE.CoverMode:
-                    // completed fields number
-                    if (nCompeltedField < a_nTotalFields)
-                    {
-                 
-                        bRet = false;
-                    }
-                    break;
-                case (int)OTS_MEASURE_STOP_MODE.FieldMode:
-                    if (nCompeltedField < nStopField)
-                    {
-                     
-                        bRet = false;
-                    }
-                    break;
-                case (int)OTS_MEASURE_STOP_MODE.ParticleMode:
+                switch (int.Parse(str[i].Split(':')[0]))
+                {
+                    case (int)OTS_MEASURE_STOP_MODE.CoverMode:
+                        // completed fields number
+                        if (nCompeltedField == a_nTotalFields)
+                        {
 
-                    if (nNumParticle < nParticlAim)
-                    {
-                    
-                        bRet = false;
-                    }
-                    break;
-                case (int)OTS_MEASURE_STOP_MODE.TimeMode:
+                            bRet = true;
+                        }
+                        break;
+                    case (int)OTS_MEASURE_STOP_MODE.FieldMode:
+                        if (nCompeltedField >= nStopField)
+                        {
 
-                    if (nUsedTime < nMeasTimeAim)
-                    {
-                      
-                        bRet = false;
-                    }
-                    break;
-                default:
-                    break;
+                            bRet = true;
+                        }
+                        break;
+                    case (int)OTS_MEASURE_STOP_MODE.ParticleMode:
+
+                        if (nNumParticle >= nParticlAim)
+                        {
+
+                            bRet = true;
+                        }
+                        break;
+                    case (int)OTS_MEASURE_STOP_MODE.TimeMode:
+
+                        if (nUsedTime >= nMeasTimeAim)
+                        {
+
+                            bRet = true;
+                        }
+                        break;
+                    default:
+                        break;
+                }
             }
 
             return bRet;

+ 2 - 1
OTSIncAMeasureApp/0-OTSModel/Measure/ParamData/OTSDefaultParam.cs

@@ -150,7 +150,8 @@ namespace OTSModelSharp
 
                 //image scan parameter
                 COTSImgScanPrm  pImageScanParam = new COTSImgScanPrm ();
-                pImageScanParam.SetStopMode(DataPublic.STOPT_MODE);
+
+                pImageScanParam.SetStopMode(((int)DataPublic.STOPT_MODE).ToString());
                 pImageScanParam.SetStopParamMeasTime(DataPublic.MEASURE_TIME);
                 pImageScanParam.SetStopParamFields(DataPublic.FIELDS_NUM);
                 pImageScanParam.SetStopParamParticles(DataPublic.PARTICL_NUM);

+ 20 - 7
OTSIncAMeasureApp/0-OTSModel/OTSDataType/COTSImageScanParam.cs

@@ -10,7 +10,7 @@ namespace OTSDataType
 {
    public class COTSImgScanPrm : ISlo
     {
-        private OTS_MEASURE_STOP_MODE m_nStopMode;
+        private string m_nStopMode;
         private int m_nStopParamMeasTime;
         private int m_nStopParamFields;
         private int m_nStopParamParticles;
@@ -26,7 +26,7 @@ namespace OTSDataType
 
      
 
-        const OTS_MEASURE_STOP_MODE DEFUALT_MEASURE_STOP_MODE = OTS_MEASURE_STOP_MODE.CoverMode;
+        //const OTS_MEASURE_STOP_MODE DEFUALT_MEASURE_STOP_MODE = OTS_MEASURE_STOP_MODE.CoverMode;
 
         // stop parameters
          const int DEFUALT_PARAM_FIELD = 500;
@@ -44,7 +44,7 @@ namespace OTSDataType
         void Init()
         {
 
-            m_nStopMode = DEFUALT_MEASURE_STOP_MODE;                            //测量终止方式
+            m_nStopMode = ((int)OTS_MEASURE_STOP_MODE.CoverMode).ToString();                            //测量终止方式
             m_nStopParamMeasTime = DEFUALT_PARAM_TIME;                          //测量时间
             m_nStopParamFields = DEFUALT_PARAM_FIELD;                           //帧图数
             m_nStopParamParticles = DEFUALT_PARAM_PARTICLE;                     //夹杂物数
@@ -110,8 +110,8 @@ namespace OTSDataType
 
         //测量终止方式
 
-        public OTS_MEASURE_STOP_MODE GetStopMode() { return m_nStopMode; }
-        public void SetStopMode(OTS_MEASURE_STOP_MODE a_nStopMode) { m_nStopMode = a_nStopMode; }
+        public string GetStopMode() { return m_nStopMode; }
+        public void SetStopMode(string a_nStopMode) { m_nStopMode = a_nStopMode; }
 
         //测量时间
         public int GetStopParamMeasTime() { return m_nStopParamMeasTime; }
@@ -203,7 +203,14 @@ namespace OTSDataType
 
             if (isStoring)
             {
-                xnStopMode.AssignValue((int)m_nStopMode+":"+m_nStopMode.ToString());//
+                string[] st = m_nStopMode.Replace(" ","").Split('+');
+                string str = "";
+                for (int k = 0; k < st.Length; k++)
+                {
+                    str += st[k] + ":" + ((OTS_MEASURE_STOP_MODE)int.Parse(st[k])).ToString()+",";
+                }
+
+                xnStopMode.AssignValue(str.Substring(0, str.Length-1));//
                 xnStopParamMeasTime.AssignValue( m_nStopParamMeasTime);
                 xnStopParamFields.AssignValue(m_nStopParamFields);
                 xnStopParamParticles.AssignValue(m_nStopParamParticles);
@@ -223,7 +230,13 @@ namespace OTSDataType
             {
                 slo.Serialize(false, classDoc, rootNode);
 
-                m_nStopMode = (OTS_MEASURE_STOP_MODE)Convert.ToInt32(xnStopMode.value().Split(':')[0]);
+                string[] st = xnStopMode.value().Split(',');
+                string str = "";
+                for (int k = 0; k < st.Length; k++)
+                {
+                    str += st[k].Split(':')[0] + " + ";
+                }
+                m_nStopMode = str.Substring(0, str.Length - 3);
                 m_nStopParamMeasTime = xnStopParamMeasTime.value();
                 m_nStopParamFields = xnStopParamFields.value();
                 m_nStopParamParticles = xnStopParamParticles.value();

+ 60 - 119
OTSIncAMeasureApp/0-OTSModel/OTSDataType/COTSSample.cs

@@ -940,70 +940,42 @@ namespace OTSDataType
                             
                                 poPropItem = new CPropItem();
                                 nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.STOP_MODE;
-                                poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.COMBO, false, bShow);
+                                poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.STRING, true, bShow);
                                 a_listPropItems.Add(poPropItem);
-                           
-                            // stop parameter
-                            switch (m_poMsrParams.GetImageScanParam().GetStopMode())
-                            {
-                                case OTS_MEASURE_STOP_MODE.ParticleMode:
-                                    {
-                                        // particle
-                                       
-                                            poPropItem = new CPropItem();
-                                            nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.STOP_PARAM_PARTICLE;
-                                            poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.INT, false, bShow);
-                                            a_listPropItems.Add(poPropItem);
-                                       
-                                    }
-                                    break;
 
-                                case OTS_MEASURE_STOP_MODE.FieldMode:
-                                    {
-                                        // field
-                                        
-                                            poPropItem = new CPropItem();
-                                            nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.STOP_PARAM_FIELD;
-                                            poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.INT, false, bShow);
-                                            a_listPropItems.Add(poPropItem);
-                                       
-                                    }
-                                    break;
+                            //// stop parameter
+                            
 
-                                case OTS_MEASURE_STOP_MODE.TimeMode:
-                                    {
-                                        // used time
-                                       
-                                            poPropItem = new CPropItem();
-                                            nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.STOP_PARAM_TIME;
-                                            poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.INT, false, bShow);
-                                            a_listPropItems.Add(poPropItem);
-                                       
-                                    }
-                                    break;
+                            poPropItem = new CPropItem();
+                            nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.STOP_PARAM_PARTICLE;
+                            poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.INT, true, false);
+                            a_listPropItems.Add(poPropItem);
 
-                                case OTS_MEASURE_STOP_MODE.CoverMode:
-                                default:
-                                    {
-                                        // no stop parameter item
-                                    }
-                                    break;
-                            }
+                            // field
+                            poPropItem = new CPropItem();
+                            nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.STOP_PARAM_FIELD;
+                            poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.INT, true, false);
+                            a_listPropItems.Add(poPropItem);
 
+                            // used time
+                            poPropItem = new CPropItem();
+                            nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.STOP_PARAM_TIME;
+                            poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.INT, true, false);
+                            a_listPropItems.Add(poPropItem);
                             // scan speed
-                           
-                                poPropItem = new CPropItem();
-                                nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.SCAN_SPEED;
-                                poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.COMBO, false, bShow);
-                                a_listPropItems.Add(poPropItem);
-                          
+
+                            poPropItem = new CPropItem();
+                            nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.SCAN_SPEED;
+                            poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.COMBO, false, bShow);
+                            a_listPropItems.Add(poPropItem);
+
                             // image resolution
-                           
-                                poPropItem = new CPropItem();
-                                nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.IMAGE_RESOLUTION;
-                                poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.COMBO, false, bShow);
-                                a_listPropItems.Add(poPropItem);
-                            
+
+                            poPropItem = new CPropItem();
+                            nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.IMAGE_RESOLUTION;
+                            poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.COMBO, false, bShow);
+                            a_listPropItems.Add(poPropItem);
+
                         }
                         break;
 
@@ -1403,55 +1375,29 @@ namespace OTSDataType
 
                             poPropItem = new CPropItem();
                             nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.STOP_MODE;
-                            poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.COMBO, false, bShow);
+                            poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.STRING, true, bShow);
                             a_listPropItems.Add(poPropItem);
 
-                            // stop parameter
-                            switch (m_poMsrParams.GetImageScanParam().GetStopMode())
-                            {
-                                case OTS_MEASURE_STOP_MODE.ParticleMode:
-                                    {
-                                        // particle
-
-                                        poPropItem = new CPropItem();
-                                        nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.STOP_PARAM_PARTICLE;
-                                        poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.INT, false, bShow);
-                                        a_listPropItems.Add(poPropItem);
-
-                                    }
-                                    break;
-
-                                case OTS_MEASURE_STOP_MODE.FieldMode:
-                                    {
-                                        // field
-
-                                        poPropItem = new CPropItem();
-                                        nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.STOP_PARAM_FIELD;
-                                        poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.INT, false, bShow);
-                                        a_listPropItems.Add(poPropItem);
+                            
+                            // particle
 
-                                    }
-                                    break;
+                            poPropItem = new CPropItem();
+                            nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.STOP_PARAM_PARTICLE;
+                            poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.INT, true, false);
+                            a_listPropItems.Add(poPropItem);
 
-                                case OTS_MEASURE_STOP_MODE.TimeMode:
-                                    {
-                                        // used time
+                            poPropItem = new CPropItem();
+                            nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.STOP_PARAM_FIELD;
+                            poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.INT, true, false);
+                            a_listPropItems.Add(poPropItem);
 
-                                        poPropItem = new CPropItem();
-                                        nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.STOP_PARAM_TIME;
-                                        poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.INT, false, bShow);
-                                        a_listPropItems.Add(poPropItem);
+                            // used time
 
-                                    }
-                                    break;
+                            poPropItem = new CPropItem();
+                            nItemId = OTS_SAMPLE_PROP_GRID_ITEMS.STOP_PARAM_TIME;
+                            poPropItem.SetSmplParameter(modelResource, nItemId, OTS_ITEM_TYPES.INT, true, false);
+                            a_listPropItems.Add(poPropItem);
 
-                                case OTS_MEASURE_STOP_MODE.CoverMode:
-                                default:
-                                    {
-                                        // no stop parameter item
-                                    }
-                                    break;
-                            }
 
                             // scan speed
 
@@ -2107,6 +2053,12 @@ namespace OTSDataType
                     }
                     break;
 
+                case OTS_SAMPLE_PROP_GRID_ITEMS.STOP_MODE:
+                    {
+                        a_strValue = m_poMsrParams.GetImageScanParam().GetStopMode();
+                    }
+                    break;
+
                 default:
                     {
                         // something wrong, return false
@@ -2136,6 +2088,15 @@ namespace OTSDataType
                     }
                     break;
 
+                case OTS_SAMPLE_PROP_GRID_ITEMS.STOP_MODE:
+                    {
+                        if (m_poMsrParams.GetImageScanParam().GetStopMode() != a_strValue)
+                        {
+                            m_poMsrParams.GetImageScanParam().SetStopMode(a_strValue);
+                        }
+                    }
+                    break;
+
                 // read only property, tread as default. 
                 case OTS_SAMPLE_PROP_GRID_ITEMS.SAMPLE_HOLE_NAME:
                 case OTS_SAMPLE_PROP_GRID_ITEMS.MAGNIFICATION:
@@ -2168,12 +2129,6 @@ namespace OTSDataType
                     }
                     break;
 
-                case OTS_SAMPLE_PROP_GRID_ITEMS.STOP_MODE:
-                    {
-                        a_nValue = (int)m_poMsrParams.GetImageScanParam().GetStopMode();
-                    }
-                    break;
-
                 case OTS_SAMPLE_PROP_GRID_ITEMS.SCAN_SPEED:
                     {
                         a_nValue = (int)m_poMsrParams.GetImageScanParam().GetScanImageSpeed();
@@ -2262,20 +2217,6 @@ namespace OTSDataType
                     }
                     break;
 
-                case OTS_SAMPLE_PROP_GRID_ITEMS.STOP_MODE:
-                    {
-                        if (OTS_MEASURE_STOP_MODE.CoverMode > (OTS_MEASURE_STOP_MODE)a_nValue || (OTS_MEASURE_STOP_MODE)a_nValue > OTS_MEASURE_STOP_MODE.TimeMode)
-                        {
-                            return false;
-                        }
-                        if (m_poMsrParams.GetImageScanParam().GetStopMode() != (OTS_MEASURE_STOP_MODE)a_nValue)
-                        {
-                            m_poMsrParams.GetImageScanParam().SetStopMode((OTS_MEASURE_STOP_MODE)a_nValue);
-                            m_Status.SetStatus(OTS_MSR_SAMPLE_STATUS.UNMEASURED);
-                        }
-                    }
-                    break;
-
                 case OTS_SAMPLE_PROP_GRID_ITEMS.SCAN_SPEED:
                     {
                         if (OTS_IMAGE_SCANSPEED_OPTIONS.low > (OTS_IMAGE_SCANSPEED_OPTIONS)a_nValue || (OTS_IMAGE_SCANSPEED_OPTIONS)a_nValue > OTS_IMAGE_SCANSPEED_OPTIONS.high)

+ 163 - 0
OTSIncAMeasureApp/3-OTSDisplaySourceGridData/MeasureStopMode.Designer.cs

@@ -0,0 +1,163 @@
+
+namespace OTSMeasureApp._3_OTSDisplaySourceGridData
+{
+    partial class MeasureStopMode
+    {
+        /// <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_FieldMode = new System.Windows.Forms.CheckBox();
+            this.tB_FieldMode = new System.Windows.Forms.TextBox();
+            this.tB_ParticleMode = new System.Windows.Forms.TextBox();
+            this.cB_ParticleMode = new System.Windows.Forms.CheckBox();
+            this.tB_TimeMode = new System.Windows.Forms.TextBox();
+            this.cB_TimeMode = new System.Windows.Forms.CheckBox();
+            this.cB_CoverMode = new System.Windows.Forms.CheckBox();
+            this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.bt_ok = new System.Windows.Forms.Button();
+            this.groupBox1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // cB_FieldMode
+            // 
+            this.cB_FieldMode.AutoSize = true;
+            this.cB_FieldMode.Location = new System.Drawing.Point(55, 39);
+            this.cB_FieldMode.Name = "cB_FieldMode";
+            this.cB_FieldMode.Size = new System.Drawing.Size(120, 19);
+            this.cB_FieldMode.TabIndex = 0;
+            this.cB_FieldMode.Text = "1.终止帧图数";
+            this.cB_FieldMode.UseVisualStyleBackColor = true;
+            // 
+            // tB_FieldMode
+            // 
+            this.tB_FieldMode.Location = new System.Drawing.Point(223, 37);
+            this.tB_FieldMode.Name = "tB_FieldMode";
+            this.tB_FieldMode.Size = new System.Drawing.Size(164, 25);
+            this.tB_FieldMode.TabIndex = 1;
+            // 
+            // tB_ParticleMode
+            // 
+            this.tB_ParticleMode.Location = new System.Drawing.Point(223, 82);
+            this.tB_ParticleMode.Name = "tB_ParticleMode";
+            this.tB_ParticleMode.Size = new System.Drawing.Size(164, 25);
+            this.tB_ParticleMode.TabIndex = 3;
+            // 
+            // cB_ParticleMode
+            // 
+            this.cB_ParticleMode.AutoSize = true;
+            this.cB_ParticleMode.Location = new System.Drawing.Point(55, 84);
+            this.cB_ParticleMode.Name = "cB_ParticleMode";
+            this.cB_ParticleMode.Size = new System.Drawing.Size(135, 19);
+            this.cB_ParticleMode.TabIndex = 2;
+            this.cB_ParticleMode.Text = "2.终止夹杂物数";
+            this.cB_ParticleMode.UseVisualStyleBackColor = true;
+            // 
+            // tB_TimeMode
+            // 
+            this.tB_TimeMode.Location = new System.Drawing.Point(223, 128);
+            this.tB_TimeMode.Name = "tB_TimeMode";
+            this.tB_TimeMode.Size = new System.Drawing.Size(164, 25);
+            this.tB_TimeMode.TabIndex = 5;
+            // 
+            // cB_TimeMode
+            // 
+            this.cB_TimeMode.AutoSize = true;
+            this.cB_TimeMode.Location = new System.Drawing.Point(55, 130);
+            this.cB_TimeMode.Name = "cB_TimeMode";
+            this.cB_TimeMode.Size = new System.Drawing.Size(136, 19);
+            this.cB_TimeMode.TabIndex = 4;
+            this.cB_TimeMode.Text = "3.终止时间(秒)";
+            this.cB_TimeMode.UseVisualStyleBackColor = true;
+            // 
+            // cB_CoverMode
+            // 
+            this.cB_CoverMode.AutoSize = true;
+            this.cB_CoverMode.Location = new System.Drawing.Point(55, 176);
+            this.cB_CoverMode.Name = "cB_CoverMode";
+            this.cB_CoverMode.Size = new System.Drawing.Size(135, 19);
+            this.cB_CoverMode.TabIndex = 6;
+            this.cB_CoverMode.Text = "0.覆盖测量区域";
+            this.cB_CoverMode.UseVisualStyleBackColor = true;
+            // 
+            // groupBox1
+            // 
+            this.groupBox1.Controls.Add(this.bt_ok);
+            this.groupBox1.Controls.Add(this.cB_FieldMode);
+            this.groupBox1.Controls.Add(this.cB_CoverMode);
+            this.groupBox1.Controls.Add(this.tB_FieldMode);
+            this.groupBox1.Controls.Add(this.tB_TimeMode);
+            this.groupBox1.Controls.Add(this.cB_ParticleMode);
+            this.groupBox1.Controls.Add(this.cB_TimeMode);
+            this.groupBox1.Controls.Add(this.tB_ParticleMode);
+            this.groupBox1.Location = new System.Drawing.Point(12, 12);
+            this.groupBox1.Name = "groupBox1";
+            this.groupBox1.Size = new System.Drawing.Size(452, 246);
+            this.groupBox1.TabIndex = 7;
+            this.groupBox1.TabStop = false;
+            this.groupBox1.Text = "测量结束方式";
+            // 
+            // bt_ok
+            // 
+            this.bt_ok.Location = new System.Drawing.Point(316, 191);
+            this.bt_ok.Name = "bt_ok";
+            this.bt_ok.Size = new System.Drawing.Size(119, 39);
+            this.bt_ok.TabIndex = 7;
+            this.bt_ok.Text = "确 定";
+            this.bt_ok.UseVisualStyleBackColor = true;
+            this.bt_ok.Click += new System.EventHandler(this.bt_ok_Click);
+            // 
+            // MeasureStopMode
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(478, 269);
+            this.ControlBox = false;
+            this.Controls.Add(this.groupBox1);
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "MeasureStopMode";
+            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
+            this.Text = "MeasureStopMode";
+            this.Load += new System.EventHandler(this.MeasureStopMode_Load);
+            this.groupBox1.ResumeLayout(false);
+            this.groupBox1.PerformLayout();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.CheckBox cB_FieldMode;
+        private System.Windows.Forms.TextBox tB_FieldMode;
+        private System.Windows.Forms.TextBox tB_ParticleMode;
+        private System.Windows.Forms.CheckBox cB_ParticleMode;
+        private System.Windows.Forms.TextBox tB_TimeMode;
+        private System.Windows.Forms.CheckBox cB_TimeMode;
+        private System.Windows.Forms.CheckBox cB_CoverMode;
+        private System.Windows.Forms.GroupBox groupBox1;
+        private System.Windows.Forms.Button bt_ok;
+    }
+}

+ 175 - 0
OTSIncAMeasureApp/3-OTSDisplaySourceGridData/MeasureStopMode.cs

@@ -0,0 +1,175 @@
+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;
+using static OTSDataType.otsdataconst;
+
+namespace OTSMeasureApp._3_OTSDisplaySourceGridData
+{
+    public partial class MeasureStopMode : Form
+    {
+        string m_StopMode="";
+        int m_FieldMode = 100;
+        int m_ParticleMode = 5000;
+        int m_TimeMode = 1000;
+        public string StopMode
+        {
+            set
+            {
+              m_StopMode=value;
+            }
+            get
+            {
+              return m_StopMode;
+            }
+        }
+        public int FieldMode
+        {
+            set
+            {
+                m_FieldMode = value;
+            }
+            get
+            {
+                return m_FieldMode;
+            }
+        }
+
+        public int ParticleMode
+        {
+            set
+            {
+                m_ParticleMode = value;
+            }
+            get
+            {
+                return m_ParticleMode;
+            }
+        }
+
+        public int TimeMode
+        {
+            set
+            {
+                m_TimeMode = value;
+            }
+            get
+            {
+                return m_TimeMode;
+            }
+        }
+        public MeasureStopMode()
+        {
+            InitializeComponent();
+        }
+
+        private void MeasureStopMode_Load(object sender, EventArgs e)
+        {
+            Init();
+        }
+        private void bt_ok_Click(object sender, EventArgs e)
+        {
+            if(!cB_FieldMode.Checked&&!cB_ParticleMode.Checked&&!cB_TimeMode.Checked&&!cB_CoverMode.Checked)
+            {
+                MessageBox.Show("You must choose at least one item!");
+                return;
+            }
+            if(!CheckAndSaveParams())
+            {
+                MessageBox.Show("Please enter the correct numeric format!");
+                return;
+            }
+
+            m_StopMode = "";
+            if (cB_FieldMode.Checked)
+            {
+                m_StopMode += (int)OTS_MEASURE_STOP_MODE.FieldMode + " + ";
+            }
+            if (cB_ParticleMode.Checked)
+            {
+                m_StopMode += (int)OTS_MEASURE_STOP_MODE.ParticleMode + " + ";
+            }
+            if (cB_TimeMode.Checked)
+            {
+                m_StopMode += (int)OTS_MEASURE_STOP_MODE.TimeMode + " + ";
+            }
+            if (cB_CoverMode.Checked)
+            {
+                m_StopMode += (int)OTS_MEASURE_STOP_MODE.CoverMode + " + ";
+            }
+            m_StopMode = m_StopMode.Substring(0, m_StopMode.Length -3);
+
+
+            this.DialogResult = DialogResult.OK;
+        }
+
+        bool CheckAndSaveParams()
+        {
+            if (cB_FieldMode.Checked)
+            {
+                if (!int.TryParse(tB_FieldMode.Text, out m_FieldMode))
+                {
+                    return false;
+                }
+            }
+            if(cB_ParticleMode.Checked)
+            { 
+                if (!int.TryParse(tB_ParticleMode.Text, out m_ParticleMode))
+                {
+                    return false;
+                }
+            }
+            if(cB_TimeMode.Checked)
+            {
+                if (!int.TryParse(tB_TimeMode.Text, out m_TimeMode))
+                {
+                    return false;
+                }
+            }
+            
+            return true;
+        }
+
+        void Init()
+        {
+            tB_FieldMode.Text = m_FieldMode.ToString();
+            tB_ParticleMode.Text = m_ParticleMode.ToString();
+            tB_TimeMode.Text= m_TimeMode.ToString();
+            string[] st = m_StopMode.Replace(" ", "").Split('+');
+            string str = "";
+            for (int k = 0; k < st.Length; k++)
+            {
+                switch ((OTS_MEASURE_STOP_MODE)int.Parse(st[k]))
+                {
+                    case OTS_MEASURE_STOP_MODE.FieldMode: 
+                         { 
+                              cB_FieldMode.Checked=true; 
+                              break; 
+                         }
+                    case OTS_MEASURE_STOP_MODE.ParticleMode:
+                        {
+                            cB_ParticleMode.Checked = true;
+                            break;
+                        }
+                    case OTS_MEASURE_STOP_MODE.TimeMode:
+                        {
+                            cB_TimeMode.Checked = true;
+                            break;
+                        }
+                    case OTS_MEASURE_STOP_MODE.CoverMode:
+                        {
+                            cB_CoverMode.Checked = true;
+                            break;
+                        }
+                    default:
+                        break;
+                }
+            }
+        }
+    }
+}

+ 120 - 0
OTSIncAMeasureApp/3-OTSDisplaySourceGridData/MeasureStopMode.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>

+ 32 - 2
OTSIncAMeasureApp/3-OTSDisplaySourceGridData/OTSDisplaySampleGrid.cs

@@ -1,4 +1,5 @@
 using OTSDataType;
+using OTSMeasureApp._3_OTSDisplaySourceGridData;
 using OTSModelSharp.ResourceManage;
 using SourceGrid;
 using System;
@@ -55,7 +56,7 @@ namespace OTSMeasureApp
         public int m_PropWindow_Y = 0;
 
      //   int Cur_Grid_Rows = 0;           //临时用于计算用的grid行号
-        public static int Const_Grid_Row = 46;    //总行数
+        public static int Const_Grid_Row = 48;    //总行数
         public static int Const_Grid_Column = 3;   //总列数
 
 
@@ -99,7 +100,6 @@ namespace OTSMeasureApp
             m_linkClickEvent3 = new SourceGrid.Cells.Controllers.Button();
             m_linkClickEvent3.Executed += new EventHandler(CellLink_Click_Status);
         }
-      
 
         //初始化工作线程
         private void InitWorkThread()
@@ -327,6 +327,36 @@ namespace OTSMeasureApp
                                 m_PropWindow.PropGrid[Row, 2].AddController(m_ChangeCellValEvent);
                             }
                         }
+                        else if(SampleID == OTS_SAMPLE_PROP_GRID_ITEMS.STOP_MODE)
+                        {
+                            if (null == m_PropWindow.PropGrid[Row, 2])
+                            {
+                                m_PropWindow.PropGrid[Row, 2] = new SourceGrid.Cells.Cell(SampleVal, typeof(string));
+                                m_PropWindow.PropGrid[Row, 1].View = m_Col_NameMode;
+                                m_PropWindow.PropGrid[Row, 2].View = m_Col_ValMode;
+
+                                //SourceGrid.Cells.Controllers.CustomEvents clickEvent = new SourceGrid.Cells.Controllers.CustomEvents();
+                                //clickEvent.Click += new EventHandler(clickEvent_Click);
+
+                                if (bReadOnly)          //只读模式
+                                {
+                                    m_PropWindow.PropGrid[Row, 2].Editor = null;
+                                    m_PropWindow.PropGrid[Row, 2].View = M_Col_readonly;// 设置只读
+
+                                    
+                                    m_PropWindow.PropGrid[Row, 2].AddController(m_ChangeCellValEvent);
+                                }
+                                else
+                                {
+                                    //设置允许修改值的事件
+                                    m_PropWindow.PropGrid[Row, 2].AddController(m_ChangeCellValEvent);
+                                }
+                            }
+                            else
+                            {
+                                m_PropWindow.PropGrid[Row, 2].Value = SampleVal;
+                            }
+                        }
                         else
                         {
                             if (null == m_PropWindow.PropGrid[Row, 2])

+ 63 - 2
OTSIncAMeasureApp/3-OTSDisplaySourceGridData/OTSPropertyWindow.cs

@@ -4,6 +4,7 @@ using System.Linq;
 using System.Windows.Forms;
 using OTS.WinFormsUI.Docking;
 using OTSDataType;
+using OTSMeasureApp._3_OTSDisplaySourceGridData;
 using OTSModelSharp.ResourceManage;
 
 namespace OTSMeasureApp
@@ -13,7 +14,7 @@ namespace OTSMeasureApp
 
         public OTSIncAMeasureAppForm m_MeasureAppForm = null;   
         public OTSDisplaySampleGrid m_SampleGrid = null;
-
+        MeasureStopMode StopModeDialog;
         public OTSPropertyWindow(OTSIncAMeasureAppForm MeasureAppForm)
         {
             InitializeComponent();
@@ -44,7 +45,8 @@ namespace OTSMeasureApp
             }
             m_SampleGrid.InitGrid();
             m_SampleGrid.ShowSampleInfoGrid(SampleInfo);
-            ;
+
+
             int iPropertyDisplayMode = m_MeasureAppForm.m_ProjParam.m_DefaultParam.GetGenParam().PropertyDisplayMode();
             if (iPropertyDisplayMode == 1)
             {
@@ -169,6 +171,45 @@ namespace OTSMeasureApp
                     DisplaySampleMeasureInfo(SMInfo);
                     return;
                 }
+                if(OTS_SAMPLE_PROP_GRID_ITEMS.STOP_MODE==SampleId)
+                {
+                    if (!m_DataMgr.SetSampleParamVal(OTS_SAMPLE_PROP_GRID_ITEMS.STOP_PARAM_FIELD, OTS_ITEM_TYPES.INT, StopModeDialog.FieldMode))    // Prop值变化,修改样品值成功
+                    {
+                        string sLog = "SampleId = " + SampleId.ToString() + "," + "ValType = " + ValType.ToString() + "," + "ObjVal = " + ObjVal.ToString();
+                        //重新获取原来工作样品值重新设置
+                        if (!m_DataMgr.GetWorkSamplePerameter(m_DataMgr.GetWorkSample(), ref SMInfo))
+                        {
+                            return;
+                        }
+                        //Prop重新获显示工作样品的原来值
+                        DisplaySampleMeasureInfo(SMInfo);
+                        return;
+                    }
+                    if (!m_DataMgr.SetSampleParamVal(OTS_SAMPLE_PROP_GRID_ITEMS.STOP_PARAM_TIME, OTS_ITEM_TYPES.INT, StopModeDialog.TimeMode))    // Prop值变化,修改样品值成功
+                    {
+                        string sLog = "SampleId = " + SampleId.ToString() + "," + "ValType = " + ValType.ToString() + "," + "ObjVal = " + ObjVal.ToString();
+                        //重新获取原来工作样品值重新设置
+                        if (!m_DataMgr.GetWorkSamplePerameter(m_DataMgr.GetWorkSample(), ref SMInfo))
+                        {
+                            return;
+                        }
+                        //Prop重新获显示工作样品的原来值
+                        DisplaySampleMeasureInfo(SMInfo);
+                        return;
+                    }
+                    if (!m_DataMgr.SetSampleParamVal(OTS_SAMPLE_PROP_GRID_ITEMS.STOP_PARAM_PARTICLE, OTS_ITEM_TYPES.INT, StopModeDialog.ParticleMode))    // Prop值变化,修改样品值成功
+                    {
+                        string sLog = "SampleId = " + SampleId.ToString() + "," + "ValType = " + ValType.ToString() + "," + "ObjVal = " + ObjVal.ToString();
+                        //重新获取原来工作样品值重新设置
+                        if (!m_DataMgr.GetWorkSamplePerameter(m_DataMgr.GetWorkSample(), ref SMInfo))
+                        {
+                            return;
+                        }
+                        //Prop重新获显示工作样品的原来值
+                        DisplaySampleMeasureInfo(SMInfo);
+                        return;
+                    }
+                }
             }
             //更新GROUPID和ITEMID的变化
             OTS_SAMPLE_PROP_GRID_ITEMS ItemID = (OTS_SAMPLE_PROP_GRID_ITEMS)SampleId;
@@ -241,6 +282,26 @@ namespace OTSMeasureApp
             if(m_SampleGrid.m_ClickRow>=0 && m_SampleGrid.m_ClickColumn>=0)
             {
                 m_SampleGrid.SetGridTitleStatus();
+                if(m_SampleGrid.m_ClickRow==9&& m_SampleGrid.m_ClickColumn==2)
+                {
+                    if (StopModeDialog == null)
+                    {
+                        StopModeDialog = new MeasureStopMode();
+                    }
+                    StopModeDialog.FieldMode = int.Parse(PropGrid[m_SampleGrid.m_ClickRow + 2, m_SampleGrid.m_ClickColumn].Value.ToString());
+                    StopModeDialog.TimeMode = int.Parse(PropGrid[m_SampleGrid.m_ClickRow + 3, m_SampleGrid.m_ClickColumn].Value.ToString());
+                    StopModeDialog.ParticleMode = int.Parse(PropGrid[m_SampleGrid.m_ClickRow + 1, m_SampleGrid.m_ClickColumn].Value.ToString());
+                    StopModeDialog.StopMode = PropGrid[m_SampleGrid.m_ClickRow, m_SampleGrid.m_ClickColumn].Value.ToString();
+                    DialogResult result = StopModeDialog.ShowDialog();
+
+                    if (result == DialogResult.OK)
+                    {
+                        PropGrid[m_SampleGrid.m_ClickRow, m_SampleGrid.m_ClickColumn].Value = StopModeDialog.StopMode;
+                        PropGrid[m_SampleGrid.m_ClickRow + 2, m_SampleGrid.m_ClickColumn].Value = StopModeDialog.FieldMode;
+                        PropGrid[m_SampleGrid.m_ClickRow + 3, m_SampleGrid.m_ClickColumn].Value = StopModeDialog.TimeMode;
+                        PropGrid[m_SampleGrid.m_ClickRow + 1, m_SampleGrid.m_ClickColumn].Value = StopModeDialog.ParticleMode;
+                    }
+                }
             }
             
         }

+ 51 - 29
OTSIncAMeasureApp/7-OTSProgMgrInfo/ProgMgrInfoForm.cs

@@ -13,6 +13,7 @@ using static OTSModelSharp.ResourceManage.ResourceData;
 using static OTSDataType.otsdataconst;
 using OTSModelSharp.Measure.GetStageInfo;
 using OTSMeasureApp._0_OTSModel.Measure.ParamData;
+using OTSMeasureApp._3_OTSDisplaySourceGridData;
 
 namespace OTSMeasureApp
 {
@@ -36,6 +37,8 @@ namespace OTSMeasureApp
         public bool m_b_checkstagefile = false;
         //定位程序管理路径用的变量
         public string m_ParameterPath;
+
+        MeasureStopMode StopModeDialog;
         //国际化
         OTSSysMgrTools.Language lan;
         Hashtable table;
@@ -153,19 +156,19 @@ namespace OTSMeasureApp
             if (IDC_COMBO_YDIRECT.Items.Count > 0)
                 IDC_COMBO_YDIRECT.SelectedIndex = 0;
             this.IDC_COMBO_YDIRECT.SelectedIndexChanged += new System.EventHandler(this.IDC_COMBO_YDIRECT_SelectedIndexChanged);
-            //测量终止方式
-            IDC_COMBO_STOPMODE.Items.Clear();
-            foreach (otsdataconst.OTS_MEASURE_STOP_MODE enum_one in Enum.GetValues(typeof(otsdataconst.OTS_MEASURE_STOP_MODE)))
-            {
-                ComboBoxItem cbi = new ComboBoxItem();
-                cbi.Text = GetStopModeIdString(enum_one);
-                cbi.Value = (int)enum_one;
-                IDC_COMBO_STOPMODE.Items.Add(cbi);
-            }
-            this.IDC_COMBO_STOPMODE.SelectedIndexChanged -= new System.EventHandler(this.IDC_COMBO_STOPMODE_SelectedIndexChanged);
-            if (IDC_COMBO_STOPMODE.Items.Count > 0)
-                IDC_COMBO_STOPMODE.SelectedIndex = 0;
-            this.IDC_COMBO_STOPMODE.SelectedIndexChanged += new System.EventHandler(this.IDC_COMBO_STOPMODE_SelectedIndexChanged);
+            ////测量终止方式
+            //IDC_COMBO_STOPMODE.Items.Clear();
+            //foreach (otsdataconst.OTS_MEASURE_STOP_MODE enum_one in Enum.GetValues(typeof(otsdataconst.OTS_MEASURE_STOP_MODE)))
+            //{
+            //    ComboBoxItem cbi = new ComboBoxItem();
+            //    cbi.Text = GetStopModeIdString(enum_one);
+            //    cbi.Value = (int)enum_one;
+            //    IDC_COMBO_STOPMODE.Items.Add(cbi);
+            //}
+            //this.IDC_COMBO_STOPMODE.SelectedIndexChanged -= new System.EventHandler(this.IDC_COMBO_STOPMODE_SelectedIndexChanged);
+            //if (IDC_COMBO_STOPMODE.Items.Count > 0)
+            //    IDC_COMBO_STOPMODE.SelectedIndex = 0;
+            //this.IDC_COMBO_STOPMODE.SelectedIndexChanged += new System.EventHandler(this.IDC_COMBO_STOPMODE_SelectedIndexChanged);
             //取图方式
             IDC_COMBO_FETCHIMGMODE.Items.Clear();
             foreach (otsdataconst.OTS_GET_IMAGE_MODE enum_one in Enum.GetValues(typeof(otsdataconst.OTS_GET_IMAGE_MODE)))
@@ -448,20 +451,13 @@ namespace OTSMeasureApp
         {
 
             //测量终止方式
-            foreach (ComboBoxItem cbi in IDC_COMBO_STOPMODE.Items)
-            {
-                if (cbi.Value.ToString() != "")
-                    if (Convert.ToInt32(cbi.Value) == (int)m_cotsimgscanprm.GetStopMode())
-                    {
-                        IDC_COMBO_STOPMODE.SelectedItem = cbi;
-                    }
-            }
-            //终止时间
-            IDC_EDIT_STOP_TIME.Text = m_cotsimgscanprm.GetStopParamMeasTime().ToString();
-            //终止帧图数
-            IDC_EDIT_STOP_FIELD_NUM.Text = m_cotsimgscanprm.GetStopParamFields().ToString();
-            //终止夹杂物数
-            IDC_EDIT_STOP_INCA_NUM.Text = m_cotsimgscanprm.GetStopParamParticles().ToString();
+            tB_StopMode.Text = m_cotsimgscanprm.GetStopMode().ToString();
+            ////终止时间
+            //IDC_EDIT_STOP_TIME.Text = m_cotsimgscanprm.GetStopParamMeasTime().ToString();
+            ////终止帧图数
+            //IDC_EDIT_STOP_FIELD_NUM.Text = m_cotsimgscanprm.GetStopParamFields().ToString();
+            ////终止夹杂物数
+            //IDC_EDIT_STOP_INCA_NUM.Text = m_cotsimgscanprm.GetStopParamParticles().ToString();
             //取图方式
             foreach (ComboBoxItem cbi in IDC_COMBO_FETCHIMGMODE.Items)
             {
@@ -713,8 +709,7 @@ namespace OTSMeasureApp
             //  保存图像扫描参数");
 
             //测量终止方式
-            ComboBoxItem enum_stopmode = (ComboBoxItem)IDC_COMBO_STOPMODE.SelectedItem;
-            m_cotsimgscanprm.SetStopMode((otsdataconst.OTS_MEASURE_STOP_MODE)Convert.ToInt32(enum_stopmode.Value));
+            m_cotsimgscanprm.SetStopMode(tB_StopMode.Text);
 
             //终止时间
             m_cotsimgscanprm.SetStopParamMeasTime(Convert.ToInt32(IDC_EDIT_STOP_TIME.Text));
@@ -2045,6 +2040,33 @@ namespace OTSMeasureApp
         {
             System.Diagnostics.Process.Start("notepad.exe",CSpecialGrayRangeParam.GetParamFileFullName());
         }
+
+        private void btn_StopMode_Click(object sender, EventArgs e)
+        {
+            if (StopModeDialog == null)
+            {
+                StopModeDialog = new MeasureStopMode();
+                StopModeDialog.FieldMode = m_cotsimgscanprm.GetStopParamFields();
+                StopModeDialog.TimeMode = m_cotsimgscanprm.GetStopParamMeasTime();
+                StopModeDialog.ParticleMode = m_cotsimgscanprm.GetStopParamParticles();
+                StopModeDialog.StopMode = tB_StopMode.Text;
+            }
+            DialogResult result = StopModeDialog.ShowDialog();
+
+            if (result == DialogResult.OK)
+            {
+                string[] rst = StopModeDialog.StopMode.Split(',');
+                string str = "";
+                for (int k = 0; k < rst.Length; k++)
+                {
+                    str += rst[k].Split(':')[0] + " + ";
+                }
+                tB_StopMode.Text = str.Substring(0, str.Length - 3);
+                IDC_EDIT_STOP_TIME.Text = StopModeDialog.TimeMode.ToString();
+                IDC_EDIT_STOP_FIELD_NUM.Text = StopModeDialog.FieldMode.ToString();
+                IDC_EDIT_STOP_INCA_NUM.Text = StopModeDialog.ParticleMode.ToString();
+            }
+        }
     }
     public class ComboBoxItem
     {

+ 81 - 69
OTSIncAMeasureApp/7-OTSProgMgrInfo/ProgMgrInfoForm.designer.cs

@@ -51,6 +51,8 @@
             this.label3 = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
             this.groupBox3 = new System.Windows.Forms.GroupBox();
+            this.tB_StopMode = new System.Windows.Forms.TextBox();
+            this.btn_StopMode = new System.Windows.Forms.Button();
             this.IDC_EDIT_STOP_INCA_NUM = new System.Windows.Forms.TextBox();
             this.IDC_EDIT_STOP_FIELD_NUM = new System.Windows.Forms.TextBox();
             this.IDC_EDIT_STOP_TIME = new System.Windows.Forms.TextBox();
@@ -58,7 +60,6 @@
             this.IDC_COMBO_IMGSIZE = new System.Windows.Forms.ComboBox();
             this.IDC_COMBO_IMGSCANSPEED = new System.Windows.Forms.ComboBox();
             this.IDC_COMBO_FETCHIMGMODE = new System.Windows.Forms.ComboBox();
-            this.IDC_COMBO_STOPMODE = new System.Windows.Forms.ComboBox();
             this.label12 = new System.Windows.Forms.Label();
             this.label11 = new System.Windows.Forms.Label();
             this.label10 = new System.Windows.Forms.Label();
@@ -121,6 +122,8 @@
             this.IDC_BACK_MAX_SWITCH = new System.Windows.Forms.CheckBox();
             this.IDC_PART_MAX_SWITCH = new System.Windows.Forms.CheckBox();
             this.groupBox6 = new System.Windows.Forms.GroupBox();
+            this.IDC_EDIT_XrayLimit = new System.Windows.Forms.TextBox();
+            this.label47 = new System.Windows.Forms.Label();
             this.IDC_EDIT_SmallPartAQTime = new System.Windows.Forms.TextBox();
             this.label45 = new System.Windows.Forms.Label();
             this.label46 = new System.Windows.Forms.Label();
@@ -152,8 +155,6 @@
             this.lbModelSel = new System.Windows.Forms.Label();
             this.IDC_COMBO_Model = new System.Windows.Forms.ComboBox();
             this.groupBox7 = new System.Windows.Forms.GroupBox();
-            this.label47 = new System.Windows.Forms.Label();
-            this.IDC_EDIT_XrayLimit = new System.Windows.Forms.TextBox();
             this.groupBox1.SuspendLayout();
             this.groupBox2.SuspendLayout();
             this.groupBox3.SuspendLayout();
@@ -402,32 +403,45 @@
             // 
             // groupBox3
             // 
-            this.groupBox3.Controls.Add(this.IDC_EDIT_STOP_INCA_NUM);
-            this.groupBox3.Controls.Add(this.IDC_EDIT_STOP_FIELD_NUM);
-            this.groupBox3.Controls.Add(this.IDC_EDIT_STOP_TIME);
+            this.groupBox3.Controls.Add(this.tB_StopMode);
+            this.groupBox3.Controls.Add(this.btn_StopMode);
             this.groupBox3.Controls.Add(this.label13);
             this.groupBox3.Controls.Add(this.IDC_COMBO_IMGSIZE);
             this.groupBox3.Controls.Add(this.IDC_COMBO_IMGSCANSPEED);
             this.groupBox3.Controls.Add(this.IDC_COMBO_FETCHIMGMODE);
-            this.groupBox3.Controls.Add(this.IDC_COMBO_STOPMODE);
             this.groupBox3.Controls.Add(this.label12);
             this.groupBox3.Controls.Add(this.label11);
-            this.groupBox3.Controls.Add(this.label10);
-            this.groupBox3.Controls.Add(this.label9);
-            this.groupBox3.Controls.Add(this.label8);
             this.groupBox3.Controls.Add(this.label7);
-            this.groupBox3.Location = new System.Drawing.Point(8, 530);
+            this.groupBox3.Location = new System.Drawing.Point(8, 540);
             this.groupBox3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.groupBox3.Name = "groupBox3";
             this.groupBox3.Padding = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.groupBox3.Size = new System.Drawing.Size(408, 225);
+            this.groupBox3.Size = new System.Drawing.Size(408, 197);
             this.groupBox3.TabIndex = 230;
             this.groupBox3.TabStop = false;
             this.groupBox3.Text = "图像扫描参数";
             // 
+            // tB_StopMode
+            // 
+            this.tB_StopMode.Location = new System.Drawing.Point(143, 23);
+            this.tB_StopMode.Name = "tB_StopMode";
+            this.tB_StopMode.ReadOnly = true;
+            this.tB_StopMode.Size = new System.Drawing.Size(174, 25);
+            this.tB_StopMode.TabIndex = 372;
+            // 
+            // btn_StopMode
+            // 
+            this.btn_StopMode.Location = new System.Drawing.Point(323, 23);
+            this.btn_StopMode.Name = "btn_StopMode";
+            this.btn_StopMode.Size = new System.Drawing.Size(60, 29);
+            this.btn_StopMode.TabIndex = 371;
+            this.btn_StopMode.Text = "选择";
+            this.btn_StopMode.UseVisualStyleBackColor = true;
+            this.btn_StopMode.Click += new System.EventHandler(this.btn_StopMode_Click);
+            // 
             // IDC_EDIT_STOP_INCA_NUM
             // 
-            this.IDC_EDIT_STOP_INCA_NUM.Location = new System.Drawing.Point(228, 106);
+            this.IDC_EDIT_STOP_INCA_NUM.Location = new System.Drawing.Point(955, 647);
             this.IDC_EDIT_STOP_INCA_NUM.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.IDC_EDIT_STOP_INCA_NUM.MaxLength = 10;
             this.IDC_EDIT_STOP_INCA_NUM.Name = "IDC_EDIT_STOP_INCA_NUM";
@@ -438,7 +452,7 @@
             // 
             // IDC_EDIT_STOP_FIELD_NUM
             // 
-            this.IDC_EDIT_STOP_FIELD_NUM.Location = new System.Drawing.Point(228, 76);
+            this.IDC_EDIT_STOP_FIELD_NUM.Location = new System.Drawing.Point(955, 617);
             this.IDC_EDIT_STOP_FIELD_NUM.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.IDC_EDIT_STOP_FIELD_NUM.MaxLength = 10;
             this.IDC_EDIT_STOP_FIELD_NUM.Name = "IDC_EDIT_STOP_FIELD_NUM";
@@ -449,7 +463,7 @@
             // 
             // IDC_EDIT_STOP_TIME
             // 
-            this.IDC_EDIT_STOP_TIME.Location = new System.Drawing.Point(228, 48);
+            this.IDC_EDIT_STOP_TIME.Location = new System.Drawing.Point(955, 589);
             this.IDC_EDIT_STOP_TIME.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.IDC_EDIT_STOP_TIME.MaxLength = 10;
             this.IDC_EDIT_STOP_TIME.Name = "IDC_EDIT_STOP_TIME";
@@ -461,7 +475,7 @@
             // label13
             // 
             this.label13.AutoSize = true;
-            this.label13.Location = new System.Drawing.Point(8, 192);
+            this.label13.Location = new System.Drawing.Point(8, 154);
             this.label13.Name = "label13";
             this.label13.Size = new System.Drawing.Size(82, 15);
             this.label13.TabIndex = 360;
@@ -471,10 +485,10 @@
             // 
             this.IDC_COMBO_IMGSIZE.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.IDC_COMBO_IMGSIZE.FormattingEnabled = true;
-            this.IDC_COMBO_IMGSIZE.Location = new System.Drawing.Point(157, 190);
+            this.IDC_COMBO_IMGSIZE.Location = new System.Drawing.Point(144, 152);
             this.IDC_COMBO_IMGSIZE.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.IDC_COMBO_IMGSIZE.Name = "IDC_COMBO_IMGSIZE";
-            this.IDC_COMBO_IMGSIZE.Size = new System.Drawing.Size(227, 23);
+            this.IDC_COMBO_IMGSIZE.Size = new System.Drawing.Size(240, 23);
             this.IDC_COMBO_IMGSIZE.TabIndex = 370;
             this.IDC_COMBO_IMGSIZE.SelectedIndexChanged += new System.EventHandler(this.IDC_COMBO_IMGSIZE_SelectedIndexChanged);
             // 
@@ -482,10 +496,10 @@
             // 
             this.IDC_COMBO_IMGSCANSPEED.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.IDC_COMBO_IMGSCANSPEED.FormattingEnabled = true;
-            this.IDC_COMBO_IMGSCANSPEED.Location = new System.Drawing.Point(157, 162);
+            this.IDC_COMBO_IMGSCANSPEED.Location = new System.Drawing.Point(144, 108);
             this.IDC_COMBO_IMGSCANSPEED.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.IDC_COMBO_IMGSCANSPEED.Name = "IDC_COMBO_IMGSCANSPEED";
-            this.IDC_COMBO_IMGSCANSPEED.Size = new System.Drawing.Size(227, 23);
+            this.IDC_COMBO_IMGSCANSPEED.Size = new System.Drawing.Size(240, 23);
             this.IDC_COMBO_IMGSCANSPEED.TabIndex = 350;
             this.IDC_COMBO_IMGSCANSPEED.SelectedIndexChanged += new System.EventHandler(this.IDC_COMBO_IMGSCANSPEED_SelectedIndexChanged);
             // 
@@ -493,28 +507,17 @@
             // 
             this.IDC_COMBO_FETCHIMGMODE.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.IDC_COMBO_FETCHIMGMODE.FormattingEnabled = true;
-            this.IDC_COMBO_FETCHIMGMODE.Location = new System.Drawing.Point(157, 135);
+            this.IDC_COMBO_FETCHIMGMODE.Location = new System.Drawing.Point(144, 66);
             this.IDC_COMBO_FETCHIMGMODE.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.IDC_COMBO_FETCHIMGMODE.Name = "IDC_COMBO_FETCHIMGMODE";
-            this.IDC_COMBO_FETCHIMGMODE.Size = new System.Drawing.Size(227, 23);
+            this.IDC_COMBO_FETCHIMGMODE.Size = new System.Drawing.Size(240, 23);
             this.IDC_COMBO_FETCHIMGMODE.TabIndex = 330;
             this.IDC_COMBO_FETCHIMGMODE.SelectedIndexChanged += new System.EventHandler(this.IDC_COMBO_FETCHIMGMODE_SelectedIndexChanged);
             // 
-            // IDC_COMBO_STOPMODE
-            // 
-            this.IDC_COMBO_STOPMODE.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
-            this.IDC_COMBO_STOPMODE.FormattingEnabled = true;
-            this.IDC_COMBO_STOPMODE.Location = new System.Drawing.Point(167, 20);
-            this.IDC_COMBO_STOPMODE.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.IDC_COMBO_STOPMODE.Name = "IDC_COMBO_STOPMODE";
-            this.IDC_COMBO_STOPMODE.Size = new System.Drawing.Size(217, 23);
-            this.IDC_COMBO_STOPMODE.TabIndex = 250;
-            this.IDC_COMBO_STOPMODE.SelectedIndexChanged += new System.EventHandler(this.IDC_COMBO_STOPMODE_SelectedIndexChanged);
-            // 
             // label12
             // 
             this.label12.AutoSize = true;
-            this.label12.Location = new System.Drawing.Point(8, 165);
+            this.label12.Location = new System.Drawing.Point(7, 111);
             this.label12.Name = "label12";
             this.label12.Size = new System.Drawing.Size(82, 15);
             this.label12.TabIndex = 340;
@@ -523,7 +526,7 @@
             // label11
             // 
             this.label11.AutoSize = true;
-            this.label11.Location = new System.Drawing.Point(8, 138);
+            this.label11.Location = new System.Drawing.Point(8, 69);
             this.label11.Name = "label11";
             this.label11.Size = new System.Drawing.Size(67, 15);
             this.label11.TabIndex = 320;
@@ -532,7 +535,7 @@
             // label10
             // 
             this.label10.AutoSize = true;
-            this.label10.Location = new System.Drawing.Point(8, 109);
+            this.label10.Location = new System.Drawing.Point(841, 653);
             this.label10.Name = "label10";
             this.label10.Size = new System.Drawing.Size(97, 15);
             this.label10.TabIndex = 300;
@@ -541,7 +544,7 @@
             // label9
             // 
             this.label9.AutoSize = true;
-            this.label9.Location = new System.Drawing.Point(8, 79);
+            this.label9.Location = new System.Drawing.Point(841, 623);
             this.label9.Name = "label9";
             this.label9.Size = new System.Drawing.Size(82, 15);
             this.label9.TabIndex = 280;
@@ -550,7 +553,7 @@
             // label8
             // 
             this.label8.AutoSize = true;
-            this.label8.Location = new System.Drawing.Point(8, 50);
+            this.label8.Location = new System.Drawing.Point(841, 594);
             this.label8.Name = "label8";
             this.label8.Size = new System.Drawing.Size(98, 15);
             this.label8.TabIndex = 260;
@@ -559,7 +562,7 @@
             // label7
             // 
             this.label7.AutoSize = true;
-            this.label7.Location = new System.Drawing.Point(8, 22);
+            this.label7.Location = new System.Drawing.Point(7, 26);
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(97, 15);
             this.label7.TabIndex = 240;
@@ -904,7 +907,7 @@
             // button1
             // 
             this.button1.Location = new System.Drawing.Point(23, 199);
-            this.button1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.button1.Margin = new System.Windows.Forms.Padding(4);
             this.button1.Name = "button1";
             this.button1.Size = new System.Drawing.Size(260, 28);
             this.button1.TabIndex = 823;
@@ -1186,16 +1189,34 @@
             this.groupBox6.Location = new System.Drawing.Point(425, 94);
             this.groupBox6.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.groupBox6.Name = "groupBox6";
-            this.groupBox6.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.groupBox6.Padding = new System.Windows.Forms.Padding(4);
             this.groupBox6.Size = new System.Drawing.Size(408, 234);
             this.groupBox6.TabIndex = 700;
             this.groupBox6.TabStop = false;
             this.groupBox6.Text = "X-ray参数";
             // 
+            // IDC_EDIT_XrayLimit
+            // 
+            this.IDC_EDIT_XrayLimit.Location = new System.Drawing.Point(188, 203);
+            this.IDC_EDIT_XrayLimit.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.IDC_EDIT_XrayLimit.MaxLength = 10;
+            this.IDC_EDIT_XrayLimit.Name = "IDC_EDIT_XrayLimit";
+            this.IDC_EDIT_XrayLimit.Size = new System.Drawing.Size(199, 25);
+            this.IDC_EDIT_XrayLimit.TabIndex = 834;
+            // 
+            // label47
+            // 
+            this.label47.AutoSize = true;
+            this.label47.Location = new System.Drawing.Point(12, 206);
+            this.label47.Name = "label47";
+            this.label47.Size = new System.Drawing.Size(67, 15);
+            this.label47.TabIndex = 833;
+            this.label47.Text = "数量限值";
+            // 
             // IDC_EDIT_SmallPartAQTime
             // 
             this.IDC_EDIT_SmallPartAQTime.Location = new System.Drawing.Point(189, 141);
-            this.IDC_EDIT_SmallPartAQTime.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.IDC_EDIT_SmallPartAQTime.Margin = new System.Windows.Forms.Padding(4);
             this.IDC_EDIT_SmallPartAQTime.MaxLength = 10;
             this.IDC_EDIT_SmallPartAQTime.Name = "IDC_EDIT_SmallPartAQTime";
             this.IDC_EDIT_SmallPartAQTime.Size = new System.Drawing.Size(155, 25);
@@ -1223,7 +1244,7 @@
             // IDC_EDIT_QuantifyMinSize
             // 
             this.IDC_EDIT_QuantifyMinSize.Location = new System.Drawing.Point(189, 79);
-            this.IDC_EDIT_QuantifyMinSize.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.IDC_EDIT_QuantifyMinSize.Margin = new System.Windows.Forms.Padding(4);
             this.IDC_EDIT_QuantifyMinSize.MaxLength = 10;
             this.IDC_EDIT_QuantifyMinSize.Name = "IDC_EDIT_QuantifyMinSize";
             this.IDC_EDIT_QuantifyMinSize.Size = new System.Drawing.Size(155, 25);
@@ -1332,7 +1353,7 @@
             // IDC_TEXTBOX_ANALYXRAYSPEED_TIME
             // 
             this.IDC_TEXTBOX_ANALYXRAYSPEED_TIME.Location = new System.Drawing.Point(189, 109);
-            this.IDC_TEXTBOX_ANALYXRAYSPEED_TIME.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.IDC_TEXTBOX_ANALYXRAYSPEED_TIME.Margin = new System.Windows.Forms.Padding(4);
             this.IDC_TEXTBOX_ANALYXRAYSPEED_TIME.MaxLength = 10;
             this.IDC_TEXTBOX_ANALYXRAYSPEED_TIME.Name = "IDC_TEXTBOX_ANALYXRAYSPEED_TIME";
             this.IDC_TEXTBOX_ANALYXRAYSPEED_TIME.Size = new System.Drawing.Size(155, 25);
@@ -1344,7 +1365,7 @@
             this.IDC_COMBO_ANALYXRAYSPEED.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.IDC_COMBO_ANALYXRAYSPEED.FormattingEnabled = true;
             this.IDC_COMBO_ANALYXRAYSPEED.Location = new System.Drawing.Point(48, 315);
-            this.IDC_COMBO_ANALYXRAYSPEED.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.IDC_COMBO_ANALYXRAYSPEED.Margin = new System.Windows.Forms.Padding(4);
             this.IDC_COMBO_ANALYXRAYSPEED.Name = "IDC_COMBO_ANALYXRAYSPEED";
             this.IDC_COMBO_ANALYXRAYSPEED.Size = new System.Drawing.Size(95, 23);
             this.IDC_COMBO_ANALYXRAYSPEED.TabIndex = 780;
@@ -1443,7 +1464,7 @@
             // 
             // btnok
             // 
-            this.btnok.Location = new System.Drawing.Point(614, 722);
+            this.btnok.Location = new System.Drawing.Point(613, 709);
             this.btnok.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.btnok.Name = "btnok";
             this.btnok.Size = new System.Drawing.Size(88, 28);
@@ -1454,7 +1475,7 @@
             // 
             // btncancel
             // 
-            this.btncancel.Location = new System.Drawing.Point(724, 722);
+            this.btncancel.Location = new System.Drawing.Point(724, 709);
             this.btncancel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.btncancel.Name = "btncancel";
             this.btncancel.Size = new System.Drawing.Size(88, 28);
@@ -1492,40 +1513,25 @@
             this.groupBox7.Controls.Add(this.lbModelSel);
             this.groupBox7.Controls.Add(this.IDC_COMBO_Model);
             this.groupBox7.Location = new System.Drawing.Point(8, 2);
-            this.groupBox7.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.groupBox7.Margin = new System.Windows.Forms.Padding(4);
             this.groupBox7.Name = "groupBox7";
-            this.groupBox7.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.groupBox7.Padding = new System.Windows.Forms.Padding(4);
             this.groupBox7.Size = new System.Drawing.Size(403, 71);
             this.groupBox7.TabIndex = 822;
             this.groupBox7.TabStop = false;
             this.groupBox7.Text = "模式选择";
             // 
-            // label47
-            // 
-            this.label47.AutoSize = true;
-            this.label47.Location = new System.Drawing.Point(12, 206);
-            this.label47.Name = "label47";
-            this.label47.Size = new System.Drawing.Size(67, 15);
-            this.label47.TabIndex = 833;
-            this.label47.Text = "数量限值";
-            // 
-            // IDC_EDIT_XrayLimit
-            // 
-            this.IDC_EDIT_XrayLimit.Location = new System.Drawing.Point(188, 203);
-            this.IDC_EDIT_XrayLimit.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
-            this.IDC_EDIT_XrayLimit.MaxLength = 10;
-            this.IDC_EDIT_XrayLimit.Name = "IDC_EDIT_XrayLimit";
-            this.IDC_EDIT_XrayLimit.Size = new System.Drawing.Size(199, 25);
-            this.IDC_EDIT_XrayLimit.TabIndex = 834;
-            // 
             // ProgMgrInfoForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(835, 759);
+            this.ClientSize = new System.Drawing.Size(834, 742);
             this.Controls.Add(this.IDC_IMAGE_SIZE_SWITCH);
             this.Controls.Add(this.groupBox7);
+            this.Controls.Add(this.IDC_EDIT_STOP_INCA_NUM);
             this.Controls.Add(this.IDC_SCAN_SPEED_SWITCH);
+            this.Controls.Add(this.IDC_EDIT_STOP_FIELD_NUM);
+            this.Controls.Add(this.IDC_EDIT_STOP_TIME);
             this.Controls.Add(this.btncancel);
             this.Controls.Add(this.IDC_FETCH_IMAGE_SWITCH);
             this.Controls.Add(this.IDC_XRAY_COUNT_SWITCH);
@@ -1533,8 +1539,11 @@
             this.Controls.Add(this.btnok);
             this.Controls.Add(this.IDC_STOP_FIELD_SWITCH);
             this.Controls.Add(this.IDC_PART_GRAY_MIN_SWITCH);
+            this.Controls.Add(this.label10);
             this.Controls.Add(this.IDC_STOP_TIME_SWITCH);
+            this.Controls.Add(this.label9);
             this.Controls.Add(this.IDC_XRAY_TIME_SWITCH);
+            this.Controls.Add(this.label8);
             this.Controls.Add(this.IDC_STOP_MODE_SWITCH);
             this.Controls.Add(this.IDC_BACK_MIN_SWITCH);
             this.Controls.Add(this.groupBox6);
@@ -1551,7 +1560,9 @@
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
             this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.MaximizeBox = false;
+            this.MaximumSize = new System.Drawing.Size(852, 789);
             this.MinimizeBox = false;
+            this.MinimumSize = new System.Drawing.Size(852, 789);
             this.Name = "ProgMgrInfoForm";
             this.ShowIcon = false;
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
@@ -1622,7 +1633,6 @@
         public System.Windows.Forms.Button IDC_BUTTON_STAGE;
         public System.Windows.Forms.ComboBox IDC_COMBO_YDIRECT;
         public System.Windows.Forms.ComboBox IDC_COMBO_XDIREC;
-        public System.Windows.Forms.ComboBox IDC_COMBO_STOPMODE;
         public System.Windows.Forms.ComboBox IDC_COMBO_IMGSIZE;
         public System.Windows.Forms.ComboBox IDC_COMBO_IMGSCANSPEED;
         public System.Windows.Forms.ComboBox IDC_COMBO_FETCHIMGMODE;
@@ -1704,5 +1714,7 @@
         private System.Windows.Forms.Label label40;
         public System.Windows.Forms.TextBox IDC_EDIT_XrayLimit;
         private System.Windows.Forms.Label label47;
+        private System.Windows.Forms.TextBox tB_StopMode;
+        private System.Windows.Forms.Button btn_StopMode;
     }
 }

+ 9 - 0
OTSIncAMeasureApp/OTSIncAMeasureApp.csproj

@@ -247,6 +247,12 @@
     <Compile Include="0-OTSModel\OTSDataType\SEMStageData.cs" />
     <Compile Include="0-OTSModel\OTSDataType\XmlResourceData.cs" />
     <Compile Include="0-OTSModel\OTSDataType\XMLSerialization.cs" />
+    <Compile Include="3-OTSDisplaySourceGridData\MeasureStopMode.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="3-OTSDisplaySourceGridData\MeasureStopMode.Designer.cs">
+      <DependentUpon>MeasureStopMode.cs</DependentUpon>
+    </Compile>
     <Compile Include="5-OTSMeasureStatuImageFun\frmSpecialGrayParticle.cs">
       <SubType>Form</SubType>
     </Compile>
@@ -445,6 +451,9 @@
     <EmbeddedResource Include="0-OTSModel\Measure\ParamData\DIALOG_CHECK_PARAM_RESULT.resx">
       <DependentUpon>DIALOG_CHECK_PARAM_RESULT.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="3-OTSDisplaySourceGridData\MeasureStopMode.resx">
+      <DependentUpon>MeasureStopMode.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="5-OTSMeasureStatuImageFun\Control_Ruler.resx">
       <DependentUpon>Control_Ruler.cs</DependentUpon>
     </EmbeddedResource>

+ 16 - 16
OTSIncAMeasureApp/OTSIncAMeasureAppForm.Designer.cs

@@ -168,7 +168,7 @@
             this.rbMenu.BorderMode = System.Windows.Forms.RibbonWindowMode.InsideWindow;
             this.rbMenu.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F);
             this.rbMenu.Location = new System.Drawing.Point(0, 0);
-            this.rbMenu.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.rbMenu.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
             this.rbMenu.Minimized = true;
             this.rbMenu.Name = "rbMenu";
             // 
@@ -202,7 +202,7 @@
             this.rbMenu.QuickAcessToolbar.Image = null;
             this.rbMenu.QuickAcessToolbar.Tag = null;
             this.rbMenu.QuickAcessToolbar.ToolTipImage = null;
-            this.rbMenu.Size = new System.Drawing.Size(1277, 130);
+            this.rbMenu.Size = new System.Drawing.Size(1703, 130);
             this.rbMenu.TabIndex = 0;
             this.rbMenu.Tabs.Add(this.rbTabHome);
             this.rbMenu.Tabs.Add(this.rbTabView);
@@ -635,8 +635,8 @@
             this.rbAutoBeamOff.AltKey = null;
             this.rbAutoBeamOff.DropDownArrowDirection = System.Windows.Forms.RibbonArrowDirection.Down;
             this.rbAutoBeamOff.DropDownArrowSize = new System.Drawing.Size(3, 3);
-            this.rbAutoBeamOff.Image = global::OTSMeasureApp.Properties.Resources.AutoBeamOff_on;
-            this.rbAutoBeamOff.SmallImage = global::OTSMeasureApp.Properties.Resources.Add_Sample16;
+            this.rbAutoBeamOff.Image = global::OTSMeasureApp.Properties.Resources.AutoBeamOff_off;
+            this.rbAutoBeamOff.SmallImage = global::OTSMeasureApp.Properties.Resources.AutoBeamOff_off;
             this.rbAutoBeamOff.Style = System.Windows.Forms.RibbonButtonStyle.Normal;
             this.rbAutoBeamOff.Tag = "rbAutoBeamOff";
             this.rbAutoBeamOff.Text = "自动关枪";
@@ -848,11 +848,11 @@
             this.TSGrayVal,
             this.STSemCoordinate,
             this.toolStripStatusLabel1});
-            this.statusStrip1.Location = new System.Drawing.Point(0, 671);
+            this.statusStrip1.Location = new System.Drawing.Point(0, 841);
             this.statusStrip1.Name = "statusStrip1";
-            this.statusStrip1.Padding = new System.Windows.Forms.Padding(2, 0, 14, 0);
+            this.statusStrip1.Padding = new System.Windows.Forms.Padding(3, 0, 19, 0);
             this.statusStrip1.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
-            this.statusStrip1.Size = new System.Drawing.Size(1277, 26);
+            this.statusStrip1.Size = new System.Drawing.Size(1703, 30);
             this.statusStrip1.TabIndex = 2;
             this.statusStrip1.Text = "statusStrip1";
             // 
@@ -860,20 +860,20 @@
             // 
             this.TSGrayVal.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right;
             this.TSGrayVal.Name = "TSGrayVal";
-            this.TSGrayVal.Size = new System.Drawing.Size(48, 21);
+            this.TSGrayVal.Size = new System.Drawing.Size(58, 24);
             this.TSGrayVal.Text = "灰度值";
             // 
             // STSemCoordinate
             // 
             this.STSemCoordinate.BorderSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.Right;
             this.STSemCoordinate.Name = "STSemCoordinate";
-            this.STSemCoordinate.Size = new System.Drawing.Size(62, 21);
+            this.STSemCoordinate.Size = new System.Drawing.Size(75, 24);
             this.STSemCoordinate.Text = "SEM坐标";
             // 
             // toolStripStatusLabel1
             // 
             this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
-            this.toolStripStatusLabel1.Size = new System.Drawing.Size(54, 21);
+            this.toolStripStatusLabel1.Size = new System.Drawing.Size(65, 24);
             this.toolStripStatusLabel1.Text = "IsReady";
             this.toolStripStatusLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
             this.toolStripStatusLabel1.Visible = false;
@@ -888,9 +888,9 @@
             this.dockPanel.DockLeftPortion = 0.21D;
             this.dockPanel.DockRightPortion = 0.27D;
             this.dockPanel.Location = new System.Drawing.Point(0, 130);
-            this.dockPanel.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
+            this.dockPanel.Margin = new System.Windows.Forms.Padding(8, 8, 8, 8);
             this.dockPanel.Name = "dockPanel";
-            this.dockPanel.Size = new System.Drawing.Size(1277, 541);
+            this.dockPanel.Size = new System.Drawing.Size(1703, 711);
             dockPanelGradient1.EndColor = System.Drawing.SystemColors.ControlLight;
             dockPanelGradient1.StartColor = System.Drawing.SystemColors.ControlLight;
             autoHideStripSkin1.DockStripGradient = dockPanelGradient1;
@@ -967,9 +967,9 @@
             // 
             // OTSIncAMeasureAppForm
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1277, 697);
+            this.ClientSize = new System.Drawing.Size(1703, 871);
             this.Controls.Add(this.dockPanel);
             this.Controls.Add(this.statusStrip1);
             this.Controls.Add(this.rbMenu);
@@ -977,8 +977,8 @@
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
             this.IsMdiContainer = true;
             this.KeyPreview = true;
-            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
-            this.MinimumSize = new System.Drawing.Size(680, 505);
+            this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
+            this.MinimumSize = new System.Drawing.Size(901, 619);
             this.Name = "OTSIncAMeasureAppForm";
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
             this.Text = "OTSMeasureApp";