Prechádzať zdrojové kódy

1.测量程序多语言
2.修改空库打开关闭编辑器后有报错的bug

cxs 2 rokov pred
rodič
commit
b678f37a74

+ 36 - 0
Bin/x64/Debug/Resources/XMLData/AppResource_EN.xml

@@ -904,6 +904,7 @@
 	  <Control name="rbTabHome" text="BasicFunction" />
 	  <Control name="rbPanelFile" text="ProjectDocuments" />
 	  <Control name="rbPanelSample" text="Sample operation and measurement area selection" />
+	  <Control name="rbSemFunction" text="SemControl" />
 	  <Control name="rbAddSample" text="Add" />
 	  <Control name="rbDeleteSample" text="Delete" />
 	  <Control name="ribReset" text="Reset" />
@@ -914,6 +915,7 @@
 	  <Control name="ribPolygon" text="Polygon" />
 	  <Control name="rbPanelFunction" text="MeasurementControl" />
 	  <Control name="rbStart" text="Start" />
+	  <Control name="rbPause" text="Pause" />
 	  <Control name="rbStop" text="Stop" />
 	  <Control name="rbCheckParam" text="CheckParam" />
 	  <Control name="rbPReport" text="Report" />
@@ -935,6 +937,7 @@
 	  <Control name="m_NoWindowName" text="UnknownWorkingWindow" />
 	  <Control name="rbSTDEdit" text="Edit standard library" />
 	  <Control name="rbReClassify" text="Reclassification" />
+	  <Control name="rbSysMgrApp" text="SystemSetting" />
 	  <Control name="rbConnectHardware" text="ConnectSem" />
 	  <Control name="rbDisconnectHardware" text="DisConnectSem" />
 	  <Control name="rbAutoBeamOff" text="AutoBeamOff" />
@@ -956,6 +959,19 @@
       <Control name="button_New" text="New" />
     </Controls>
  </Form>
+ <Form>
+   <Name>MeasureStopMode</Name>
+    <Controls>
+      <Control name="groupBox1" text="MeasureStopMode" />
+      <Control name="cB_CoverMode" text="1.CoverMode" />
+	  <Control name="cB_ParticleMode" text="2.ParticleMode" />
+      <Control name="cB_FieldMode" text="3.FieldMode" />
+	  <Control name="cB_TimeMode" text="4.TimeMode" />
+      <Control name="label1" text="s" />
+	  <Control name="cB_AreaMode" text="5.AreaMode" />
+      <Control name="label2" text="mm²" />
+    </Controls>
+ </Form>
  <Form>
     <Name>ProgMgrInfoForm</Name>
     <Controls>
@@ -1005,6 +1021,8 @@
 	  <Control name="label45" text="SmallParticleX-rayTime" />
 	  <Control name="label33" text="CountingExpectations" />
 	  <Control name="label31" text="ScanningMode(Large particles)" />
+	  <Control name="label47" text="XrayLimit" />
+	  <Control name="label49" text="Coefficient of corrosion expansion" />
 	  <Control name="label37" text="Analysis threshold" />
 	  <Control name="groupBox7" text="ModeSelection" />
 	  <Control name="lbModelSel" text="ModeSelection" />
@@ -1104,6 +1122,22 @@
 	  <Control name="diameterStart" text="diameterStart(um)" />
 	  <Control name="diameterEnd" text="diameterEnd(um)" />
 	  <Control name="collectXray" text="collectXray" />
+	  <Control name="rangeChoose" text="rangeChoose" />
+	  <Control name="checkBox1" text="Enable" />
+	  <Control name="button1" text="Add" />
+	  <Control name="button3" text="Delete" />
+	  <Control name="confirm" text="Confirm" />
+	  <Control name="button2" text="Cancel" />
+    </Controls>
+ </Form>
+ <Form>
+    <Name>frmSpecialGrayParticle</Name>
+    <Controls>
+      <Control name="frmSpecialGrayParticle" text="Set the foreground gray scale" />
+	  <Control name="groupBox1" text="Set parameters" />
+	  <Control name="label1" text="Grayscale range" />
+	  <Control name="btnYes" text="confirm" />
+	  <Control name="btnCancel" text="cancel" />
     </Controls>
  </Form>
  <Form>
