protected virtual void SectionChanged(PanoramaElement panorama, PanoramaSection section) { if (section == menuSection) { if (volatileSection != null) { panorama.RemoveSection(volatileSection); volatileSection = null; } return; } List <SensorListener> sensors = null; sectionSensorMap.TryGetValue(section, out sensors); // remove from all sensors HOBD.Registry.RemoveListener(this.SensorChanged); if (sensors != null) { foreach (SensorListener sl in sensors) { HOBD.Registry.AddListener(sl.sensor, this.SensorChanged, sl.period); } } }