Bladeren bron

修改报告程序中调用无效函数DisConnectSem,EDSFinishedInstance,ScanFinishedInstance

zhangjiaxin 4 jaren geleden
bovenliggende
commit
6feafb53af

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

@@ -405,12 +405,12 @@ namespace OTSIncAReportGraph.OTSIncAReportGraphFuncation
                 string str4 = "电镜是已经连接的状态,准备断开";
                 str4 = table["str4"].ToString();
                 log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + str4 + ":--" + m_SEMConnectionState + "---");
-                if (m_cfun.DisConnectSem())
-                {
-                    string str5 = "电镜是已经连接的状态,完成断开后状态";
-                    str5 = table["str5"].ToString();
-                    log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + str5 + ":--" + m_SEMConnectionState + "---");
-                }
+                //if (m_cfun.DisConnectSem())
+                //{
+                //    string str5 = "电镜是已经连接的状态,完成断开后状态";
+                //    str5 = table["str5"].ToString();
+                //    log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + str5 + ":--" + m_SEMConnectionState + "---");
+                //}
             }
         }
 
@@ -444,12 +444,12 @@ namespace OTSIncAReportGraph.OTSIncAReportGraphFuncation
                 string str9 = "电镜是已经连接的状态,准备断开";
                 str9 = table["str9"].ToString();
                 log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)str9:--" + m_SEMConnectionState + "---");
-                if (m_cfun.DisConnectSem())
-                {
-                    string str10 = "电镜是已经连接的状态,完成断开后状态";
-                    str10 = table["str10"].ToString();
-                    log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + str10 + ":--" + m_SEMConnectionState + "---");
-                }
+                //if (m_cfun.DisConnectSem())
+                //{
+                //    string str10 = "电镜是已经连接的状态,完成断开后状态";
+                //    str10 = table["str10"].ToString();
+                //    log.Trace("(Connection_ForDrawDistrbutionImageAndBSE)" + str10 + ":--" + m_SEMConnectionState + "---");
+                //}
             }
         }
 
@@ -551,12 +551,12 @@ namespace OTSIncAReportGraph.OTSIncAReportGraphFuncation
             string str21 = "准备关闭电镜连接";
             str21 = table["str21"].ToString();
             log.Trace("(DisConnectSEM_ForDrawDistrbutionImageAndBSE)" + str21);
-            if (m_cfun.DisConnectSem() == true)
-            {
-                string str22 = "准备关闭电镜连接";
-                str22 = table["str22"].ToString();
-                log.Trace("(DisConnectSEM_ForDrawDistrbutionImageAndBSE)" + str22);
-            }
+            //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);
@@ -573,10 +573,10 @@ namespace OTSIncAReportGraph.OTSIncAReportGraphFuncation
             string str24 = "准备关闭电镜连接";
             str24 = table["str24"].ToString();
             log.Trace("(DisConnectSEM_ForDrawDistrbutionImageAndBSE)" + str24);
-            if (m_cfun.DisConnectSem() == true)
-            {
-                log.Trace("(DisConnectSEM_ForDrawDistrbutionImageAndBSE)" + str24);
-            }
+            //if (m_cfun.DisConnectSem() == true)
+            //{
+            //    log.Trace("(DisConnectSEM_ForDrawDistrbutionImageAndBSE)" + str24);
+            //}
             string str25 = "准备释放DLL";
             str25 = table["str25"].ToString();
             log.Trace("(DisConnectSEM_ForDrawDistrbutionImageAndBSE)" + str25);

+ 1 - 1
OTSPartA_STDEditor/Form_STDConstantsEditor.cs

