GUI/SensorSystemTray.cs
changeset 64 15181001ee61
parent 42 47385d4fc990
child 83 3fdadd4a830f
     1.1 --- a/GUI/SensorSystemTray.cs	Sat Feb 27 15:55:17 2010 +0000
     1.2 +++ b/GUI/SensorSystemTray.cs	Sat Feb 27 20:08:13 2010 +0000
     1.3 @@ -59,13 +59,17 @@
     1.4        hardware.SensorRemoved -= new SensorEventHandler(SensorRemoved);
     1.5        foreach (ISensor sensor in hardware.Sensors) 
     1.6          SensorRemoved(sensor);
     1.7 +      foreach (IHardware subHardware in hardware.SubHardware)
     1.8 +        HardwareRemoved(subHardware);
     1.9      }
    1.10 -   
    1.11 +
    1.12      private void HardwareAdded(IHardware hardware) {
    1.13        foreach (ISensor sensor in hardware.Sensors)
    1.14          SensorAdded(sensor);
    1.15        hardware.SensorAdded += new SensorEventHandler(SensorAdded);
    1.16        hardware.SensorRemoved += new SensorEventHandler(SensorRemoved);
    1.17 +      foreach (IHardware subHardware in hardware.SubHardware)
    1.18 +        HardwareAdded(subHardware);
    1.19      }
    1.20  
    1.21      private void SensorAdded(ISensor sensor) {