Esempio n. 1
0
		public void Initialize(PDUGroupDevice pDUGroupDevice)
		{
			Device = FiresecManager.Devices.FirstOrDefault(x => x.UID == pDUGroupDevice.DeviceUID);

			IsInversion = pDUGroupDevice.IsInversion;
			OnDelay = pDUGroupDevice.OnDelay;
			OffDelay = pDUGroupDevice.OffDelay;
		}
Esempio n. 2
0
		protected override bool Save()
		{
			var pduGroupLogic = new PDUGroupLogic();

			pduGroupLogic.AMTPreset = Devices.Any(x => x.Device.Driver.DriverType == DriverType.AM1_T);
			foreach (var device in Devices)
			{
				var pduGroupDevice = new PDUGroupDevice()
				{
					DeviceUID = device.Device.UID,
					IsInversion = device.IsInversion,
					OnDelay = device.OnDelay,
					OffDelay = device.OffDelay
				};
				pduGroupLogic.Devices.Add(pduGroupDevice);
			}
			FiresecManager.FiresecConfiguration.SetPDUGroupLogic(Device, pduGroupLogic);
			return base.Save();
		}