浏览代码

修改一些系统默认参数无下拉列表的bug
程序管理OTSSysMgrApp中增加 程序类型选择 功能

cxs 1 年之前
父节点
当前提交
99fd754e89

+ 2 - 2
Bin/x64/Debug/Config/ProData/HardwareConfig.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <XMLData PathName="HardwareConfig.xml" ID="1">
-  <Member RegName="SemControllerName" Value="Oxford" ImageInputSources="SE" />
-  <Member RegName="EDSName" Value="Oxford" />
+  <Member RegName="SemControllerName" Value="OffLine" ImageInputSources="SE" />
+  <Member RegName="EDSName" Value="OffLine" />
   <Member RegName="BrukerDllVersion" Version="Bruker.API.Esprit64.dll" />
   <Member RegName="FEIIP" Value="192.168.0.1" />
   <Member RegName="FEIPORT" Value="7520" />

+ 1 - 1
Bin/x64/Debug/Config/SysData/OTSStage.stg

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<XMLData Modify="false" PathName=".\Config\SysData\OTSStage.stg" WorkingStageId="0">
+<XMLData Modify="true" PathName=".\Config\SysData\OTSStage.stg" WorkingStageId="0">
   <Collection RegName="Stagelist">
     <Member strName="圆形九圆孔50mm">
       <Member RegName="boundary" PolygonPoint="" rectDomian="0,0,50000,0" shape="0:ROUND" />

+ 7 - 7
Bin/x64/Debug/Resources/XMLData/ResourceForMeasureSourceGrid-ZH.xml

@@ -373,10 +373,10 @@
         <member itemKey="12262" itemName="" itemText="自上而下"/>
         <member itemKey="12263" itemName="" itemText="自下而上"/>
         <member itemKey="12264" itemName="" itemText="随机"/>
-        <member itemKey="12265" itemName="" itemText=""/>
-        <member itemKey="12266" itemName="" itemText=""/>
-        <member itemKey="12267" itemName="" itemText=""/>
-        <member itemKey="12268" itemName="" itemText=""/>
+        <member itemKey="12265" itemName="" itemText="通用方法"/>
+        <member itemKey="12266" itemName="" itemText="钙处理"/>
+        <member itemKey="12267" itemName="" itemText="镁处理"/>
+        <member itemKey="12268" itemName="" itemText="稀土处理"/>
         <member itemKey="12269" itemName="" itemText="空"/>
         <member itemKey="12270" itemName="" itemText="低"/>
         <member itemKey="12271" itemName="" itemText="中"/>
@@ -399,9 +399,9 @@
         <member itemKey="12288" itemName="" itemText="点扫描"/>
         <member itemKey="12289" itemName="" itemText="面扫描"/>
         <member itemKey="12290" itemName="" itemText="空"/>
-        <member itemKey="12291" itemName="" itemText=""/>
-        <member itemKey="12292" itemName="" itemText=""/>
-        <member itemKey="12293" itemName="" itemText=""/>
+        <member itemKey="12291" itemName="" itemText="取中"/>
+        <member itemKey="12292" itemName="" itemText="向下"/>
+        <member itemKey="12293" itemName="" itemText="向上"/>
         <member itemKey="12294" itemName="" itemText="空"/>
         <member itemKey="12295" itemName="" itemText="低"/>
         <member itemKey="12296" itemName="" itemText="中"/>

+ 2 - 2
OTSIncAMeasureApp/ResourceManage/ResourceData.cs

@@ -241,7 +241,7 @@ namespace OTSModelSharp.ResourceManage
             string strId = "";
 
            
-                strId = XmlResourceData.GetInstance().GetStringByKey(ResourceID.GrpGeneral, ResourceID.IDS_MEMBRANE_TYPE + (int)a_nSteelTech);
+                strId = XmlResourceData.GetInstance().GetStringByKey(ResourceID.GrpOtherParam, ResourceID.IDS_MEMBRANE_TYPE + (int)a_nSteelTech);
           
 
             return strId;
