浏览代码

轴方向测试优化

User 1 年之前
父节点
当前提交
566b00dde8
共有 1 个文件被更改,包括 31 次插入11 次删除
  1. 31 11
      OTSSysMgrApp/ControllerSettingForm.cs

+ 31 - 11
OTSSysMgrApp/ControllerSettingForm.cs

@@ -178,6 +178,7 @@ namespace OTSSysMgrApp
             }
             tB_scanFieldSize100.Text = scanFieldSize;
             cb_imageresolution.SelectedIndex = 0;
+            InitEvent();
         }
 
         Thread ScanThread = null;
@@ -1440,21 +1441,40 @@ namespace OTSSysMgrApp
             g.Dispose();
         }
 
-        void DrawField()
+        private void panel2_Paint(object sender, PaintEventArgs e)
         {
-            Graphics g = panel2.CreateGraphics();
-            g.SmoothingMode = SmoothingMode.HighQuality;
-            Pen pen = new Pen(Color.Black);
-            g.DrawLine(pen, new Point(panel2.Width / 2, 0), new Point(panel2.Width / 2, panel2.Height));
-            g.DrawLine(pen, new Point(0, panel2.Height / 2), new Point(panel2.Width, panel2.Height / 2));
-
-            pen.Dispose();
-            g.Dispose();
+            DrawFrames();
         }
 
-        private void panel2_Paint(object sender, PaintEventArgs e)
+        void InitEvent()
         {
-            DrawFrames();
+            string edsType = FileHelper.GetXMLInformations("EDSName");
+            string SemType = FileHelper.GetXMLInformations("SemControllerName");
+
+            if (SemType == "FEI")
+            {
+                if (edsType == "FEI")
+                {
+                    cb_imageresolution.SelectedIndex = 2;
+
+                }
+                else if (edsType == "Oxford")
+                {
+                    cb_imageresolution.SelectedIndex = 0;
+
+                }
+                else if (edsType == "Bruker")
+                {
+                    cb_imageresolution.SelectedIndex = 1;
+
+                }
+                else if (edsType == "OffLine")
+                {
+                    cb_imageresolution.SelectedIndex = 1;
+                }
+                cb_Xdirection.SelectedIndex = 1;
+                cb_Ydirection.SelectedIndex = 0;
+            }
         }
     }
 }