소스 검색

sysmgr添加矿物类型

cxs 2 달 전
부모
커밋
d4161a020c
2개의 변경된 파일101개의 추가작업 그리고 16개의 파일을 삭제
  1. 20 4
      OTSSysMgrApp/OTSSystemManagerForms.Designer.cs
  2. 81 12
      OTSSysMgrApp/OTSSystemManagerForms.cs

+ 20 - 4
OTSSysMgrApp/OTSSystemManagerForms.Designer.cs

@@ -44,6 +44,7 @@
             this.button2 = new System.Windows.Forms.Button();
             this.button1 = new System.Windows.Forms.Button();
             this.tabSysType = new System.Windows.Forms.TabPage();
+            this.radioButton_SteelMineral = new System.Windows.Forms.RadioButton();
             this.pictureBox4 = new System.Windows.Forms.PictureBox();
             this.coB_CleannessType = new System.Windows.Forms.ComboBox();
             this.radioButton_CleannessA = new System.Windows.Forms.RadioButton();
@@ -238,6 +239,7 @@
             // 
             // tabSysType
             // 
+            this.tabSysType.Controls.Add(this.radioButton_SteelMineral);
             this.tabSysType.Controls.Add(this.pictureBox4);
             this.tabSysType.Controls.Add(this.coB_CleannessType);
             this.tabSysType.Controls.Add(this.radioButton_CleannessA);
@@ -250,6 +252,18 @@
             this.tabSysType.Text = "系统类型设置";
             this.tabSysType.UseVisualStyleBackColor = true;
             // 
+            // radioButton_SteelMineral
+            // 
+            this.radioButton_SteelMineral.AutoSize = true;
+            this.radioButton_SteelMineral.Location = new System.Drawing.Point(129, 90);
+            this.radioButton_SteelMineral.Name = "radioButton_SteelMineral";
+            this.radioButton_SteelMineral.Size = new System.Drawing.Size(65, 16);
+            this.radioButton_SteelMineral.TabIndex = 10;
+            this.radioButton_SteelMineral.TabStop = true;
+            this.radioButton_SteelMineral.Text = " OTS103";
+            this.radioButton_SteelMineral.UseVisualStyleBackColor = true;
+            this.radioButton_SteelMineral.Click += new System.EventHandler(this.radioButton_SteelMineral_Click);
+            // 
             // pictureBox4
             // 
             this.pictureBox4.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox4.Image")));
@@ -265,7 +279,7 @@
             // 
             this.coB_CleannessType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.coB_CleannessType.FormattingEnabled = true;
-            this.coB_CleannessType.Location = new System.Drawing.Point(217, 74);
+            this.coB_CleannessType.Location = new System.Drawing.Point(212, 52);
             this.coB_CleannessType.Name = "coB_CleannessType";
             this.coB_CleannessType.Size = new System.Drawing.Size(121, 20);
             this.coB_CleannessType.TabIndex = 2;
@@ -274,25 +288,26 @@
             // radioButton_CleannessA
             // 
             this.radioButton_CleannessA.AutoSize = true;
-            this.radioButton_CleannessA.Location = new System.Drawing.Point(134, 75);
+            this.radioButton_CleannessA.Location = new System.Drawing.Point(129, 56);
             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;
+            this.radioButton_CleannessA.Click += new System.EventHandler(this.radioButton_CleannessA_Click);
             // 
             // radioButton_IncA
             // 
             this.radioButton_IncA.AutoSize = true;
-            this.radioButton_IncA.Location = new System.Drawing.Point(134, 29);
+            this.radioButton_IncA.Location = new System.Drawing.Point(130, 24);
             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);
+            this.radioButton_IncA.Click += new System.EventHandler(this.radioButton_IncA_Click);
             // 
             // tabother
             // 
@@ -384,5 +399,6 @@
         private System.Windows.Forms.Button btn_otherconfig;
         private System.Windows.Forms.PictureBox pictureBox4;
         private System.Windows.Forms.Button btn_stagetest;
+        private System.Windows.Forms.RadioButton radioButton_SteelMineral;
     }
 }

+ 81 - 12
OTSSysMgrApp/OTSSystemManagerForms.cs

@@ -35,6 +35,7 @@ namespace OTSSysMgrApp
         Language lan;
         //国际化存储信息
         Hashtable table;
