示例#1
0
 private void Host()
 {
     bool isHostConnected = false;
     this.abortHost = false;
     while (!isHostConnected)
     {
         if (this.abortHost)
         {
             this.StopHostTimer();
             this.ReloadCheckError(-1002);
             return;
         }
         int status = UsbIPUtil.isHostConnected();
         if (status == -1001)
         {
             this.ReloadCheckError(status);
             return;
         }
         if (status != -1002 && status == 0)
         {
             this.HostConnected();
             this.ReConnectControl();
             return;
         }
         Thread.Sleep(5000);
     }
 }