@@ -1234,6 +1268,7 @@
     <Controls>
       <Control name="SampleParaLock" text="GetBSEDiagram" />
 	  <Control name="ViewStripMenuItem" text="Set the visual gray range of BSE image" />
+	  <Control name="toolStripMenuItem1" text="Set the grayscale range of special particles for visualization" />
 	  <Control name="ChangeDiffImageShow" text="SwitchToBSE" />
 	  <Control name="ToolStripMenuItem" text="De-backgroundImage " />
 	  <Control name="grayToolStripMenuItem" text="DisplayB-GrayCurve" />
@@ -1280,6 +1315,7 @@
 	  <Control name="DriveSEMToCurrentLocation" text="DriveSEMToCurrentLocation" />
 	  <Control name="ShootBSEPicture" text="ShootBSEPicture" />
 	  <Control name="DeleteBSEPicture" text="DeleteBSEPicture" />
+	  <Control name="SlopFocusMenuItem" text="InclinedPlaneFocus" />
 	  <Control name="message1" text="Start acquiring frame information " />
 	  <Control name="message2" text="Error log" />
 	  <Control name="message3" text="DriveSEMToCurrentLocation:--Error log" />

+ 22 - 4
Bin/x64/Debug/Resources/XMLData/AppResource_ZH.xml

@@ -881,9 +881,7 @@
           <Control name="ToolStripMenuItem_selected" text="选中这些颗粒" />
           <Control name="ToolStripMenuItem_delete" text="排除这些颗粒" />
 	  <Control name="另存选择颗粒ToolStripMenuItem" text="另存为" />
-	  <Control name="ToolStripMenuItem_movesempoint" text="移动SEM到当前位置" />
-	  <Control name="toolStripMenuItem_copyimage" text="导出原图拼接图" />
-	  <control name="ExportoriginalspliceToolStripMenuItem" text="导出原图拼接分类图"/>
+	  <Control name="ToolStripMenuItem_movesempoin MenuItem" text="导出原图拼接分类图"/>
 	  <Control name="str1" text="开始加载分布图信息" />
 	  <Control name="str2" text="已完成加载" />
 	  <Control name="str3" text="SEM位置:" />
@@ -953,6 +951,7 @@
 	  <Control name="rbTabHome" text="基本功能" />
 	  <Control name="rbPanelFile" text="项目文件" />
 	  <Control name="rbPanelSample" text="样品操作及测量区域选择" />
+	  <Control name="rbSemFunction" text="Sem控制" />
 	  <Control name="rbAddSample" text="添加" />
 	  <Control name="rbDeleteSample" text="删除" />
 	  <Control name="ribReset" text="复位" />
@@ -962,7 +961,8 @@
 	  <Control name="ribRectangle" text="矩形" />
 	  <Control name="ribPolygon" text="多边形" />
 	  <Control name="rbPanelFunction" text="测量控制" />
-	  <Control name="rbStart" text="开始" />
+	  <Control name="rbStart" text="开始" />、
+	  <Control name="rbPause" text="暂停" />
 	  <Control name="rbStop" text="停止" />
 	  <Control name="rbCheckParam" text="检测" />
 	  <Control name="rbPReport" text="查看分析结果" />
@@ -989,6 +989,7 @@
 	  <Control name="m_NoWindowName" text="未知工作窗口" />
 	  <Control name="rbSTDEdit" text="编辑标准库" />
 	  <Control name="rbReClassify" text="重新分类" />
+	  <Control name="rbSysMgrApp" text="系统设置" />
 	  <Control name="language" text="ZH" />
 	  <Control name="message1" text="无OTSIncA有效通行证!" />
 	  <Control name="message2" text="当前文件已修改是否保存?" />
