浏览代码

ipc优化

CXS 3 年之前
父节点
当前提交
b77f59b7b1
共有 1 个文件被更改,包括 5 次插入4 次删除
  1. 5 4
      OTSIncAReportApp/3-ServiceCenter/SemController.cs

+ 5 - 4
OTSIncAReportApp/3-ServiceCenter/SemController.cs

@@ -20,16 +20,17 @@ namespace ServiceInterface
         private IpcSEMController remoteObj;
         private IpcSEMController remoteObj;
         public SemController()
         public SemController()
         {
         {
-            IpcClientChannel channel = new IpcClientChannel();
-            //Register the channel with ChannelServices.
-            ChannelServices.RegisterChannel(channel, false);
+       
          
          
 
 
         }
         }
 
 
         public bool Connect()
         public bool Connect()
         {
         {
-             remoteObj = (IpcSEMController)Activator.GetObject(typeof(IpcSEMController), "ipc://ServerChannel/RemoteObject");
+            IpcClientChannel channel = new IpcClientChannel();
+            //Register the channel with ChannelServices.
+            ChannelServices.RegisterChannel(channel, false);
+            remoteObj = (IpcSEMController)Activator.GetObject(typeof(IpcSEMController), "ipc://ServerChannel/RemoteObject");
    
    
             if (remoteObj == null)
             if (remoteObj == null)
             {
             {