Example #1
0
 public void setupConection(string ip, int port)
 {
     try
     {
         Ip = ip;
         //string IPString = ConfigurationManager.AppSettings["machineip"];
         //int port = 0;
         //int.TryParse(ConfigurationManager.AppSettings["machineport"], out port);
         //string productLine = ConfigurationManager.AppSettings["productline"];
         //netWorkServer = NetWorkServer.CreateInstance(ip, port);
         netWorkServer = new NetWorkServer(ip, port);
         NetConnectStat stu = netWorkServer.NetStat;
         netWorkServer.NetConnectChanged += NetWorkServer_NetConnectChanged;
         netWorkServer.ReciveDataEvent   += NetWorkServer_ReciveDataEvent;
         // DisplayDataEvent += ExecuteQueue_DisplayDataEvent;
     }
     catch (Exception e)
     {
         LogClass.WriteLogFile("Class-ExecuteQueue;Fun-setupConnection; 行号67:" + e.Message);
         //throw;
     }
 }
Example #2
0
 private void NetWorkServer_NetConnectChanged(object sender, NetConnectArgs e)
 {
     Netstat = e.NetStat;
     OnNetConnectChanged(e);
 }
Example #3
0
 private void NetWorkServer_NetConnectChanged(object sender, NetConnectArgs e)
 {
     Netstat = e.NetStat;
     OnNetConnectChanged(e);
     //Console.WriteLine(e.NetStat.ToString() + Ip);
 }
Example #4
0
 public NetConnectArgs(NetConnectStat netstat)
 {
     NetStat = netstat;
 }