Explorar o código

其它 筛选 添加 费雷特直径

cxs hai 1 ano
pai
achega
11f402f929

+ 57 - 10
OTSIncAMeasureApp/7-OTSProgMgrInfo/OtherSelection.Designer.cs

@@ -48,6 +48,10 @@ namespace OTSMeasureApp._7_OTSProgMgrInfo
             this.panel1 = new System.Windows.Forms.Panel();
             this.btn_ok = new System.Windows.Forms.Button();
             this.btn_cancel = new System.Windows.Forms.Button();
+            this.label5 = new System.Windows.Forms.Label();
+            this.tB_Ferret_max = new System.Windows.Forms.TextBox();
+            this.tB_Ferret_min = new System.Windows.Forms.TextBox();
+            this.cB_Ferret = new System.Windows.Forms.CheckBox();
             this.panel1.SuspendLayout();
             this.SuspendLayout();
             // 
@@ -151,15 +155,15 @@ namespace OTSMeasureApp._7_OTSProgMgrInfo
             this.cB_Aspect.AutoSize = true;
             this.cB_Aspect.Location = new System.Drawing.Point(19, 98);
             this.cB_Aspect.Name = "cB_Aspect";
-            this.cB_Aspect.Size = new System.Drawing.Size(84, 16);
+            this.cB_Aspect.Size = new System.Drawing.Size(90, 16);
             this.cB_Aspect.TabIndex = 10;
-            this.cB_Aspect.Text = "Aspect(um)";
+            this.cB_Aspect.Text = "AspectRatio";
             this.cB_Aspect.UseVisualStyleBackColor = true;
             // 
             // label4
             // 
             this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(222, 144);
+            this.label4.Location = new System.Drawing.Point(222, 180);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(11, 12);
             this.label4.TabIndex = 17;
@@ -167,7 +171,7 @@ namespace OTSMeasureApp._7_OTSProgMgrInfo
             // 
             // tB_orientation_max
             // 
-            this.tB_orientation_max.Location = new System.Drawing.Point(248, 135);
+            this.tB_orientation_max.Location = new System.Drawing.Point(248, 171);
             this.tB_orientation_max.Name = "tB_orientation_max";
             this.tB_orientation_max.Size = new System.Drawing.Size(72, 21);
             this.tB_orientation_max.TabIndex = 16;
@@ -175,7 +179,7 @@ namespace OTSMeasureApp._7_OTSProgMgrInfo
             // 
             // tB_orientation_min
             // 
-            this.tB_orientation_min.Location = new System.Drawing.Point(133, 135);
+            this.tB_orientation_min.Location = new System.Drawing.Point(133, 171);
             this.tB_orientation_min.Name = "tB_orientation_min";
             this.tB_orientation_min.Size = new System.Drawing.Size(72, 21);
             this.tB_orientation_min.TabIndex = 15;
@@ -184,7 +188,7 @@ namespace OTSMeasureApp._7_OTSProgMgrInfo
             // cB_orientation
             // 
             this.cB_orientation.AutoSize = true;
-            this.cB_orientation.Location = new System.Drawing.Point(19, 137);
+            this.cB_orientation.Location = new System.Drawing.Point(19, 173);
             this.cB_orientation.Name = "cB_orientation";
             this.cB_orientation.Size = new System.Drawing.Size(90, 16);
             this.cB_orientation.TabIndex = 14;
@@ -193,6 +197,10 @@ namespace OTSMeasureApp._7_OTSProgMgrInfo
             // 
             // panel1
             // 
+            this.panel1.Controls.Add(this.label5);
+            this.panel1.Controls.Add(this.tB_Ferret_max);
+            this.panel1.Controls.Add(this.tB_Ferret_min);
+            this.panel1.Controls.Add(this.cB_Ferret);
             this.panel1.Controls.Add(this.cB_Dmax);
             this.panel1.Controls.Add(this.label4);
             this.panel1.Controls.Add(this.tB_Dmax_min);
@@ -211,12 +219,12 @@ namespace OTSMeasureApp._7_OTSProgMgrInfo
             this.panel1.Controls.Add(this.cB_Aspect);
             this.panel1.Location = new System.Drawing.Point(12, 12);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(335, 176);
+            this.panel1.Size = new System.Drawing.Size(335, 212);
             this.panel1.TabIndex = 18;
             // 
             // btn_ok
             // 
-            this.btn_ok.Location = new System.Drawing.Point(190, 198);
+            this.btn_ok.Location = new System.Drawing.Point(189, 230);
             this.btn_ok.Name = "btn_ok";
             this.btn_ok.Size = new System.Drawing.Size(75, 23);
             this.btn_ok.TabIndex = 19;