@@ -307,7 +307,7 @@ namespace OTSModelSharp.ResourceManage
             string strIMAGEMODE = "";
 
             
-                strIMAGEMODE = XmlResourceData.GetInstance().GetStringByKey(ResourceID.GrpImageProcess, ResourceID.IDS_AUTOBGREMOVE_TYPE + (int)a_nIMAGEMODE);
+                strIMAGEMODE = XmlResourceData.GetInstance().GetStringByKey(ResourceID.GrpOtherParam, ResourceID.IDS_AUTOBGREMOVE_TYPE + (int)a_nIMAGEMODE);
            
 
             return strIMAGEMODE;

+ 2 - 2
OTSIncAMeasureApp/ResourceManage/ResourceID.cs

@@ -46,10 +46,10 @@ namespace OTSModelSharp.ResourceManage
         public const int IDS_SYSTEMSTD_NAME_FIRST = 20335;
         public const int IDS_STRING20350 = 20350;
         public const int IDS_STRING20351 = 20351;
-        public const int IDS_MEMBRANE_TYPE = 20353;
+        public const int IDS_MEMBRANE_TYPE = 12265;
         public const int IDS_FIELD_STOP_TYPE = 20401;
         public const int IDS_BGREMOVE_TYPE = 20027;
-        public const int IDS_AUTOBGREMOVE_TYPE = 20029;
+        public const int IDS_AUTOBGREMOVE_TYPE = 12291;
         public const int IDS_STEEL_TECHNOLOGY = 20353;
 
         public const int IDD_LICENSE_INFO = 12000;

+ 61 - 16
OTSSysMgrApp/OTSSystemManagerForms.Designer.cs

@@ -44,11 +44,15 @@
             this.pictureBox2 = new System.Windows.Forms.PictureBox();
             this.button2 = new System.Windows.Forms.Button();
             this.button1 = new System.Windows.Forms.Button();
+            this.tabSysType = new System.Windows.Forms.TabPage();
+            this.radioButton_CleannessA = new System.Windows.Forms.RadioButton();
+            this.radioButton_IncA = new System.Windows.Forms.RadioButton();
             this.tabLanguage.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
             this.tabControl1.SuspendLayout();
             this.tabHardwareSet.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
+            this.tabSysType.SuspendLayout();
             this.SuspendLayout();
             // 
             // tabLanguage
@@ -57,9 +61,9 @@
             this.tabLanguage.Controls.Add(this.rdb_en);
             this.tabLanguage.Controls.Add(this.rdb_ch);
             this.tabLanguage.Location = new System.Drawing.Point(4, 22);
-            this.tabLanguage.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tabLanguage.Margin = new System.Windows.Forms.Padding(2);
             this.tabLanguage.Name = "tabLanguage";
-            this.tabLanguage.Size = new System.Drawing.Size(545, 127);
+            this.tabLanguage.Size = new System.Drawing.Size(546, 133);
             this.tabLanguage.TabIndex = 2;
             this.tabLanguage.Text = "语言";
             this.tabLanguage.UseVisualStyleBackColor = true;
@@ -68,7 +72,7 @@
             // 
             this.pictureBox3.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox3.Image")));
             this.pictureBox3.Location = new System.Drawing.Point(38, 22);
-            this.pictureBox3.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.pictureBox3.Margin = new System.Windows.Forms.Padding(2);
             this.pictureBox3.Name = "pictureBox3";
             this.pictureBox3.Size = new System.Drawing.Size(67, 66);
             this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
@@ -80,7 +84,7 @@
             this.rdb_en.AutoSize = true;
             this.rdb_en.Checked = true;
             this.rdb_en.Location = new System.Drawing.Point(147, 58);
