Beispiel #1
0
		public static XDevice AddChild(XDevice parentDevice, XDriver driver, byte intAddress)
		{
			var device = new XDevice()
			{
				DriverUID = driver.UID,
				Driver = driver,
				IntAddress = intAddress,
				Parent = parentDevice
			};
			device.InitializeDefaultProperties();
			parentDevice.Children.Add(device);
			AddAutoCreateChildren(device);

			return device;
		}
Beispiel #2
0
		public static void AddDevice(XDevice device)
		{
			device.InitializeDefaultProperties();
		}
Beispiel #3
0
		public static XDevice InsertChild(XDevice parentDevice, XDevice previousDevice, XDriver driver, byte intAddress)
		{
			var device = new XDevice()
			{
				DriverUID = driver.UID,
				Driver = driver,
				IntAddress = intAddress,
				Parent = parentDevice
			};
			device.InitializeDefaultProperties();
			var index = parentDevice.Children.IndexOf(previousDevice);
			parentDevice.Children.Insert(index + 1, device);
			AddAutoCreateChildren(device);

			return device;
		}