@@ -226,7 +234,7 @@ namespace OTSMeasureApp._7_OTSProgMgrInfo
             // 
             // btn_cancel
             // 
-            this.btn_cancel.Location = new System.Drawing.Point(271, 198);
+            this.btn_cancel.Location = new System.Drawing.Point(270, 230);
             this.btn_cancel.Name = "btn_cancel";
             this.btn_cancel.Size = new System.Drawing.Size(75, 23);
             this.btn_cancel.TabIndex = 20;
@@ -234,12 +242,47 @@ namespace OTSMeasureApp._7_OTSProgMgrInfo
             this.btn_cancel.UseVisualStyleBackColor = true;
             this.btn_cancel.Click += new System.EventHandler(this.btn_cancel_Click);
             // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(222, 142);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(11, 12);
+            this.label5.TabIndex = 21;
+            this.label5.Text = "~";
+            // 
+            // tB_Ferret_max
+            // 
+            this.tB_Ferret_max.Location = new System.Drawing.Point(248, 133);
+            this.tB_Ferret_max.Name = "tB_Ferret_max";
+            this.tB_Ferret_max.Size = new System.Drawing.Size(72, 21);
+            this.tB_Ferret_max.TabIndex = 20;
+            this.tB_Ferret_max.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // tB_Ferret_min
+            // 
+            this.tB_Ferret_min.Location = new System.Drawing.Point(133, 133);
+            this.tB_Ferret_min.Name = "tB_Ferret_min";
+            this.tB_Ferret_min.Size = new System.Drawing.Size(72, 21);
+            this.tB_Ferret_min.TabIndex = 19;
+            this.tB_Ferret_min.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+            // 
+            // cB_Ferret
+            // 
+            this.cB_Ferret.AutoSize = true;
+            this.cB_Ferret.Location = new System.Drawing.Point(19, 135);
+            this.cB_Ferret.Name = "cB_Ferret";
+            this.cB_Ferret.Size = new System.Drawing.Size(84, 16);
+            this.cB_Ferret.TabIndex = 18;
+            this.cB_Ferret.Text = "Ferret(um)";
+            this.cB_Ferret.UseVisualStyleBackColor = true;
+            // 
             // OtherSelectionForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
-            this.ClientSize = new System.Drawing.Size(358, 229);
+            this.ClientSize = new System.Drawing.Size(358, 265);
             this.Controls.Add(this.btn_cancel);
             this.Controls.Add(this.btn_ok);
             this.Controls.Add(this.panel1);
@@ -277,5 +320,9 @@ namespace OTSMeasureApp._7_OTSProgMgrInfo
         private System.Windows.Forms.Panel panel1;
         private System.Windows.Forms.Button btn_ok;
         private System.Windows.Forms.Button btn_cancel;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.TextBox tB_Ferret_max;
+        private System.Windows.Forms.TextBox tB_Ferret_min;
+        private System.Windows.Forms.CheckBox cB_Ferret;
     }
 }

+ 24 - 1
OTSIncAMeasureApp/7-OTSProgMgrInfo/OtherSelection.cs

@@ -69,6 +69,12 @@ namespace OTSMeasureApp._7_OTSProgMgrInfo
                         tB_Aspect_min.Text = sit2[0];
                         tB_Aspect_max.Text = sit2[1];
                         break;
+                    case "ferret":
+                        cB_Aspect.Checked = true;
+                        string[] sit4 = stit[1].Split('-');
+                        tB_Aspect_min.Text = sit4[0];
+                        tB_Aspect_max.Text = sit4[1];
+                        break;
                     case "orientation":
                         cB_orientation.Checked = true;
                         string[] sit3 = stit[1].Split('-');
@@ -152,7 +158,24 @@ namespace OTSMeasureApp._7_OTSProgMgrInfo
                 }
                 _OtherSelection += dia.ToString() +",";
             }
-            if(_OtherSelection!="")
+            if (cB_Ferret.Checked)
+            {
+                if (!double.TryParse(tB_Ferret_min.Text, out dia))
+                {
+                    return false;
+                }
+                _OtherSelection += "ferret:" + dia.ToString() + "-";
+                if (!double.TryParse(tB_Ferret_max.Text, out dia))
+                {
+                    return false;
+                }
+                if (double.Parse(tB_Ferret_min.Text) >= dia)
+                {
+                    return false;
+                }
+                _OtherSelection += dia.ToString() + ",";
+            }
+            if (_OtherSelection!="")
             {
                 _OtherSelection=_OtherSelection.Substring(0, _OtherSelection.Length - 1);
             }