Просмотр исходного кода

Adjust to not read the magnification in real time and fix a bug

cxs 2 месяцев назад
Родитель
Сommit
614105bae2

+ 1 - 1
Bin/x64/Debug/Resources/XMLData/AppResource_ZH.xml

@@ -1823,7 +1823,7 @@
 <Form>
     <Name>frmInitializeImageboundary</Name>
     <Controls>
-	  <Control name="frmInitializeImageboundary" text="图像定界法" />
+	  <Control name="frmInitializeImageboundary" text="取点定界法" />
 	  <Control name="groupBox1" text="第一点" />
 	  <Control name="bn_FirstPoint" text="获取" />
 	  <Control name="groupBox2" text="第二点" />

+ 13 - 12
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/frmInitializeTwoPointRectangle.Designer.cs

@@ -54,6 +54,7 @@
             this.panel3 = new System.Windows.Forms.Panel();
             this.tBx_Magnification = new System.Windows.Forms.TextBox();
             this.label10 = new System.Windows.Forms.Label();
+            this.cB_Inclinedplanefocus = new System.Windows.Forms.CheckBox();
             this.groupBox3 = new System.Windows.Forms.GroupBox();
             this.tBx_TheThirdPointWD = new System.Windows.Forms.TextBox();
             this.label9 = new System.Windows.Forms.Label();
@@ -63,7 +64,6 @@
             this.tBx_TheThirdPointX = new System.Windows.Forms.TextBox();
             this.label6 = new System.Windows.Forms.Label();
             this.tBx_TheThirdPointY = new System.Windows.Forms.TextBox();
-            this.cB_Inclinedplanefocus = new System.Windows.Forms.CheckBox();
             this.groupBox1.SuspendLayout();
             this.groupBox2.SuspendLayout();
             this.panel2.SuspendLayout();
@@ -339,6 +339,7 @@
             this.tBx_Magnification.Name = "tBx_Magnification";
             this.tBx_Magnification.Size = new System.Drawing.Size(100, 21);
             this.tBx_Magnification.TabIndex = 26;
+            this.tBx_Magnification.Text = "100";
             this.tBx_Magnification.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
             // 
             // label10
@@ -350,6 +351,17 @@
             this.label10.TabIndex = 25;
             this.label10.Text = "Magnification:";
             // 
+            // cB_Inclinedplanefocus
+            // 
+            this.cB_Inclinedplanefocus.AutoSize = true;
+            this.cB_Inclinedplanefocus.Location = new System.Drawing.Point(13, 232);
+            this.cB_Inclinedplanefocus.Name = "cB_Inclinedplanefocus";
+            this.cB_Inclinedplanefocus.Size = new System.Drawing.Size(144, 16);
+            this.cB_Inclinedplanefocus.TabIndex = 24;
+            this.cB_Inclinedplanefocus.Text = "Inclined plane focus";
+            this.cB_Inclinedplanefocus.UseVisualStyleBackColor = true;
+            this.cB_Inclinedplanefocus.CheckedChanged += new System.EventHandler(this.cB_Inclinedplanefocus_CheckedChanged);
+            // 
             // groupBox3
             // 
             this.groupBox3.Controls.Add(this.tBx_TheThirdPointWD);
@@ -448,17 +460,6 @@
             this.tBx_TheThirdPointY.TabIndex = 5;
             this.tBx_TheThirdPointY.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
             // 
-            // cB_Inclinedplanefocus
-            // 
-            this.cB_Inclinedplanefocus.AutoSize = true;
-            this.cB_Inclinedplanefocus.Location = new System.Drawing.Point(13, 232);
-            this.cB_Inclinedplanefocus.Name = "cB_Inclinedplanefocus";
-            this.cB_Inclinedplanefocus.Size = new System.Drawing.Size(144, 16);
-            this.cB_Inclinedplanefocus.TabIndex = 24;
-            this.cB_Inclinedplanefocus.Text = "Inclined plane focus";
-            this.cB_Inclinedplanefocus.UseVisualStyleBackColor = true;
-            this.cB_Inclinedplanefocus.CheckedChanged += new System.EventHandler(this.cB_Inclinedplanefocus_CheckedChanged);
-            // 
             // frmInitializeTwoPointRectangle
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);