+        string presel = "";
         #endregion
 
         #region 构造函数
@@ -351,6 +352,10 @@ namespace OTSSysMgrApp
                 {
                     radioButton_IncA.Checked = true;
                 }
+                else if (Type == "SteelMineral")
+                {
+                    radioButton_SteelMineral.Checked = true;
+                }
                 else 
                 {
                     radioButton_CleannessA.Checked = true;
@@ -366,6 +371,7 @@ namespace OTSSysMgrApp
                     this.coB_CleannessType.SelectedIndexChanged += new System.EventHandler(this.coB_CleannessType_SelectedIndexChanged);
                 }
                 this.radioButton_IncA.CheckedChanged += new System.EventHandler(this.radioButton_IncA_CheckedChanged);
+                presel = Type;
             }
         }
 
@@ -400,6 +406,12 @@ namespace OTSSysMgrApp
                             sourceFilepath += "\\BatteryCleannessA";
                         }
                     }
+
+
+                    else if (radioButton_SteelMineral.Checked)
+                    {
+                        sourceFilepath += "\\SteelMineral";
+                    }
                     var files = Directory.GetFiles(sourceFilepath);
                     foreach (var file in files)
                     {
@@ -640,18 +652,6 @@ namespace OTSSysMgrApp
             //CopyConfigBySysType();
         }
 
-        private void radioButton_IncA_CheckedChanged(object sender, EventArgs e)
-        {
-            bool r = radioButton_IncA.Checked;
-            if (!ChangeSysType())
-            {
-                this.radioButton_IncA.CheckedChanged -= new System.EventHandler(this.radioButton_IncA_CheckedChanged);
-                radioButton_CleannessA.Checked = r;
-                radioButton_IncA.Checked = !r;
-                this.radioButton_IncA.CheckedChanged += new System.EventHandler(this.radioButton_IncA_CheckedChanged);
-            }
-        }
-
         private void coB_CleannessType_SelectedIndexChanged(object sender, EventArgs e)
         {
             if(radioButton_CleannessA.Checked)
@@ -680,6 +680,12 @@ namespace OTSSysMgrApp
                     Type = "BatteryCleannessA";
                 }
             }
+
+            else if (radioButton_SteelMineral.Checked)
+            {
+                Type = "SteelMineral";
+            }
+
             bool result = XMLOperationClass.WriteSysType(path, "SysType", Type);
             string path2 = Application.StartupPath + @"\Config\SysData\OTSReportMgrParam.rpf";
             bool resultreport = XMLOperationClass.WriteSysType(path2, "systype", Type);
@@ -710,5 +716,68 @@ namespace OTSSysMgrApp
                 log.Error("OTSSystemManagerForms_btnEDSTest_Click-错误日志:" + ex.ToString());
             }
         }
+
+        private void radioButton_CleannessA_Click(object sender, EventArgs e)
+        {
+            if (!ChangeSysType())
+            {
+                if (presel == "IncA")
+                {
+                    radioButton_IncA.Checked = true;
+                }
+                else if (presel == "SteelMineral")
+                {
+                    radioButton_SteelMineral.Checked = true;
+                }
+                else
+                {
+                    radioButton_CleannessA.Checked = true;
+                }
+                return;
+            }
+            presel = "TCCleannessA";
+        }
+
+        private void radioButton_SteelMineral_Click(object sender, EventArgs e)
+        {
+            if (!ChangeSysType())
+            {
+                if (presel == "IncA")
+                {
+                    radioButton_IncA.Checked = true;
+                }
+                else if (presel == "SteelMineral")
+                {
+                    radioButton_SteelMineral.Checked = true;
+                }
+                else
+                {
+                    radioButton_CleannessA.Checked = true;
+                }
+                return;
+            }
+            presel = "SteelMineral";
+        }
+
+        private void radioButton_IncA_Click(object sender, EventArgs e)
+        {
+            if (!ChangeSysType())
+            {
+                if (presel == "IncA")
+                {
+                    radioButton_IncA.Checked = true;
+                }
+                else if (presel == "SteelMineral")
+                {
+                    radioButton_SteelMineral.Checked = true;
+                }
+                else
+                {
+                    radioButton_CleannessA.Checked = true;
+                }
+                return;
+            }
+            presel = "IncA";
+        }
     }
 }