示例#1
0
 void CreateChildren()
 {
     var children = new List<repositoryModuleDeviceChild>();
     var childDevice = new repositoryModuleDeviceChild()
     {
         id = "CommunicationDevice"
     };
     children.Add(childDevice);
     Device.children = children.ToArray();
 }
示例#2
0
		void CreateChildren()
		{
			var children = new List<repositoryModuleDeviceChild>();
			foreach (var childDriverUID in _driver.Children)
			{
				var childDriver = ItvManager.Drivers.FirstOrDefault(x => x.UID == childDriverUID);
				var childDevice = new repositoryModuleDeviceChild()
				{
					id = childDriver.DriverType.ToString()
				};
				children.Add(childDevice);
			}

			if (children.Count > 0)
				Device.children = children.ToArray();
		}
示例#3
0
		void CreateChildren()
		{
			var allChildren = new HashSet<Guid>();
			foreach (var driver in Helper.PanelDrivers)
			{
				foreach (var childDriver in driver.Children)
				{
					allChildren.Add(childDriver);
				}
			}

			var children = new List<repositoryModuleDeviceChild>();
			foreach (var childDriverUID in allChildren)
			{
				var childDriver = ItvManager.Drivers.FirstOrDefault(x => x.UID == childDriverUID);
				var childDevice = new repositoryModuleDeviceChild()
				{
					id = childDriver.DriverType.ToString()
				};
				children.Add(childDevice);
			}
			Device.children = children.ToArray();
		}