Beispiel #1
0
 public TcpCore(NewConnParam p)
 {
     this.param = p;
     this.tcp   = new TcpClient();
     if (!string.IsNullOrWhiteSpace(p.SavePath))
     {
         this.fs = File.Create(p.SavePath);
     }
     Debug.WriteLine("new TcpCore");
 }
Beispiel #2
0
 public SerialPortCore(NewConnParam p)
 {
     param = p;
     port  = new SerialPort(p.Type, p.BaudRate, Parity.None, p.Data, (StopBits)p.StopBits);
     if (!string.IsNullOrWhiteSpace(p.SavePath))
     {
         fs = File.Create(p.SavePath);
     }
     Debug.WriteLine("new SerialPortCore");
 }