public ConnectInfoType(ConnectType ConnectType, string IpAddressOrComPortName, int IpPortOrComPortBaudRate) { this.ConnectType = ConnectType; switch (ConnectType) { case ConnectType.DIRECT: this.ComPortInfo = new ComPortInfo(IpAddressOrComPortName, IpPortOrComPortBaudRate); this.NetWorkInfo = new NetWorkInfo(); this.TimeInfo = new TimeInfo(); break; case ConnectType.TCPIP: this.ComPortInfo = new ComPortInfo(); this.NetWorkInfo = new NetWorkInfo(IpAddressOrComPortName, IpPortOrComPortBaudRate); this.TimeInfo = new TimeInfo(); break; default: this.ComPortInfo = new ComPortInfo(); this.NetWorkInfo = new NetWorkInfo(); this.TimeInfo = new TimeInfo(); break; } }
public ConnectInfoType(ConnectInfoType ConnectInfo) { this.ConnectType = ConnectInfo.ConnectType; this.ComPortInfo = new ComPortInfo(ConnectInfo.ComPortInfo); this.NetWorkInfo = new NetWorkInfo(ConnectInfo.NetWorkInfo); this.TimeInfo = new TimeInfo(ConnectInfo.TimeInfo); }
public ConnectInfoType() { this.ConnectType = ConnectType.DISABLED; this.ComPortInfo = new ComPortInfo(); this.NetWorkInfo = new NetWorkInfo(); this.TimeInfo = new TimeInfo(); }
public ComPortInfo(ComPortInfo Source) { this.ComPortName = Source.ComPortName; this.BaudRate = Source.BaudRate; }