-            this.rdb_en.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.rdb_en.Margin = new System.Windows.Forms.Padding(2);
             this.rdb_en.Name = "rdb_en";
             this.rdb_en.Size = new System.Drawing.Size(71, 16);
             this.rdb_en.TabIndex = 0;
@@ -93,7 +97,7 @@
             // 
             this.rdb_ch.AutoSize = true;
             this.rdb_ch.Location = new System.Drawing.Point(147, 25);
-            this.rdb_ch.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.rdb_ch.Margin = new System.Windows.Forms.Padding(2);
             this.rdb_ch.Name = "rdb_ch";
             this.rdb_ch.Size = new System.Drawing.Size(71, 16);
             this.rdb_ch.TabIndex = 0;
@@ -105,9 +109,10 @@
             // 
             this.tabControl1.Controls.Add(this.tabHardwareSet);
             this.tabControl1.Controls.Add(this.tabLanguage);
+            this.tabControl1.Controls.Add(this.tabSysType);
             this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
             this.tabControl1.Location = new System.Drawing.Point(0, 0);
-            this.tabControl1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tabControl1.Margin = new System.Windows.Forms.Padding(2);
             this.tabControl1.Name = "tabControl1";
             this.tabControl1.SelectedIndex = 0;
             this.tabControl1.Size = new System.Drawing.Size(554, 159);
@@ -125,9 +130,9 @@
             this.tabHardwareSet.Controls.Add(this.button2);
             this.tabHardwareSet.Controls.Add(this.button1);
             this.tabHardwareSet.Location = new System.Drawing.Point(4, 22);
-            this.tabHardwareSet.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tabHardwareSet.Margin = new System.Windows.Forms.Padding(2);
             this.tabHardwareSet.Name = "tabHardwareSet";
-            this.tabHardwareSet.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.tabHardwareSet.Padding = new System.Windows.Forms.Padding(2);
             this.tabHardwareSet.Size = new System.Drawing.Size(546, 133);
             this.tabHardwareSet.TabIndex = 1;
             this.tabHardwareSet.Text = "硬件";
@@ -145,7 +150,7 @@
             "Oxford",
             "FEI"});
             this.CmbSEMController.Location = new System.Drawing.Point(227, 22);
-            this.CmbSEMController.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.CmbSEMController.Margin = new System.Windows.Forms.Padding(2);
             this.CmbSEMController.Name = "CmbSEMController";
             this.CmbSEMController.Size = new System.Drawing.Size(193, 20);
             this.CmbSEMController.TabIndex = 13;
@@ -161,7 +166,7 @@
             "Oxford",
             "FEI"});
             this.CmbEDSController.Location = new System.Drawing.Point(227, 74);
-            this.CmbEDSController.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.CmbEDSController.Margin = new System.Windows.Forms.Padding(2);
             this.CmbEDSController.Name = "CmbEDSController";
             this.CmbEDSController.Size = new System.Drawing.Size(193, 20);
             this.CmbEDSController.TabIndex = 14;
@@ -170,7 +175,7 @@
             // btnEDSTest
             // 
             this.btnEDSTest.Location = new System.Drawing.Point(429, 70);
-            this.btnEDSTest.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnEDSTest.Margin = new System.Windows.Forms.Padding(2);
             this.btnEDSTest.Name = "btnEDSTest";
             this.btnEDSTest.Size = new System.Drawing.Size(77, 24);
             this.btnEDSTest.TabIndex = 12;
@@ -181,7 +186,7 @@
             // btnSEMTest
             // 
             this.btnSEMTest.Location = new System.Drawing.Point(429, 20);
-            this.btnSEMTest.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.btnSEMTest.Margin = new System.Windows.Forms.Padding(2);
             this.btnSEMTest.Name = "btnSEMTest";
             this.btnSEMTest.Size = new System.Drawing.Size(77, 24);
             this.btnSEMTest.TabIndex = 10;
