Ejemplo n.º 1
0
 public bool OpenRs232(string readerName)
 {
     BaseConnect = new ConnectedTypeSerial();
     BaseConnect.ReceivedCombineMethod(new delegateMessageReceived(this.SortMessage));
     if (BaseConnect.Connected(readerName))
     {
         this.ReaderName         = readerName;
         BaseConnect.isConnected = true;
         LinkStatus = true;
         return(true);
     }
     else
     {
         this.Close();
         return(false);
     }
 }
Ejemplo n.º 2
0
 public bool Close()
 {
     try
     {
         if (BaseConnect != null)
         {
             LinkStatus = false;
             BaseConnect.isConnected = false;
             BaseConnect.Closed();
             BaseConnect.RececivedRemoveMethod(new delegateMessageReceived(this.SortMessage));
             BaseConnect = null;
             return(true);
         }
     }
     catch { }
     return(false);
 }