shim 8 年之前
父節點
當前提交
b2cd0cb43c
共有 2 個文件被更改,包括 56 次插入52 次删除
  1. 42 42
      UAS_DLLTest/Form1.Designer.cs
  2. 14 10
      UAS_DLLTest/Form1.cs

+ 42 - 42
UAS_DLLTest/Form1.Designer.cs

@@ -126,63 +126,63 @@
             // 
             // textBox9
             // 
-            this.textBox9.Location = new System.Drawing.Point(908, 108);
+            this.textBox9.Location = new System.Drawing.Point(908, 124);
             this.textBox9.Name = "textBox9";
             this.textBox9.Size = new System.Drawing.Size(181, 28);
             this.textBox9.TabIndex = 21;
             // 
             // textBox8
             // 
-            this.textBox8.Location = new System.Drawing.Point(543, 105);
+            this.textBox8.Location = new System.Drawing.Point(543, 121);
             this.textBox8.Name = "textBox8";
             this.textBox8.Size = new System.Drawing.Size(177, 28);
             this.textBox8.TabIndex = 20;
             // 
             // textBox7
             // 
-            this.textBox7.Location = new System.Drawing.Point(125, 105);
+            this.textBox7.Location = new System.Drawing.Point(125, 121);
             this.textBox7.Name = "textBox7";
             this.textBox7.Size = new System.Drawing.Size(191, 28);
             this.textBox7.TabIndex = 19;
             // 
             // textBox6
             // 
-            this.textBox6.Location = new System.Drawing.Point(908, 60);
+            this.textBox6.Location = new System.Drawing.Point(908, 76);
             this.textBox6.Name = "textBox6";
             this.textBox6.Size = new System.Drawing.Size(181, 28);
             this.textBox6.TabIndex = 18;
             // 
             // textBox5
             // 
-            this.textBox5.Location = new System.Drawing.Point(543, 60);
+            this.textBox5.Location = new System.Drawing.Point(543, 76);
             this.textBox5.Name = "textBox5";
             this.textBox5.Size = new System.Drawing.Size(177, 28);
             this.textBox5.TabIndex = 17;
             // 
             // textBox4
             // 
-            this.textBox4.Location = new System.Drawing.Point(125, 60);
+            this.textBox4.Location = new System.Drawing.Point(125, 76);
             this.textBox4.Name = "textBox4";
             this.textBox4.Size = new System.Drawing.Size(191, 28);
             this.textBox4.TabIndex = 16;
             // 
             // textBox3
             // 
-            this.textBox3.Location = new System.Drawing.Point(908, 16);
+            this.textBox3.Location = new System.Drawing.Point(908, 32);
             this.textBox3.Name = "textBox3";
             this.textBox3.Size = new System.Drawing.Size(181, 28);
             this.textBox3.TabIndex = 15;
             // 
             // textBox2
             // 
-            this.textBox2.Location = new System.Drawing.Point(543, 17);
+            this.textBox2.Location = new System.Drawing.Point(543, 33);
             this.textBox2.Name = "textBox2";
             this.textBox2.Size = new System.Drawing.Size(177, 28);
             this.textBox2.TabIndex = 14;
             // 
             // textBox1
             // 
-            this.textBox1.Location = new System.Drawing.Point(125, 17);
+            this.textBox1.Location = new System.Drawing.Point(125, 33);
             this.textBox1.Name = "textBox1";
             this.textBox1.Size = new System.Drawing.Size(191, 28);
             this.textBox1.TabIndex = 13;
@@ -190,7 +190,7 @@
             // label9
             // 
             this.label9.AutoSize = true;
-            this.label9.Location = new System.Drawing.Point(815, 115);
+            this.label9.Location = new System.Drawing.Point(815, 131);
             this.label9.Name = "label9";
             this.label9.Size = new System.Drawing.Size(62, 18);
             this.label9.TabIndex = 12;
@@ -199,7 +199,7 @@
             // label8
             // 
             this.label8.AutoSize = true;
-            this.label8.Location = new System.Drawing.Point(450, 108);
+            this.label8.Location = new System.Drawing.Point(450, 124);
             this.label8.Name = "label8";
             this.label8.Size = new System.Drawing.Size(62, 18);
             this.label8.TabIndex = 11;
@@ -208,7 +208,7 @@
             // label7
             // 
             this.label7.AutoSize = true;
-            this.label7.Location = new System.Drawing.Point(40, 111);
+            this.label7.Location = new System.Drawing.Point(40, 127);
             this.label7.Name = "label7";
             this.label7.Size = new System.Drawing.Size(62, 18);
             this.label7.TabIndex = 10;
