Exemplo n.º 1
0
 public void Close()
 {
     if (IsOpen)
     {
         if (Path != null)
         {
             Path.Clear();
         }
         JSONCommand jsonCommmand = new JSONCommand()
         {
             Command = JSONCommand.CommandTypes.Close
         };
         Send(jsonCommmand);
         serialPort.DataReceived -= SerialDataReceivedEventHandler;
         serialPort.Close();
     }
     Status = StatusTypes.Disconnected;
 }
Exemplo n.º 2
0
 public void Send(JSONCommand jsonCommand)
 {
     Send(jsonCommand.Serialize());
 }