public SerialPortInfo(SerialPortInfo info)
 {
     PortName = info.PortName;
     BaudRate = info.BaudRate;
     Parity = info.Parity;
     DataBits = info.DataBits;
     StopBits = info.StopBits;
     LocalPort = info.LocalPort;
 }
            public SetupPackage()
            {
                TimeInfo = new DayNightTimeInfo();
                SerialInfo = new SerialPortInfo();
                EthernetInfo = new EthernetInfo();

                TimeInfo.Day.BeginTime = new TimeSpan(00, 08, 00, 00, 00);
                TimeInfo.Day.EndTime = new TimeSpan(00, 19, 59, 59, 999);
                TimeInfo.Night.BeginTime = new TimeSpan(00, 20, 00, 00, 00);
                TimeInfo.Night.EndTime = new TimeSpan(00, 07, 59, 59, 999);
            }
 public SetupPackage(SetupPackage pack)
 {
     TimeInfo = new DayNightTimeInfo(pack.TimeInfo);
     SerialInfo = new SerialPortInfo(pack.SerialInfo);
     EthernetInfo = new EthernetInfo(pack.EthernetInfo);
 }