Sfoglia il codice sorgente

修改runmodel无法保存bug

CXS 4 anni fa
parent
commit
1c47e657ed

+ 9 - 2
OTSIncAMeasureApp/0-OTSModel/Measure/GetParamData/OTSDefaultParam.cs

@@ -220,6 +220,13 @@ namespace OTSModelSharp
             return m_nPackId.ToString();
         }
 
+        public RunMode GetRunMode()
+        {
+            return m_runmode;
+        }
+
+
+
         // get software pack preference file path name
         public String GetOTSMeasurePrefFileName()
         {
@@ -389,10 +396,10 @@ namespace OTSModelSharp
                 }
                 switch (xRunMode.value())
                 {
-                    case "Proffectional":
+                    case "ProfessionalMode":
                         this.m_runmode = otsdataconst.RunMode.ProfessionalMode;
                         break;
-                    case "Plain":
+                    case "PlainMode":
                         this.m_runmode = RunMode.PlainMode;
                         break;
                     default:

+ 0 - 4
OTSIncAMeasureApp/0-OTSModel/Measure/GetParamData/OTSGeneralParam.cs

@@ -106,10 +106,6 @@ namespace OTSModelSharp
         {
             return m_nPropertyDisplayMode;
         }
-        public void SetPropertyDisplayMode(int a_PropertyDisplayMode)
-        {
-            m_nPropertyDisplayMode = a_PropertyDisplayMode;
-        }
         public string GetLaboratoty()
         {
             return m_strLaboratoty;

+ 10 - 8
OTSIncAMeasureApp/7-OTSProgMgrInfo/ProgMgrInfoForm.cs

@@ -560,17 +560,23 @@ namespace OTSMeasureApp
                     }
             }
 
+            
+        }
+        /// <summary>
+        /// 加载默认参数
+        /// </summary>
+        public void LoadDefaultParam()
+        {
             //模式
             foreach (OTSPeriodicTable.ComboBoxItem cbi in IDC_COMBO_Model.Items)
             {
                 if (cbi.Value.ToString() != "")
-                    if (Convert.ToInt32(cbi.Value) == m_cgenparam.PropertyDisplayMode())
+                    if (Convert.ToInt32(cbi.Value) == (int)m_cotsprogmgrparamfile.GetRunMode())
                     {
                         IDC_COMBO_Model.SelectedItem = cbi;
                     }
             }
         }
-
         /// <summary>
         /// 加载图像处理参数
         /// </summary>
@@ -783,10 +789,6 @@ namespace OTSMeasureApp
             //标准库选择
             ComboBoxItem enum_STDLIBSELECT = (ComboBoxItem)IDC_COMBO_STDSelect.SelectedItem;
             m_cgenparam.SetSTDSelect(enum_STDLIBSELECT.Text.ToString());
-
-            //模式选择
-            OTSPeriodicTable.ComboBoxItem enum_Model = (OTSPeriodicTable.ComboBoxItem)IDC_COMBO_Model.SelectedItem;
-            m_cgenparam.SetPropertyDisplayMode(Convert.ToInt32(enum_Model.Value));
         }
 
         /// <summary>
@@ -941,7 +943,7 @@ namespace OTSMeasureApp
             BindComboBox();
 
             //加载相关参数信息
-           
+            LoadDefaultParam();
             LoadSEMStageData();
             LoadImageScanPrm();
             LoadCGenParam();
@@ -1646,7 +1648,7 @@ namespace OTSMeasureApp
             }
 
             //先把各个值都保存到各类
-
+            m_cotsprogmgrparamfile.m_runmode = (RunMode)IDC_COMBO_Model.SelectedIndex; 
             SaveSEMStageData();
             SaveImageScanPrm();
             SaveCGenParam();