@@ -213,7 +218,7 @@
             // 
             this.pictureBox2.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox2.Image")));
             this.pictureBox2.Location = new System.Drawing.Point(38, 22);
-            this.pictureBox2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.pictureBox2.Margin = new System.Windows.Forms.Padding(2);
             this.pictureBox2.Name = "pictureBox2";
             this.pictureBox2.Size = new System.Drawing.Size(67, 66);
             this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
@@ -223,7 +228,7 @@
             // button2
             // 
             this.button2.Location = new System.Drawing.Point(482, 366);
-            this.button2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.button2.Margin = new System.Windows.Forms.Padding(2);
             this.button2.Name = "button2";
             this.button2.Size = new System.Drawing.Size(67, 22);
             this.button2.TabIndex = 2;
@@ -233,13 +238,48 @@
             // button1
             // 
             this.button1.Location = new System.Drawing.Point(410, 366);
-            this.button1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.button1.Margin = new System.Windows.Forms.Padding(2);
             this.button1.Name = "button1";
             this.button1.Size = new System.Drawing.Size(67, 22);
             this.button1.TabIndex = 2;
             this.button1.Text = "button1";
             this.button1.UseVisualStyleBackColor = true;
             // 
+            // tabSysType
+            // 
+            this.tabSysType.Controls.Add(this.radioButton_CleannessA);
+            this.tabSysType.Controls.Add(this.radioButton_IncA);
+            this.tabSysType.Location = new System.Drawing.Point(4, 22);
+            this.tabSysType.Name = "tabSysType";
+            this.tabSysType.Padding = new System.Windows.Forms.Padding(3);
+            this.tabSysType.Size = new System.Drawing.Size(546, 133);
+            this.tabSysType.TabIndex = 3;
+            this.tabSysType.Text = "系统类型设置";
+            this.tabSysType.UseVisualStyleBackColor = true;
+            // 
+            // radioButton_CleannessA
+            // 
+            this.radioButton_CleannessA.AutoSize = true;
+            this.radioButton_CleannessA.Location = new System.Drawing.Point(29, 71);
+            this.radioButton_CleannessA.Name = "radioButton_CleannessA";
+            this.radioButton_CleannessA.Size = new System.Drawing.Size(65, 16);
+            this.radioButton_CleannessA.TabIndex = 1;
+            this.radioButton_CleannessA.TabStop = true;
+            this.radioButton_CleannessA.Text = " OTS102";
+            this.radioButton_CleannessA.UseVisualStyleBackColor = true;
+            // 
+            // radioButton_IncA
+            // 
+            this.radioButton_IncA.AutoSize = true;
+            this.radioButton_IncA.Location = new System.Drawing.Point(29, 32);
+            this.radioButton_IncA.Name = "radioButton_IncA";
+            this.radioButton_IncA.Size = new System.Drawing.Size(65, 16);
+            this.radioButton_IncA.TabIndex = 0;
+            this.radioButton_IncA.TabStop = true;
+            this.radioButton_IncA.Text = " OTS101";
+            this.radioButton_IncA.UseVisualStyleBackColor = true;
+            this.radioButton_IncA.CheckedChanged += new System.EventHandler(this.radioButton_IncA_CheckedChanged);
+            // 
             // OTSSystemManagerForms
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -248,7 +288,7 @@
             this.ClientSize = new System.Drawing.Size(554, 159);
             this.Controls.Add(this.tabControl1);
             this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
-            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
+            this.Margin = new System.Windows.Forms.Padding(2);
             this.MaximizeBox = false;
             this.MaximumSize = new System.Drawing.Size(570, 198);
             this.MinimumSize = new System.Drawing.Size(570, 198);
@@ -264,6 +304,8 @@
             this.tabHardwareSet.ResumeLayout(false);
             this.tabHardwareSet.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
+            this.tabSysType.ResumeLayout(false);
+            this.tabSysType.PerformLayout();
             this.ResumeLayout(false);
 
         }
