shim 7 years ago
parent
commit
3ee0e26fd5
2 changed files with 73 additions and 73 deletions
  1. 66 66
      UAS_DLLTest/Form1.Designer.cs
  2. 7 7
      UAS_DLLTest/Form1.cs

+ 66 - 66
UAS_DLLTest/Form1.Designer.cs

@@ -30,7 +30,7 @@
         {
             this.groupBoxwithborder3 = new UAS_DLLTest.GroupBoxwithborder();
             this.operateResult = new System.Windows.Forms.RichTextBox();
-            this.groupBoxwithborder2 = new UAS_DLLTest.GroupBoxwithborder();
+            this.Parameters = new UAS_DLLTest.GroupBoxwithborder();
             this.textBox9 = new System.Windows.Forms.TextBox();
             this.textBox8 = new System.Windows.Forms.TextBox();
             this.textBox7 = new System.Windows.Forms.TextBox();
@@ -53,7 +53,7 @@
             this.clearPara = new System.Windows.Forms.CheckBox();
             this.clear = new System.Windows.Forms.Button();
             this.confirm = new System.Windows.Forms.Button();
-            this.groupBoxwithborder1 = new UAS_DLLTest.GroupBoxwithborder();
+            this.Methods = new UAS_DLLTest.GroupBoxwithborder();
             this.SetPcbaData = new System.Windows.Forms.RadioButton();
             this.GetMobileAllInfo = new System.Windows.Forms.RadioButton();
             this.SetTestDetail = new System.Windows.Forms.RadioButton();
@@ -67,8 +67,8 @@
             this.GetAddressRangeByMO = new System.Windows.Forms.RadioButton();
             this.CheckUserAndResourcePassed = new System.Windows.Forms.RadioButton();
             this.groupBoxwithborder3.SuspendLayout();
-            this.groupBoxwithborder2.SuspendLayout();
-            this.groupBoxwithborder1.SuspendLayout();
+            this.Parameters.SuspendLayout();
+            this.Methods.SuspendLayout();
             this.SuspendLayout();
             // 
             // groupBoxwithborder3
@@ -91,38 +91,38 @@
             this.operateResult.TabIndex = 0;
             this.operateResult.Text = "";
             // 
-            // groupBoxwithborder2
-            // 
-            this.groupBoxwithborder2.BorderColor = System.Drawing.Color.Black;
-            this.groupBoxwithborder2.Controls.Add(this.textBox9);
-            this.groupBoxwithborder2.Controls.Add(this.textBox8);
-            this.groupBoxwithborder2.Controls.Add(this.textBox7);
-            this.groupBoxwithborder2.Controls.Add(this.textBox6);
-            this.groupBoxwithborder2.Controls.Add(this.textBox5);
-            this.groupBoxwithborder2.Controls.Add(this.textBox4);
-            this.groupBoxwithborder2.Controls.Add(this.textBox3);
-            this.groupBoxwithborder2.Controls.Add(this.textBox2);
-            this.groupBoxwithborder2.Controls.Add(this.textBox1);
-            this.groupBoxwithborder2.Controls.Add(this.label9);
-            this.groupBoxwithborder2.Controls.Add(this.label8);
-            this.groupBoxwithborder2.Controls.Add(this.label7);
-            this.groupBoxwithborder2.Controls.Add(this.label6);
-            this.groupBoxwithborder2.Controls.Add(this.label5);
-            this.groupBoxwithborder2.Controls.Add(this.label4);
-            this.groupBoxwithborder2.Controls.Add(this.label3);
-            this.groupBoxwithborder2.Controls.Add(this.label2);
-            this.groupBoxwithborder2.Controls.Add(this.label1);
-            this.groupBoxwithborder2.Controls.Add(this.clearResult);
-            this.groupBoxwithborder2.Controls.Add(this.clearPara);
-            this.groupBoxwithborder2.Controls.Add(this.clear);
-            this.groupBoxwithborder2.Controls.Add(this.confirm);
-            this.groupBoxwithborder2.Location = new System.Drawing.Point(34, 201);
-            this.groupBoxwithborder2.Name = "groupBoxwithborder2";
-            this.groupBoxwithborder2.Size = new System.Drawing.Size(1219, 275);
-            this.groupBoxwithborder2.TabIndex = 1;
-            this.groupBoxwithborder2.TabStop = false;
-            this.groupBoxwithborder2.Text = "Parameter";
-            this.groupBoxwithborder2.TextColor = System.Drawing.Color.Black;
+            // Parameters
+            // 
+            this.Parameters.BorderColor = System.Drawing.Color.Black;
+            this.Parameters.Controls.Add(this.textBox9);
+            this.Parameters.Controls.Add(this.textBox8);
+            this.Parameters.Controls.Add(this.textBox7);
+            this.Parameters.Controls.Add(this.textBox6);
+            this.Parameters.Controls.Add(this.textBox5);
+            this.Parameters.Controls.Add(this.textBox4);
+            this.Parameters.Controls.Add(this.textBox3);
+            this.Parameters.Controls.Add(this.textBox2);
+            this.Parameters.Controls.Add(this.textBox1);
+            this.Parameters.Controls.Add(this.label9);
+            this.Parameters.Controls.Add(this.label8);
+            this.Parameters.Controls.Add(this.label7);
+            this.Parameters.Controls.Add(this.label6);
+            this.Parameters.Controls.Add(this.label5);
+            this.Parameters.Controls.Add(this.label4);
+            this.Parameters.Controls.Add(this.label3);
+            this.Parameters.Controls.Add(this.label2);
+            this.Parameters.Controls.Add(this.label1);
+            this.Parameters.Controls.Add(this.clearResult);
+            this.Parameters.Controls.Add(this.clearPara);
+            this.Parameters.Controls.Add(this.clear);
+            this.Parameters.Controls.Add(this.confirm);
+            this.Parameters.Location = new System.Drawing.Point(34, 201);
+            this.Parameters.Name = "Parameters";
+            this.Parameters.Size = new System.Drawing.Size(1219, 275);
+            this.Parameters.TabIndex = 1;
+            this.Parameters.TabStop = false;
+            this.Parameters.Text = "Parameter";
+            this.Parameters.TextColor = System.Drawing.Color.Black;
             // 
             // textBox9
             // 
@@ -308,28 +308,28 @@
             this.confirm.UseVisualStyleBackColor = true;
             this.confirm.Click += new System.EventHandler(this.confirm_Click);
             // 
-            // groupBoxwithborder1
-            // 
-            this.groupBoxwithborder1.BorderColor = System.Drawing.Color.Black;
-            this.groupBoxwithborder1.Controls.Add(this.SetPcbaData);
-            this.groupBoxwithborder1.Controls.Add(this.GetMobileAllInfo);
-            this.groupBoxwithborder1.Controls.Add(this.SetTestDetail);
-            this.groupBoxwithborder1.Controls.Add(this.GetRcardMOInfo);
-            this.groupBoxwithborder1.Controls.Add(this.SetMobileData);
-            this.groupBoxwithborder1.Controls.Add(this.SetIMEIInfo);
-            this.groupBoxwithborder1.Controls.Add(this.SetAddressInfo);
-            this.groupBoxwithborder1.Controls.Add(this.CheckRoutePassed);
-            this.groupBoxwithborder1.Controls.Add(this.GoMo);
-            this.groupBoxwithborder1.Controls.Add(this.GetMEIOrNetCodeRange);
-            this.groupBoxwithborder1.Controls.Add(this.GetAddressRangeByMO);
-            this.groupBoxwithborder1.Controls.Add(this.CheckUserAndResourcePassed);
-            this.groupBoxwithborder1.Location = new System.Drawing.Point(34, 24);
-            this.groupBoxwithborder1.Name = "groupBoxwithborder1";
-            this.groupBoxwithborder1.Size = new System.Drawing.Size(1219, 151);
-            this.groupBoxwithborder1.TabIndex = 0;
-            this.groupBoxwithborder1.TabStop = false;
-            this.groupBoxwithborder1.Text = "Method";
-            this.groupBoxwithborder1.TextColor = System.Drawing.Color.Black;
+            // Methods
+            // 
+            this.Methods.BorderColor = System.Drawing.Color.Black;
+            this.Methods.Controls.Add(this.SetPcbaData);
+            this.Methods.Controls.Add(this.GetMobileAllInfo);
+            this.Methods.Controls.Add(this.SetTestDetail);
+            this.Methods.Controls.Add(this.GetRcardMOInfo);
+            this.Methods.Controls.Add(this.SetMobileData);
+            this.Methods.Controls.Add(this.SetIMEIInfo);
+            this.Methods.Controls.Add(this.SetAddressInfo);
+            this.Methods.Controls.Add(this.CheckRoutePassed);
+            this.Methods.Controls.Add(this.GoMo);
+            this.Methods.Controls.Add(this.GetMEIOrNetCodeRange);
+            this.Methods.Controls.Add(this.GetAddressRangeByMO);
+            this.Methods.Controls.Add(this.CheckUserAndResourcePassed);
+            this.Methods.Location = new System.Drawing.Point(34, 24);
+            this.Methods.Name = "Methods";
+            this.Methods.Size = new System.Drawing.Size(1219, 151);
+            this.Methods.TabIndex = 0;
+            this.Methods.TabStop = false;
+            this.Methods.Text = "Method";
+            this.Methods.TextColor = System.Drawing.Color.Black;
             // 
             // SetPcbaData
             // 
@@ -469,23 +469,23 @@
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1285, 686);
             this.Controls.Add(this.groupBoxwithborder3);
