Procházet zdrojové kódy

修改报告程序中输出为英文

CXS před 4 roky
rodič
revize
71a3b11fe2

+ 22 - 67
OTSIncAReportApp/Control_Graph/OTSIncAReportGraphFuncation/OTSIncAReportFun.cs

@@ -382,30 +382,22 @@ namespace OTSIncAReportGraph.OTSIncAReportGraphFuncation
         /// </summary>
         public void Connection_ForDrawDistrbutionImageAndBSE()
         {
-            string str1 = "分布图准备开始连接SEM电镜";
-            str1 = table["str1"].ToString();
-            log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + str1);
+            log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + "Distribution map ready to start connecting SEM");
             if (!m_SEMConnectionState)
             {
                 
                 //和电镜建立通讯连接
                 m_SEMConnectionState = m_cfun.ConncetSem();
-                string str2 = "调用连接后状态";
-                str2 = table["str2"].ToString();
-                log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + str2 + ":--" + m_SEMConnectionState + "---");
+                log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + "State after calling the connection" + ":--" + m_SEMConnectionState + "---");
 
                 ///获取当前电镜的ID号
                 m_SEM_ID = m_cfun.GetSemType();
-                string str3 = "获得电镜的ID";
-                str3 = table["str3"].ToString();
-                log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + str3 + ":--" + m_SEM_ID.ToString() + "---");
+                log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + "The ID of electron microscope obtained" + ":--" + m_SEM_ID.ToString() + "---");
             }
             else
             {
                 //断开电镜连接
-                string str4 = "电镜是已经连接的状态,准备断开";
-                str4 = table["str4"].ToString();
-                log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + str4 + ":--" + m_SEMConnectionState + "---");
+                log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + "The electron microscope is in a connected state and ready to disconnect" + ":--" + m_SEMConnectionState + "---");
                 //if (m_cfun.DisConnectSem())
                 //{
                 //    string str5 = "电镜是已经连接的状态,完成断开后状态";
@@ -420,31 +412,23 @@ namespace OTSIncAReportGraph.OTSIncAReportGraphFuncation
         /// </summary>
         public void Connection_ForDrawDistrbutionSortImage()
         {
-            string str6 = "分布图准备开始连接SEM电镜";
-            str6 = table["str6"].ToString();
-            log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + str6);
+            log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + "Distribution map ready to start connecting SEM");
             if (!m_SEMConnectionState)
             {
                 m_cfun = new COTSControlFunExport();//重新new一下试试呢,不New并不好用   It's better to reinitialize, but it's not good to uninitialize
 
                 //和电镜建立通讯连接
                 m_SEMConnectionState = m_cfun.ConncetSem();
-                string str7 = "调用连接后状态";
-                str7 = table["str7"].ToString();
-                log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + str7 + ":--" + m_SEMConnectionState + "---");
+                log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + "State after calling the connection" + ":--" + m_SEMConnectionState + "---");
 
                 ///获取当前电镜的ID号
                 m_SEM_ID = m_cfun.GetSemType();
-                string str8 = "获得电镜的ID";
-                str8 = table["str8"].ToString();
-                log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + str8 + ":--" + m_SEM_ID.ToString() + "---");
+                log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + "The ID of electron microscope obtained" + ":--" + m_SEM_ID.ToString() + "---");
             }
             else
             {
                 //断开电镜连接
-                string str9 = "电镜是已经连接的状态,准备断开";
-                str9 = table["str9"].ToString();
-                log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)str9:--" + m_SEMConnectionState + "---");
+                log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + "The electron microscope is in a connected state and ready to disconnect" + ":--" + m_SEMConnectionState + "---");
                 //if (m_cfun.DisConnectSem())
                 //{
                 //    string str10 = "电镜是已经连接的状态,完成断开后状态";