@@ -3548,7 +3548,7 @@ namespace OTSPartA_STDEditor
             finally
             {
                 //EDS过程结束
-                m_cfun.EDSFinishedInstance();
+                //m_cfun.EDSFinishedInstance();
 
                 //关闭连接
                 DisConnectSem(connectionEnumType.EDSOnlyPointXRay);

+ 2 - 2
OTSPartA_STDEditor/STDEditor.cs

@@ -547,7 +547,7 @@ namespace OTSPartA_STDEditor
             finally
             {
                 //EDS过程结束
-                m_cfun.EDSFinishedInstance();
+                //m_cfun.EDSFinishedInstance();
 
                 //关闭连接
                 DisConnectSem(connectionEnumType.EDSOnlyPointXRay);
@@ -722,7 +722,7 @@ namespace OTSPartA_STDEditor
             bool bDisConnResult = false;
             if (m_bConnectionState)
             {
-                bDisConnResult = m_cfun.DisConnectSem();
+                //bDisConnResult = m_cfun.DisConnectSem();
             }
             if (bDisConnResult)
             {

+ 2 - 2
OTSPartA_STDEditor/XrayContrastForm.cs

@@ -693,7 +693,7 @@ namespace OTSPartA_STDEditor
             finally
             {
                 //EDS过程结束
-                m_cfun.EDSFinishedInstance();
+                //m_cfun.EDSFinishedInstance();
 
                 //关闭连接
                 DisConnectSem(connectionEnumType.EDSOnlyPointXRay);
@@ -732,7 +732,7 @@ namespace OTSPartA_STDEditor
             bool bDisConnResult = false;
             if (m_bConnectionState)
             {
-                bDisConnResult = m_cfun.DisConnectSem();
+                //bDisConnResult = m_cfun.DisConnectSem();
             }
             if (bDisConnResult)
             {

+ 9 - 9
OTSSysMgrApp/ControllerSettingForm.cs

@@ -127,7 +127,7 @@ namespace OTSSysMgrApp
             bool DisConnResult = false;
            if (ConnectionState)
             {
-                DisConnResult = cfun.DisConnectSem();
+                //DisConnResult = cfun.DisConnectSem();
             }
             if (DisConnResult)
             {
@@ -355,7 +355,7 @@ namespace OTSSysMgrApp
                 btnClearData.Enabled = true;
                 btnClearData.Refresh();
                 //EDS过程结束
-                cfun.EDSFinishedInstance();
+                //cfun.EDSFinishedInstance();
                 //关闭连接
                 DisConnectSem(connectionEnumType.EDSOnlyPointXRay);
             }
@@ -380,7 +380,7 @@ namespace OTSSysMgrApp
                 //绑定数据源
                 chartData(XData, a_XrayData);
                 //EDS过程结束
-                cfun.EDSFinishedInstance();
+                //cfun.EDSFinishedInstance();
             }
             catch (Exception ex)
             {
@@ -834,13 +834,13 @@ namespace OTSSysMgrApp
                 if (tabSetting.SelectedIndex == 0)
                 {
                     //线程调用 关闭Scan EDSInit初始化
-                    cfun.ScanFinishedInstance();
+                    //cfun.ScanFinishedInstance();
                     EDSInit();
                 }
                 else if (tabSetting.SelectedIndex == 1)
                 {
                     //线程调用 关闭EDS  ScanInit初始化
-                    cfun.EDSFinishedInstance();
+                    //cfun.EDSFinishedInstance();
                     ScanInit();
                 }
             }
@@ -928,7 +928,7 @@ namespace OTSSysMgrApp
                 btnClearData.Enabled = true;
                 btnClearData.Refresh();
                 //EDS过程结束
-                cfun.EDSFinishedInstance();
+                //cfun.EDSFinishedInstance();
                 //关闭连接
                 DisConnectSem(connectionEnumType.EDSMultiPointXRay);
             }
@@ -1003,7 +1003,7 @@ namespace OTSSysMgrApp
                 btnClearData.Enabled = true;
                 btnClearData.Refresh();
                 //EDS过程结束
-                cfun.EDSFinishedInstance();
+                //cfun.EDSFinishedInstance();
                 //关闭连接
                 DisConnectSem(connectionEnumType.EDSAreaXRay);
             }
@@ -1044,7 +1044,7 @@ namespace OTSSysMgrApp
                 lbXrayCount.Text = nXrayCount.ToString();
                 chartXRay.Refresh();
                 //EDS过程结束
-                cfun.EDSFinishedInstance();
+                //cfun.EDSFinishedInstance();
                 log.Info("Cleared successfully!");
             }
             catch (Exception ex)
@@ -1134,7 +1134,7 @@ namespace OTSSysMgrApp
                 btnClearData.Enabled = true;
                 btnClearData.Refresh();
                 //EDS过程结束
-                cfun.EDSFinishedInstance();
+                //cfun.EDSFinishedInstance();
                 //关闭连接
                 DisConnectSem(connectionEnumType.EDSAreaXRay);
             }

+ 9 - 9
OTSSysMgrApp/SemTestForms.cs

@@ -499,14 +499,14 @@ namespace OTSSysMgrApp
             {
                 string str = table["str2"].ToString();
                 //断开电镜连接
-                if (cfun.DisConnectSem())
-                {
-                    log.Info(table["message10"].ToString());
-                }
-                else
-                {
-                    //ShowMessage(9);
-                }
+                //if (cfun.DisConnectSem())
+                //{
+                //    log.Info(table["message10"].ToString());
+                //}
+                //else
+                //{
+                //    //ShowMessage(9);
+                //}
                 BtnConnect.Text = str;
                 ConnectionState = false;
                 GetBtnState(false);
@@ -518,7 +518,7 @@ namespace OTSSysMgrApp
             try
             {
                 //断开电镜连接
-                cfun.DisConnectSem();
+                //cfun.DisConnectSem();
                 //释放DLL内存
                 cfun.FreeHardware();