Ejemplo n.º 1
0
 public void setupConection(string IPString, int port)
 {
     //string IPString = ConfigurationManager.AppSettings["machineip"];
     //int port = 0;
     //int.TryParse(ConfigurationManager.AppSettings["machineport"], out port);
     //string productLine = ConfigurationManager.AppSettings["productline"];
     netWorkServer = NetWorkServer.CreateInstance(IPString, port);
     netWorkServer.NetConnectChanged += NetWorkServer_NetConnectChanged;
     netWorkServer.ReciveDataEvent   += NetWorkServer_ReciveDataEvent;
     // DisplayDataEvent += ExecuteQueue_DisplayDataEvent;
 }
Ejemplo n.º 2
0
 public static NetWorkServer CreateInstance(string ip, int port)
 {
     if (_instance == null)
     {
         lock (lockHelper)
         {
             if (_instance == null)
             {
                 _instance = new NetWorkServer(ip, port);
             }
         }
     }
     return(_instance);
 }