@@ -999,6 +1000,19 @@
 	  <Control name="message7" text="测量条件正常!" />
     </Controls>
  </Form>
+ <Form>
+   <Name>MeasureStopMode</Name>
+    <Controls>
+      <Control name="groupBox1" text="测量结束方式" />
+      <Control name="cB_CoverMode" text="1.覆盖测量区域" />
+	  <Control name="cB_ParticleMode" text="2.终止夹杂物数" />
+      <Control name="cB_FieldMode" text="3.终止帧图数" />
+	  <Control name="cB_TimeMode" text="4.终止时间" />
+      <Control name="label1" text="秒" />
+	  <Control name="cB_AreaMode" text="5.终止测量区域面积" />
+      <Control name="label2" text="mm²" />
+    </Controls>
+ </Form>
  <Form>
     <Name>ProgMgrInfoForm</Name>
     <Controls>
@@ -1047,6 +1061,8 @@
 	  <Control name="label32" text="大颗粒X-ray时间" />
 	  <Control name="label45" text="小颗粒Xray时间" />
 	  <Control name="label33" text="分析X-ray计数期望值" />
+	  <Control name="label47" text="数量限值" />
+	  <Control name="label49" text="腐蚀膨胀系数" />
 	  <Control name="label31" text="扫描方式(大颗粒)" /> 
 	  <Control name="label37" text="分析阈值" />
 	  <Control name="groupBox7" text="模式选择" />
@@ -1257,6 +1273,7 @@
     <Controls>
       <Control name="SampleParaLock" text="获取BSE图" />
 	  <Control name="ViewStripMenuItem" text="设置BSE图可视化灰度范围" />
+	  <Control name="toolStripMenuItem1" text="可视化设置特殊颗粒灰度范围" />
 	  <Control name="ChangeDiffImageShow" text="切换至BSE图" />
 	  <Control name="ToolStripMenuItem" text="BSE去背景图" />
 	  <Control name="grayToolStripMenuItem" text="显示BSE灰度曲线图" />
@@ -1303,6 +1320,7 @@
 	  <Control name="DriveSEMToCurrentLocation" text="驱动SEM到当前位置" />
 	  <Control name="ShootBSEPicture" text="拍摄样品孔BSE照片" />
 	  <Control name="DeleteBSEPicture" text="删除BSE照片" />
+	  <Control name="SlopFocusMenuItem" text="斜面焦距" />
 	  <Control name="message1" text="开始获取帧图信息" />
 	  <Control name="message2" text="错误日志" />
 	  <Control name="message3" text="驱动SEM到当前位置:--错误日志信息" />

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

@@ -1,4 +1,4 @@
 <?xml version="1.0" standalone="yes"?>
 <Language>
-  <DefaultLanguage>ZH</DefaultLanguage>
+  <DefaultLanguage>EN</DefaultLanguage>
 </Language>

+ 9 - 0
OTSIncAMeasureApp/3-OTSDisplaySourceGridData/MeasureStopMode.cs

@@ -76,9 +76,18 @@ namespace OTSMeasureApp._3_OTSDisplaySourceGridData
                 return m_AreaMode;
             }
         }
+
+        //国际化
+        OTSCommon.Language lan;
+        System.Collections.Hashtable table;
+
         public MeasureStopMode()
         {
             InitializeComponent();
+
+            //国际化
+            lan = new OTSCommon.Language(this);
+            table = lan.GetNameTable(this.Name);
         }
 
         private void MeasureStopMode_Load(object sender, EventArgs e)

+ 1 - 0
OTSIncAMeasureApp/5-OTSMeasureStatuImageFun/frmSpecialGrayParticle.Designer.cs

@@ -202,6 +202,7 @@
             this.Controls.Add(this.groupBox1);
             this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.Name = "frmSpecialGrayParticle";