-            this.Controls.Add(this.groupBoxwithborder2);
-            this.Controls.Add(this.groupBoxwithborder1);
+            this.Controls.Add(this.Parameters);
+            this.Controls.Add(this.Methods);
             this.Name = "Form1";
             this.Text = "Form1";
             this.Load += new System.EventHandler(this.Form1_Load);
             this.groupBoxwithborder3.ResumeLayout(false);
-            this.groupBoxwithborder2.ResumeLayout(false);
-            this.groupBoxwithborder2.PerformLayout();
-            this.groupBoxwithborder1.ResumeLayout(false);
-            this.groupBoxwithborder1.PerformLayout();
+            this.Parameters.ResumeLayout(false);
+            this.Parameters.PerformLayout();
+            this.Methods.ResumeLayout(false);
+            this.Methods.PerformLayout();
             this.ResumeLayout(false);
 
         }
 
         #endregion
 
-        private GroupBoxwithborder groupBoxwithborder1;
+        private GroupBoxwithborder Methods;
         private System.Windows.Forms.RadioButton SetPcbaData;
         private System.Windows.Forms.RadioButton GetMobileAllInfo;
         private System.Windows.Forms.RadioButton SetTestDetail;
@@ -498,7 +498,7 @@
         private System.Windows.Forms.RadioButton GetMEIOrNetCodeRange;
         private System.Windows.Forms.RadioButton GetAddressRangeByMO;
         private System.Windows.Forms.RadioButton CheckUserAndResourcePassed;