@@ -461,9 +445,7 @@ namespace OTSIncAReportGraph.OTSIncAReportGraphFuncation
         /// <param name="PositionY"></param>
         public void MoveSemToPointXY_ForDrawDistrbutionImageAndBSE(double in_PositionX, double in_PositionY)
         {
-            string str11 = "分布图准备开始移动电镜到";
-            str11 = table["str11"].ToString();
-            log.Trace("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + str11);
+            log.Trace("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + "DistrbutionImage is  ready to move Sem to");
 
             //首先获取电镜当前的位置,并记录原R值
             double ls_PositionX = 0;
@@ -473,29 +455,21 @@ namespace OTSIncAReportGraph.OTSIncAReportGraphFuncation
             if (m_SEMConnectionState)
             {
                 m_cfun.GetSemPositionXY(ref ls_PositionX, ref ls_PositionY, ref ls_PositionR);
-                string str12 = "获取原先电镜位置为X";
-                str12 = table["str12"].ToString();
-                log.Trace("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + str12 + ":" + ls_PositionX.ToString() + " Y:" + ls_PositionY.ToString() + " R:" + ls_PositionR.ToString());
+                log.Trace("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + "Obtain the original electron microscope position as X" + ":" + ls_PositionX.ToString() + " Y:" + ls_PositionY.ToString() + " R:" + ls_PositionR.ToString());
             }
             else
             {
-                string str13 = "获取电镜位置时状态错误";
-                str13 = table["str13"].ToString();
-                log.Error("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + str13);
+                log.Error("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + "Error obtaining electron microscope position");
             }
 
             if (m_SEMConnectionState)
             {
                 m_cfun.MoveSEMToPoint(in_PositionX, in_PositionY, ls_PositionR);
-                string str14 = "移动电镜到指定位置";
-                str14 = table["str14"].ToString();
-                log.Trace("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + str14 + ":" + in_PositionX.ToString() + " Y:" + in_PositionY.ToString() + " R:" + ls_PositionR.ToString());
+                log.Trace("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + "Move electron microscope to specified position" + ":" + in_PositionX.ToString() + " Y:" + in_PositionY.ToString() + " R:" + ls_PositionR.ToString());
             }
             else
             {
-                string str15 = "移动电镜时状态错误";
-                str15 = table["str15"].ToString();
-                log.Error("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + str15);
+                log.Error("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + "Status error while moving electron microscope");
             }
         }
 
@@ -506,9 +480,7 @@ namespace OTSIncAReportGraph.OTSIncAReportGraphFuncation
         /// <param name="PositionY"></param>
         public void MoveSemToPointXY_ForDrawDistrbutionSortImage(double in_PositionX, double in_PositionY)
         {
-            string str16 = "分布图准备开始移动电镜到";
-            str16 = table["str16"].ToString();
-            log.Trace("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + str16);
+            log.Trace("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + "DistrbutionImage is  ready to move Sem to");
 
             //首先获取电镜当前的位置,并记录原R值
             double ls_PositionX = 0;
@@ -517,30 +489,21 @@ namespace OTSIncAReportGraph.OTSIncAReportGraphFuncation
 
             if (m_SEMConnectionState)
             {
-                string str17 = "获取原先电镜位置为X";
-                str17 = table["str17"].ToString();
-                m_cfun.GetSemPositionXY(ref ls_PositionX, ref ls_PositionY, ref ls_PositionR);
-                log.Trace("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + str17 + ":" + ls_PositionX.ToString() + " Y:" + ls_PositionY.ToString() + " R:" + ls_PositionR.ToString());
+                log.Trace("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + "Obtain the original electron microscope position as X" + ":" + ls_PositionX.ToString() + " Y:" + ls_PositionY.ToString() + " R:" + ls_PositionR.ToString());
             }
             else
             {
-                string str18 = "获取电镜位置时状态错误";
-                str18 = table["str18"].ToString();
-                log.Error("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + str18);
+                log.Error("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + "Error obtaining electron microscope position");
             }
 
             if (m_SEMConnectionState)
             {
                 m_cfun.MoveSEMToPoint(in_PositionX, in_PositionY, ls_PositionR);
-                string str19 = "移动电镜到指定位置";
-                str19 = table["str19"].ToString();
-                log.Trace("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + str19 + ":" + in_PositionX.ToString() + " Y:" + in_PositionY.ToString() + " R:" + ls_PositionR.ToString());
+                log.Trace("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + "Move electron microscope to specified position" + ":" + in_PositionX.ToString() + " Y:" + in_PositionY.ToString() + " R:" + ls_PositionR.ToString());
             }
             else
             {
-                string str20 = "移动电镜时状态错误";
-                str20 = table["str20"].ToString();
-                log.Error("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + str20);
+                log.Error("(MoveSemToPointXY_ForDrawDistrbutionImageAndBSE)" + "Status error while moving electron microscope");
             }
         }
 
@@ -549,18 +512,14 @@ namespace OTSIncAReportGraph.OTSIncAReportGraphFuncation
         /// </summary>
         public void DisConnectSEM_ForDrawDistrbutionImageAndBSE()
         {
-            string str21 = "准备关闭电镜连接";
-            str21 = table["str21"].ToString();
-            log.Trace("(DisConnectSEM_ForDrawDistrbutionImageAndBSE)" + str21);
+            log.Trace("(DisConnectSEM_ForDrawDistrbutionImageAndBSE)" + "Prepare to close the SEM link");
             //if (m_cfun.DisConnectSem() == true)
             //{
             //    string str22 = "准备关闭电镜连接";
             //    str22 = table["str22"].ToString();
             //    log.Trace("(DisConnectSEM_ForDrawDistrbutionImageAndBSE)" + str22);
             //}
-            string str23 = "准备释放DLL";
-            str23 = table["str23"].ToString();
-            log.Trace("(DisConnectSEM_ForDrawDistrbutionImageAndBSE)" + str23);
+            log.Trace("(DisConnectSEM_ForDrawDistrbutionImageAndBSE)" + "Preparing to free the DLL");
             //m_cfun.FreeHardware();
 
             m_SEMConnectionState = false;
@@ -571,16 +530,12 @@ namespace OTSIncAReportGraph.OTSIncAReportGraphFuncation
         /// </summary>
         public void DisConnectSEM_ForDrawDistrbutionSortImage()
         {
-            string str24 = "准备关闭电镜连接";
-            str24 = table["str24"].ToString();
-            log.Trace("(DisConnectSEM_ForDrawDistrbutionImageAndBSE)" + str24);
+            log.Trace("(DisConnectSEM_ForDrawDistrbutionImageAndBSE)" + "Prepare to close the SEM link");
             //if (m_cfun.DisConnectSem() == true)
             //{
             //    log.Trace("(DisConnectSEM_ForDrawDistrbutionImageAndBSE)" + str24);
             //}
-            string str25 = "准备释放DLL";
-            str25 = table["str25"].ToString();
-            log.Trace("(DisConnectSEM_ForDrawDistrbutionImageAndBSE)" + str25);
+            log.Trace("(DisConnectSEM_ForDrawDistrbutionImageAndBSE)" + "Preparing to free the DLL");
             m_cfun.FreeHardware();
 
             m_SEMConnectionState = false;