@@ -217,7 +217,7 @@
             // label6
             // 
             this.label6.AutoSize = true;
-            this.label6.Location = new System.Drawing.Point(815, 70);
+            this.label6.Location = new System.Drawing.Point(815, 86);
             this.label6.Name = "label6";
             this.label6.Size = new System.Drawing.Size(62, 18);
             this.label6.TabIndex = 9;
@@ -226,7 +226,7 @@
             // label5
             // 
             this.label5.AutoSize = true;
-            this.label5.Location = new System.Drawing.Point(450, 63);
+            this.label5.Location = new System.Drawing.Point(450, 79);
             this.label5.Name = "label5";
             this.label5.Size = new System.Drawing.Size(62, 18);
             this.label5.TabIndex = 8;
@@ -235,7 +235,7 @@
             // label4
             // 
             this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(40, 65);
+            this.label4.Location = new System.Drawing.Point(40, 81);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(62, 18);
             this.label4.TabIndex = 7;
@@ -244,7 +244,7 @@
             // label3
             // 
             this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(815, 26);
+            this.label3.Location = new System.Drawing.Point(815, 42);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(62, 18);
             this.label3.TabIndex = 6;
@@ -253,7 +253,7 @@
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(450, 27);
+            this.label2.Location = new System.Drawing.Point(450, 43);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(62, 18);
             this.label2.TabIndex = 5;
@@ -262,7 +262,7 @@
             // label1
             // 
             this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(40, 27);
+            this.label1.Location = new System.Drawing.Point(40, 43);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(62, 18);
             this.label1.TabIndex = 4;
@@ -336,10 +336,10 @@
             this.SetPcbaData.AutoSize = true;
             this.SetPcbaData.Location = new System.Drawing.Point(440, 111);
             this.SetPcbaData.Name = "SetPcbaData";
-            this.SetPcbaData.Size = new System.Drawing.Size(132, 22);
+            this.SetPcbaData.Size = new System.Drawing.Size(258, 22);
             this.SetPcbaData.TabIndex = 13;
             this.SetPcbaData.TabStop = true;
-            this.SetPcbaData.Text = "SetPcbaData";
+            this.SetPcbaData.Text = "SetPcbaData(PCBA校准测试)";
             this.SetPcbaData.UseVisualStyleBackColor = true;
             // 
             // GetMobileAllInfo
@@ -347,10 +347,10 @@
             this.GetMobileAllInfo.AutoSize = true;
             this.GetMobileAllInfo.Location = new System.Drawing.Point(790, 83);
             this.GetMobileAllInfo.Name = "GetMobileAllInfo";
-            this.GetMobileAllInfo.Size = new System.Drawing.Size(177, 22);
+            this.GetMobileAllInfo.Size = new System.Drawing.Size(303, 22);
             this.GetMobileAllInfo.TabIndex = 12;
             this.GetMobileAllInfo.TabStop = true;
-            this.GetMobileAllInfo.Text = "GetMobileAllInfo";
+            this.GetMobileAllInfo.Text = "GetMobileAllInfo(获取手机信息)";
             this.GetMobileAllInfo.UseVisualStyleBackColor = true;
             // 
             // SetTestDetail
@@ -358,10 +358,10 @@
             this.SetTestDetail.AutoSize = true;
             this.SetTestDetail.Location = new System.Drawing.Point(790, 55);
             this.SetTestDetail.Name = "SetTestDetail";
-            this.SetTestDetail.Size = new System.Drawing.Size(150, 22);
+            this.SetTestDetail.Size = new System.Drawing.Size(276, 22);
             this.SetTestDetail.TabIndex = 11;
             this.SetTestDetail.TabStop = true;
-            this.SetTestDetail.Text = "SetTestDetail";
+            this.SetTestDetail.Text = "SetTestDetail(记录测试结果)";
             this.SetTestDetail.UseVisualStyleBackColor = true;
             // 
             // GetRcardMOInfo
@@ -369,10 +369,10 @@
             this.GetRcardMOInfo.AutoSize = true;
             this.GetRcardMOInfo.Location = new System.Drawing.Point(790, 28);
             this.GetRcardMOInfo.Name = "GetRcardMOInfo";
-            this.GetRcardMOInfo.Size = new System.Drawing.Size(159, 22);
+            this.GetRcardMOInfo.Size = new System.Drawing.Size(285, 22);
             this.GetRcardMOInfo.TabIndex = 10;
             this.GetRcardMOInfo.TabStop = true;