+            this.ShowIcon = false;
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.Text = "设置前景灰度范围";
             this.Load += new System.EventHandler(this.frmSpecialGrayParticle_Load);

+ 2 - 2
OTSIncAMeasureApp/7-OTSProgMgrInfo/ProgMgrInfoForm.designer.cs

@@ -952,10 +952,10 @@
             // IDC_COMBO_CorrosionExpansionCoefficient
             // 
             this.IDC_COMBO_CorrosionExpansionCoefficient.FormattingEnabled = true;
-            this.IDC_COMBO_CorrosionExpansionCoefficient.Location = new System.Drawing.Point(125, 153);
+            this.IDC_COMBO_CorrosionExpansionCoefficient.Location = new System.Drawing.Point(219, 153);
             this.IDC_COMBO_CorrosionExpansionCoefficient.Margin = new System.Windows.Forms.Padding(2);
             this.IDC_COMBO_CorrosionExpansionCoefficient.Name = "IDC_COMBO_CorrosionExpansionCoefficient";
-            this.IDC_COMBO_CorrosionExpansionCoefficient.Size = new System.Drawing.Size(92, 20);
+            this.IDC_COMBO_CorrosionExpansionCoefficient.Size = new System.Drawing.Size(70, 20);
             this.IDC_COMBO_CorrosionExpansionCoefficient.TabIndex = 825;
             this.IDC_COMBO_CorrosionExpansionCoefficient.TextChanged += new System.EventHandler(this.IDC_COMBO_CorrosionExpansionCoefficient_TextChanged);
             // 

+ 57 - 57
OTSIncAMeasureApp/7-OTSProgMgrInfo/SpecialParticleForm.Designer.cs

@@ -30,6 +30,12 @@ namespace OTSMeasureApp
         private void InitializeComponent()
         {
             this.dg1 = new System.Windows.Forms.DataGridView();
+            this.confirm = new System.Windows.Forms.Button();
+            this.button2 = new System.Windows.Forms.Button();
+            this.button1 = new System.Windows.Forms.Button();
+            this.button3 = new System.Windows.Forms.Button();
+            this.groupBox1 = new System.Windows.Forms.GroupBox();
+            this.checkBox1 = new System.Windows.Forms.CheckBox();
             this.RegName = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.start = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.end = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -37,12 +43,6 @@ namespace OTSMeasureApp
             this.diameterEnd = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.collectXray = new System.Windows.Forms.DataGridViewCheckBoxColumn();
             this.rangeChoose = new System.Windows.Forms.DataGridViewButtonColumn();
-            this.confirm = new System.Windows.Forms.Button();
-            this.button2 = new System.Windows.Forms.Button();
-            this.button1 = new System.Windows.Forms.Button();
-            this.button3 = new System.Windows.Forms.Button();
-            this.groupBox1 = new System.Windows.Forms.GroupBox();
-            this.checkBox1 = new System.Windows.Forms.CheckBox();
             ((System.ComponentModel.ISupportInitialize)(this.dg1)).BeginInit();
             this.groupBox1.SuspendLayout();
             this.SuspendLayout();
@@ -68,57 +68,6 @@ namespace OTSMeasureApp
             this.dg1.TabIndex = 2;
             this.dg1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dg1_CellContentClick);
             // 
