public override void SetBasicPropertyValues() { base.SetBasicPropertyValues(); //默认ModuleNumber由ID决定 ModuleNumber = ID; ResourceProperty propertyValue; for (int i = 0; i < ListProperties.Count; i++) { propertyValue = ListProperties[i]; switch (propertyValue.PropertyID) { case S1110Consts.PROPERTYID_HOSTADDRESS: propertyValue.Value = HostAddress; break; case S1110Consts.PROPERTYID_HOSTNAME: propertyValue.Value = HostName; break; case S1110Consts.PROPERTYID_HOSTPORT: propertyValue.Value = HostPort.ToString(); break; case S1110Consts.PROPERTYID_CONTINENT: propertyValue.Value = Continent; break; case S1110Consts.PROPERTYID_COUNTRY: propertyValue.Value = Country; break; case S1110Consts.PROPERTYID_MODULENUMBER: propertyValue.Value = ModuleNumber.ToString(); break; case S1110Consts.PROPERTYID_ENABLEDISABLE: propertyValue.Value = IsEnabled ? "1" : "0"; break; case S1110Consts.PROPERTYID_MACHINE: propertyValue.Value = MachineID.ToString(); break; } } }
public override string ToString() { return(MachineID.ToString()); }