-            this.GetRcardMOInfo.Text = "GetRcardMOInfo";
+            this.GetRcardMOInfo.Text = "GetRcardMOInfo(获取工单信息)";
             this.GetRcardMOInfo.UseVisualStyleBackColor = true;
             // 
             // SetMobileData
@@ -380,10 +380,10 @@
             this.SetMobileData.AutoSize = true;
             this.SetMobileData.Location = new System.Drawing.Point(33, 111);
             this.SetMobileData.Name = "SetMobileData";
-            this.SetMobileData.Size = new System.Drawing.Size(150, 22);
+            this.SetMobileData.Size = new System.Drawing.Size(321, 22);
             this.SetMobileData.TabIndex = 9;
             this.SetMobileData.TabStop = true;
-            this.SetMobileData.Text = "SetMobileData";
+            this.SetMobileData.Text = "SetMobileData(接收生产数据,转号)";
             this.SetMobileData.UseVisualStyleBackColor = true;
             // 
             // SetIMEIInfo
@@ -391,10 +391,10 @@
             this.SetIMEIInfo.AutoSize = true;
             this.SetIMEIInfo.Location = new System.Drawing.Point(440, 83);
             this.SetIMEIInfo.Name = "SetIMEIInfo";
-            this.SetIMEIInfo.Size = new System.Drawing.Size(132, 22);
+            this.SetIMEIInfo.Size = new System.Drawing.Size(258, 22);
             this.SetIMEIInfo.TabIndex = 8;
             this.SetIMEIInfo.TabStop = true;
-            this.SetIMEIInfo.Text = "SetIMEIInfo";
+            this.SetIMEIInfo.Text = "SetIMEIInfo(记录IMEI使用)";
             this.SetIMEIInfo.UseVisualStyleBackColor = true;
             // 
             // SetAddressInfo
@@ -402,10 +402,10 @@
             this.SetAddressInfo.AutoSize = true;
             this.SetAddressInfo.Location = new System.Drawing.Point(440, 55);
             this.SetAddressInfo.Name = "SetAddressInfo";
-            this.SetAddressInfo.Size = new System.Drawing.Size(159, 22);
+            this.SetAddressInfo.Size = new System.Drawing.Size(294, 22);
             this.SetAddressInfo.TabIndex = 7;
             this.SetAddressInfo.TabStop = true;
-            this.SetAddressInfo.Text = "SetAddressInfo";
+            this.SetAddressInfo.Text = "SetAddressInfo(记录MACBT使用)";
             this.SetAddressInfo.UseVisualStyleBackColor = true;
             // 
             // CheckRoutePassed
@@ -413,10 +413,10 @@
             this.CheckRoutePassed.AutoSize = true;
             this.CheckRoutePassed.Location = new System.Drawing.Point(440, 27);
             this.CheckRoutePassed.Name = "CheckRoutePassed";
-            this.CheckRoutePassed.Size = new System.Drawing.Size(177, 22);
+            this.CheckRoutePassed.Size = new System.Drawing.Size(267, 22);
             this.CheckRoutePassed.TabIndex = 6;
             this.CheckRoutePassed.TabStop = true;
-            this.CheckRoutePassed.Text = "CheckRoutePassed";
+            this.CheckRoutePassed.Text = "CheckRoutePassed(检查途程)";
             this.CheckRoutePassed.UseVisualStyleBackColor = true;
             // 
             // GoMo
@@ -424,10 +424,10 @@
             this.GoMo.AutoSize = true;
             this.GoMo.Location = new System.Drawing.Point(790, 111);
             this.GoMo.Name = "GoMo";
-            this.GoMo.Size = new System.Drawing.Size(69, 22);
+            this.GoMo.Size = new System.Drawing.Size(159, 22);
             this.GoMo.TabIndex = 5;
             this.GoMo.TabStop = true;
-            this.GoMo.Text = "GoMo";
+            this.GoMo.Text = "GoMo(归属工单)";
             this.GoMo.UseVisualStyleBackColor = true;
             // 
             // GetMEIOrNetCodeRange
@@ -435,10 +435,10 @@
             this.GetMEIOrNetCodeRange.AutoSize = true;
             this.GetMEIOrNetCodeRange.Location = new System.Drawing.Point(33, 83);
             this.GetMEIOrNetCodeRange.Name = "GetMEIOrNetCodeRange";
