Esempio n. 1
0
		void CreateEvents()
		{
			var deviceEvents = new List<repositoryModuleDeviceEvent>();

			foreach (var driverState in _driver.States)
			{
				if (driverState.Code.StartsWith("Reserved_"))
					continue;

				var deviceEvent = new repositoryModuleDeviceEvent()
				{
					id = driverState.Code
				};
				deviceEvents.Add(deviceEvent);
			}

			if (deviceEvents.Count > 0)
				Device.events = deviceEvents.ToArray();
		}
Esempio n. 2
0
        void CreateEvents()
        {
            var driver = ItvManager.Drivers.FirstOrDefault(x => x.DriverType == DriverType.Computer);

            var deviceEvents = new List<repositoryModuleDeviceEvent>();
            foreach (var driverState in driver.States)
            {
                if (driverState.Code.StartsWith("Reserved_"))
                    continue;

                var deviceEvent = new repositoryModuleDeviceEvent()
                {
                    id = driverState.Code
                };
                deviceEvents.Add(deviceEvent);
            }

            Device.events = deviceEvents.ToArray();
        }
Esempio n. 3
0
		void CreateEvents()
		{
			var states = new HashSet<string>();
			foreach (var driver in Helper.PanelDrivers)
			{
				foreach (var driverState in driver.States)
				{
					if (driverState.Code.StartsWith("Reserved_"))
						continue;

					states.Add(driverState.Code);
				}
			}

			var deviceEvents = new List<repositoryModuleDeviceEvent>();
			foreach (var state in states)
			{
				var deviceEvent = new repositoryModuleDeviceEvent()
				{
					id = state
				};
				deviceEvents.Add(deviceEvent);
			}
			Device.events = deviceEvents.ToArray();
		}