示例#1
0
        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;
            }
        }
示例#2
0
        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);
        }
示例#3
0
        public ConnectInfoType()
        {
            this.ConnectType = ConnectType.DISABLED;

            this.ComPortInfo = new ComPortInfo();
            this.NetWorkInfo = new NetWorkInfo();
            this.TimeInfo    = new TimeInfo();
        }
示例#4
0
 public ComPortInfo(ComPortInfo Source)
 {
     this.ComPortName = Source.ComPortName;
     this.BaudRate    = Source.BaudRate;
 }