Пример #1
0
 public static void Open()
 {
     switch (CommunicationWay)
     {
         case 0:
             {
                 UsbCommunication.OpenPort();
                 break;
             }
         default:
             {
                 UsbCommunication.OpenPort();
                 break;
             }
     }
 }
Пример #2
0
 public static void Read(byte[] GetByte)
 {
     switch (CommunicationWay)
     {
         case 0:
             {
                 UsbCommunication.Read(GetByte);
                 break;
             }
         default:
             {
                 UsbCommunication.Read(GetByte);
                 break;
             }
     }
 }
Пример #3
0
 public static void Init()
 {
     switch (CommunicationWay)
     {
         case 0:
             {
                 UsbCommunication.Init();
                 break;
             }
         default:
             {
                 UsbCommunication.Init();
                 break;
             }
     }
 }
Пример #4
0
 public static void Write(byte[] SendByte)
 {
     switch (CommunicationWay)
     {
         case 0:
             {
                 UsbCommunication.Write(SendByte);
                 break;
             }
         default:
             {
                 UsbCommunication.Write(SendByte);
                 break;
             }
     }
 }
Пример #5
0
 public static bool IsOpen()
 {
     switch (CommunicationWay)
     {
         case 0:
             {
                 if (UsbCommunication.IsOpen()==1)
                 {
                     return true;
                 }
                 break;
             }
         default:
             {
                 if (UsbCommunication.IsOpen() == 1)
                 {
                     return true;
                 }
                 break;
             }
     }
     return false;
 }