示例#1
0
 private void button5_Click(object sender, EventArgs e)
 {
     if (pcu != null)
     {
         pcu.TestRomote();
     }
 }
示例#2
0
 private PCUSimulator getPCUObject()
 {
     try
     {
         ChannelServices.RegisterChannel(new TcpClientChannel(), false);
         PCUSimulator simulator = (PCUSimulator)Activator.GetObject(typeof(PCUSimulator), "tcp://localhost:6688/PCUSimulater");
         simulator.TestRomote();
         if (simulator != null)
         {
             //  MessageBox.Show("成功获取remote PCU");
         }
         return(simulator);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }