예제 #1
0
		void CreateDelays()
		{
			for (int i = 1; i < FirePumpDevices.Count; i++)
			{
				var pumpDevice = FirePumpDevices[i];
				var delay = new GKDelay()
				{
					Name = "Задержка пуска ШУН " + pumpDevice.DottedAddress,
					DelayTime = (ushort)PumpStation.NSDeltaTime,
					Hold = 2,
					DelayRegime = DelayRegime.Off,
					IsAutoGenerated = true,
					PumpStationUID = PumpStation.UID
				};
				delay.UID = Guid.NewGuid(); //GuidHelper.CreateOn(pumpDevice.UID, 0);

				var pumpDelay = new PumpDelay
				{
					Delay = delay,
					Device = pumpDevice
				};
				PumpDelays.Add(pumpDelay);

				var delayDescriptor = new DelayDescriptor(delay);
				Database.Descriptors.Add(delayDescriptor);
			}
		}
예제 #2
0
		void CreateDelays()
		{
			for (int i = 1; i < FirePumpDevices.Count; i++)
			{
				var pumpDevice = FirePumpDevices[i];
				var delay = new XDelay()
				{
					Name = "Задержка пуска ШУН " + pumpDevice.DottedAddress,
					DelayTime = (ushort)PumpStation.NSDeltaTime,
					SetTime = 2,
					DelayRegime = DelayRegime.Off
				};
				delay.UID = GuidHelper.CreateOn(pumpDevice.UID);

				var pumpDelay = new PumpDelay
				{
					Delay = delay,
					Device = pumpDevice
				};
				PumpDelays.Add(pumpDelay);

				GkDatabase.AddDelay(delay);
				var delayDescriptor = new DelayDescriptor(delay);
				GkDatabase.Descriptors.Add(delayDescriptor);
			}
		}