-        private GroupBoxwithborder groupBoxwithborder2;
+        private GroupBoxwithborder Parameters;
         private GroupBoxwithborder groupBoxwithborder3;
         private System.Windows.Forms.CheckBox clearResult;
         private System.Windows.Forms.CheckBox clearPara;

+ 7 - 7
UAS_DLLTest/Form1.cs

@@ -14,7 +14,7 @@ namespace UAS_DLLTest
 {
     public partial class Form1 : Form
     {
-        MESHelper l;
+        MESHelper helper;
         Control.ControlCollection collection;
         Control.ControlCollection groupBox2Childs;
         ParameterInfo[] param;
@@ -24,9 +24,9 @@ namespace UAS_DLLTest
         public Form1()
         {
             InitializeComponent();
-            l = new MESHelper();
-            collection = groupBoxwithborder1.Controls;
-            groupBox2Childs = groupBoxwithborder2.Controls;
+            helper = new MESHelper();
+            collection = Methods.Controls;
+            groupBox2Childs = Parameters.Controls;
             //监听多个radiobutton的状态
             for (int i = 0; i < collection.Count; i++)
             {
@@ -46,7 +46,7 @@ namespace UAS_DLLTest
                     //显示当前选中的方法的所有参数
                     //获取所有的参数
                     icount = 0;
-                    param = l.GetType().GetMethod(collection[i].Name).GetParameters();
+                    param = helper.GetType().GetMethod(collection[i].Name).GetParameters();
                     for (int j = 1; j < param.Length+1; j++)
                     {
                         //参数名i开头的才需要显示
@@ -106,9 +106,9 @@ namespace UAS_DLLTest
             for (int i = 0; i < collection.Count; i++) {
                 if (((RadioButton)collection[i]).Checked)
                 {
-                    Type type = l.GetType();
+                    Type type = helper.GetType();
                     MethodInfo method =  type.GetMethod(((RadioButton)collection[i]).Name);
-                    oResult = method.Invoke(l, allParams).ToString();
+                    oResult = method.Invoke(helper, allParams).ToString();
                 }
             }
             //输出out出的信息