public override void SetBasicPropertyValues() { base.SetBasicPropertyValues(); //默认ModuleNumber由所在的服务的ModuleNumber决定 if (ListAllObjects != null) { var service = ListAllObjects.FirstOrDefault( o => o.ObjectType == S1110Consts.RESOURCE_ALARMMONITOR && o.ID == ServiceID) as ServiceObject; if (service != null) { ModuleNumber = service.ModuleNumber; } } ResourceProperty propertyValue; for (int i = 0; i < ListProperties.Count; i++) { propertyValue = ListProperties[i]; switch (propertyValue.PropertyID) { case S1110Consts.PROPERTYID_MODULENUMBER: propertyValue.Value = ModuleNumber.ToString(); break; case PRO_SERVICEID: propertyValue.Value = ServiceID.ToString(); break; } } }
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 = MachineObjID.ToString(); break; } } }
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_CONTINENT: propertyValue.Value = Continent; break; case S1110Consts.PROPERTYID_COUNTRY: propertyValue.Value = Country; break; case S1110Consts.PROPERTYID_MODULENUMBER: propertyValue.Value = ModuleNumber.ToString(); break; case PRO_LOGPATH: propertyValue.Value = LogPath; break; } } }