-            // RegName
-            // 
-            this.RegName.DataPropertyName = "RegName";
-            this.RegName.HeaderText = "名称";
-            this.RegName.Name = "RegName";
-            this.RegName.Width = 80;
-            // 
-            // start
-            // 
-            this.start.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.start.DataPropertyName = "start";
-            this.start.HeaderText = "开始灰度(0-255)";
-            this.start.Name = "start";
-            // 
-            // end
-            // 
-            this.end.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.end.DataPropertyName = "end";
-            this.end.HeaderText = "结束灰度(0-255)";
-            this.end.Name = "end";
-            // 
-            // diameterStart
-            // 
-            this.diameterStart.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.diameterStart.DataPropertyName = "diameterStart";
-            this.diameterStart.HeaderText = "开始直径(微米)";
-            this.diameterStart.Name = "diameterStart";
-            // 
-            // diameterEnd
-            // 
-            this.diameterEnd.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.diameterEnd.DataPropertyName = "diameterEnd";
-            this.diameterEnd.HeaderText = "结束直径(微米)";
-            this.diameterEnd.Name = "diameterEnd";
-            // 
-            // collectXray
-            // 
-            this.collectXray.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
-            this.collectXray.DataPropertyName = "collectXray";
-            this.collectXray.HeaderText = "是否采集Xray";
-            this.collectXray.Name = "collectXray";
-            this.collectXray.Resizable = System.Windows.Forms.DataGridViewTriState.True;
-            this.collectXray.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
-            // 
-            // rangeChoose
-            // 
-            this.rangeChoose.HeaderText = "可视化选择";
-            this.rangeChoose.Name = "rangeChoose";
-            this.rangeChoose.Text = "灰度选择";
-            this.rangeChoose.UseColumnTextForButtonValue = true;
-            // 
             // confirm
             // 
             this.confirm.Location = new System.Drawing.Point(538, 378);
@@ -178,6 +127,57 @@ namespace OTSMeasureApp
             this.checkBox1.Text = "启用";
             this.checkBox1.UseVisualStyleBackColor = true;
             // 
+            // RegName
+            // 
+            this.RegName.DataPropertyName = "RegName";
+            this.RegName.HeaderText = "名称";
+            this.RegName.Name = "RegName";
+            this.RegName.Width = 80;
+            // 
+            // start
+            // 
+            this.start.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.start.DataPropertyName = "start";
+            this.start.HeaderText = "开始灰度(0-255)";
+            this.start.Name = "start";
+            // 
+            // end
+            // 
+            this.end.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.end.DataPropertyName = "end";
+            this.end.HeaderText = "结束灰度(0-255)";
+            this.end.Name = "end";
+            // 
+            // diameterStart
+            // 
+            this.diameterStart.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.diameterStart.DataPropertyName = "diameterStart";
+            this.diameterStart.HeaderText = "开始直径(微米)";
+            this.diameterStart.Name = "diameterStart";
+            // 
+            // diameterEnd
+            // 
+            this.diameterEnd.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.diameterEnd.DataPropertyName = "diameterEnd";
+            this.diameterEnd.HeaderText = "结束直径(微米)";
+            this.diameterEnd.Name = "diameterEnd";
+            // 
+            // collectXray
+            // 
+            this.collectXray.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
+            this.collectXray.DataPropertyName = "collectXray";
+            this.collectXray.HeaderText = "是否采集Xray";
+            this.collectXray.Name = "collectXray";
+            this.collectXray.Resizable = System.Windows.Forms.DataGridViewTriState.True;
+            this.collectXray.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
+            // 
+            // rangeChoose
+            // 
+            this.rangeChoose.HeaderText = "可视化选择";
+            this.rangeChoose.Name = "rangeChoose";
+            this.rangeChoose.Text = "GrayLevel";
+            this.rangeChoose.UseColumnTextForButtonValue = true;
+            // 
             // SpecialParticleForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);

+ 4 - 3
OTSIncAMeasureApp/OTSIncAMeasureAppForm.cs

@@ -1155,7 +1155,7 @@ namespace OTSMeasureApp
             foreach (var s in this.m_ProjData.GetSampleList())
             {
                var stdname= s.GetMsrParams().GetSTDName();
-                if (stdname != "NoSTD")
+                if (stdname != "NoSTDDB")
                 {
                     if (!stdname.Contains(".db"))
                     {
@@ -1176,8 +1176,9 @@ namespace OTSMeasureApp
             catch (Exception ex)
             {
                 log.Error("OTSSysMgrApp:" + ex.ToString());
-            } 
-            
+            }
+
+
         }
 
         private void ribPolygon_Click(object sender, EventArgs e)