@@ -285,5 +327,8 @@
         private System.Windows.Forms.PictureBox pictureBox2;
         private System.Windows.Forms.Button button2;
         private System.Windows.Forms.Button button1;
+        private System.Windows.Forms.TabPage tabSysType;
+        private System.Windows.Forms.RadioButton radioButton_CleannessA;
+        private System.Windows.Forms.RadioButton radioButton_IncA;
     }
 }

+ 42 - 0
OTSSysMgrApp/OTSSystemManagerForms.cs

@@ -206,6 +206,8 @@ namespace OTSSysMgrApp
                     rdb_en.Checked = true;
                     break;
             }
+
+            ReadSysType();
         }
         /// <summary>
         /// 将所有参数保存
@@ -340,6 +342,41 @@ namespace OTSSysMgrApp
 
         }
 
+        private void ReadSysType()
+        {
+            string path = Application.StartupPath + @"\Config\SysData\OTSProgMgrParam.pmf";
+            string Type = "";
+            bool result = XMLOperationClass.ReadSysType(path, "SysType",ref Type);
+            if (result)
+            {
+                if(Type== "IncA")
+                {
+                    radioButton_IncA.Checked = true;
+                }
+                else if(Type == "CleannessA")
+                {
+                    radioButton_CleannessA.Checked = true;
+                }
+            }
+        }
+
+        private void WriteSysType()
+        {
+            string path = Application.StartupPath + @"\Config\SysData\OTSProgMgrParam.pmf";
+            string Type = "";
+            if (radioButton_IncA.Checked)
+            {
+                Type = "IncA";
+            }
+            else if (radioButton_CleannessA.Checked)
+            {
+                Type = "CleannessA";
+            }
+            bool result = XMLOperationClass.WriteSysType(path, "SysType", Type);
+            string path2 = Application.StartupPath + @"\Config\SysData\OTSReportMgrParam.rpf";
+            bool resultreport = XMLOperationClass.WriteSysType(path2, "systype", Type);
+        }
+
         private void GetSEMAndEDSController()
         {
             string xmlNodeSEM = XMLOperationClass.GetXMLInformations("SEMName");
@@ -575,5 +612,10 @@ namespace OTSSysMgrApp
             ds.AcceptChanges();
             ds.WriteXml(System.Windows.Forms.Application.StartupPath + @"/Resources/XMLData/LanguageDefine.xml");
         }
+
+        private void radioButton_IncA_CheckedChanged(object sender, EventArgs e)
+        {
+            WriteSysType();
+        }
     }
 }

+ 39 - 0
OTSSysMgrApp/XMLOperationClass.cs

@@ -316,5 +316,44 @@ namespace OTSSysMgrApp
             
         }
         #endregion
+
+        public static bool WriteSysType(string xmlpath, string AttributeName, string Value)
+        {
+            try
+            {
+                XmlDocument xmlDocument = new XmlDocument();
+                xmlDocument.Load(xmlpath);
+                XmlNode node = xmlDocument.SelectSingleNode("XMLData");
+
+                XmlElement xe = (XmlElement)node;
+                xe.SetAttribute(AttributeName, Value);
+                xmlDocument.Save(xmlpath);
+            }
+            catch (Exception ex)
+            {
+                //MessageBox.Show(ex.ToString());
+                return false;
+            }
+            return true;
+        }
+
+        public static bool ReadSysType(string xmlpath, string AttributeName,ref string Value)
+        {
+            try
+            {
+                XmlDocument xmlDocument = new XmlDocument();
+                xmlDocument.Load(xmlpath);
+                XmlNode node = xmlDocument.SelectSingleNode("XMLData");
+
+                XmlElement xe = (XmlElement)node;
+                Value=xe.GetAttribute(AttributeName);
+            }
+            catch (Exception ex)
+            {
+                //MessageBox.Show(ex.ToString());
+                return false;
+            }
+            return true;
+        }
     }
 }