+ 1 - 1
OTSIncAMeasureApp/4-OTSSamplespaceGraphicsPanel/frmInitializeTwoPointRectangle.cs

@@ -73,7 +73,7 @@ namespace OTSMeasureApp._4_OTSSamplespaceGraphicsPanel
         {
             if (cfun == null){cfun = SemController.GetSEMController();}
             cB_Inclinedplanefocus.Checked=true;double val=0;
-            if(cfun.GetMagnification(ref val)) tBx_Magnification.Text=val.ToString();
+            //if(cfun.GetMagnification(ref val)) tBx_Magnification.Text=val.ToString();
             InitializeDrawingAreas();
             panel1.Invalidate();
         }

+ 1 - 1
OTSIncAMeasureApp/OTSIncAMeasureAppForm.Designer.cs

@@ -481,7 +481,7 @@
             this.rbFixedpoint.SmallImage = ((System.Drawing.Image)(resources.GetObject("rbFixedpoint.SmallImage")));
             this.rbFixedpoint.Style = System.Windows.Forms.RibbonButtonStyle.Normal;
             this.rbFixedpoint.Tag = null;
-            this.rbFixedpoint.Text = "图像定界法";
+            this.rbFixedpoint.Text = "取点定界法";
             this.rbFixedpoint.ToolTip = null;
             this.rbFixedpoint.ToolTipImage = null;
             this.rbFixedpoint.ToolTipTitle = null;

+ 8 - 8
OTSPartA_STDEditor/BaseClass/STDInfo.cs

@@ -130,12 +130,12 @@ namespace OTSPartA_STDEditor.BaseClass
                     STDGroups new_data = new STDGroups();
                     new_data.name = "Default";
                     new_data.color = "#C9C9C9";
-                    new_data.iorder = 10000;
-                    GroupDictionary.Add(10000, new_data);
-                    if (dt.Select("id='10000'").Length == 0)
+                    new_data.iorder = 0;
+                    GroupDictionary.Add(0, new_data);
+                    if (dt.Select("id='0'").Length == 0)
                     {
-                        GroupIdDictionaryFromId.Add(10000, "Default");
-                        GroupIdDictionaryFromName.Add("Default", 10000);
+                    GroupIdDictionaryFromId.Add(0, "Default");
+                    GroupIdDictionaryFromName.Add("Default", 0);
                     }
 
                     if (dt.Rows.Count > 0)
@@ -151,8 +151,8 @@ namespace OTSPartA_STDEditor.BaseClass
                                 new_STDdata.iorder = int.Parse(item["iorder"].ToString());
                                 GroupDictionary.Add(int.Parse(item["id"].ToString()), new_STDdata);
                             }
-                            GroupIdDictionaryFromName.Add(item["name"].ToString(), int.Parse(item["id"].ToString()));
-                            GroupIdDictionaryFromId.Add(int.Parse(item["id"].ToString()), item["name"].ToString());
+                                GroupIdDictionaryFromName.Add(item["name"].ToString(), int.Parse(item["id"].ToString()));
+                                GroupIdDictionaryFromId.Add(int.Parse(item["id"].ToString()), item["name"].ToString());
                         }
                     }
                 }
@@ -644,7 +644,7 @@ namespace OTSPartA_STDEditor.BaseClass
                     newRow["id"] = kv.id;
                     newRow["name"] = kv.name;
                     newRow["color"] = kv.color;
-                    newRow["iorder"] = 0;
+                    newRow["iorder"] = kv.iorder;
                     if (kv.name == "Default")
                     {
                         newRow["iorder"] = 10000;

+ 1 - 1
OTSPartA_STDEditor/UI/STDRuleslist.cs

@@ -158,7 +158,7 @@ namespace OTSPartA_STDEditor
                 }
                 else
                 {
-                    tDGroups.id = 10000;
+                    tDGroups.id = 0;
                     tDGroups.iorder = 10000;
                 }
                 foreach (TreeNode treeNode1 in treeNode.Nodes)