-            this.GetMEIOrNetCodeRange.Size = new System.Drawing.Size(213, 22);
+            this.GetMEIOrNetCodeRange.Size = new System.Drawing.Size(303, 22);
             this.GetMEIOrNetCodeRange.TabIndex = 3;
             this.GetMEIOrNetCodeRange.TabStop = true;
-            this.GetMEIOrNetCodeRange.Text = "GetMEIOrNetCodeRange";
+            this.GetMEIOrNetCodeRange.Text = "GetMEIOrNetCodeRange(分配IMEI)";
             this.GetMEIOrNetCodeRange.UseVisualStyleBackColor = true;
             // 
             // GetAddressRangeByMO
@@ -446,10 +446,10 @@
             this.GetAddressRangeByMO.AutoSize = true;
             this.GetAddressRangeByMO.Location = new System.Drawing.Point(33, 55);
             this.GetAddressRangeByMO.Name = "GetAddressRangeByMO";
-            this.GetAddressRangeByMO.Size = new System.Drawing.Size(204, 22);
+            this.GetAddressRangeByMO.Size = new System.Drawing.Size(303, 22);
             this.GetAddressRangeByMO.TabIndex = 2;
             this.GetAddressRangeByMO.TabStop = true;
-            this.GetAddressRangeByMO.Text = "GetAddressRangeByMO";
+            this.GetAddressRangeByMO.Text = "GetAddressRangeByMO(分配MACBT)";
             this.GetAddressRangeByMO.UseVisualStyleBackColor = true;
             // 
             // CheckUserAndResourcePassed
@@ -457,10 +457,10 @@
             this.CheckUserAndResourcePassed.AutoSize = true;
             this.CheckUserAndResourcePassed.Location = new System.Drawing.Point(33, 27);
             this.CheckUserAndResourcePassed.Name = "CheckUserAndResourcePassed";
-            this.CheckUserAndResourcePassed.Size = new System.Drawing.Size(267, 22);
+            this.CheckUserAndResourcePassed.Size = new System.Drawing.Size(357, 22);
             this.CheckUserAndResourcePassed.TabIndex = 1;
             this.CheckUserAndResourcePassed.TabStop = true;
-            this.CheckUserAndResourcePassed.Text = "CheckUserAndResourcePassed";
+            this.CheckUserAndResourcePassed.Text = "CheckUserAndResourcePassed(登录检查)";
             this.CheckUserAndResourcePassed.UseVisualStyleBackColor = true;
             // 
             // Form1

+ 14 - 10
UAS_DLLTest/Form1.cs

@@ -39,6 +39,7 @@ namespace UAS_DLLTest
 
         private void radioButton_checkChanged(object sender, EventArgs e)
         {
+            hideControl();
             for (int i = 0; i < collection.Count; i++)
             {
                 if (((RadioButton)collection[i]).Checked) {
@@ -48,7 +49,6 @@ namespace UAS_DLLTest
                     param = l.GetType().GetMethod(collection[i].Name).GetParameters();
                     for (int j = 1; j < param.Length+1; j++)
                     {
-                        Console.WriteLine("参数名:"+param[j-1].Name);
                         //参数名i开头的才需要显示
                         if (!param[j - 1].Name.StartsWith("o"))
                         {
@@ -108,8 +108,7 @@ namespace UAS_DLLTest
                 {
                     Type type = l.GetType();
                     MethodInfo method =  type.GetMethod(((RadioButton)collection[i]).Name);
-                    var result=method.Invoke(l, allParams);
-                    oResult = result.ToString();
+                    oResult = method.Invoke(l, allParams).ToString();
                 }
             }
             //输出out出的信息
@@ -124,13 +123,7 @@ namespace UAS_DLLTest
 
         private void Form1_Load(object sender, EventArgs e)
         {
-            //设置groupBox2中所有的label和textbox不可见
-            for (int i = 0; i < groupBox2Childs.Count; i++)
-            {
-                if ((groupBox2Childs[i] is Label)||(groupBox2Childs[i] is TextBox)) {
-                    groupBox2Childs[i].Visible = false;
-                }
-            }
+            hideControl();
         }
 
         private void clear_Click(object sender, EventArgs e)
@@ -148,5 +141,16 @@ namespace UAS_DLLTest
                 operateResult.Clear();
             }
         }
+        private void hideControl()
+        {
+            //设置groupBox2中所有的label和textbox不可见
+            for (int i = 0; i < groupBox2Childs.Count; i++)
+            {
+                if ((groupBox2Childs[i] is Label) || (groupBox2Childs[i] is TextBox))
+                {
+                    groupBox2Childs[i].Visible = false;
+                }
+            }
+        }
     }
 }