void SensorSettings_SaveSettings(object sender, SensorSettingsEventArgs e) { if (_selectedSensorControl == null) { return; } SensorSettings.SaveSettings -= SensorSettings_SaveSettings; _brick.Ports[_selectedSensorControl.BrickInputPort].SetMode(e.SensorMode); _selectedSensorControl.UpdateUx(); _selectedSensorControl = null; }
void SensorSettings_SaveSettings(object sender, SensorSettingsEventArgs e) { if (_selectedSensorControl == null) return; SensorSettings.SaveSettings -= SensorSettings_SaveSettings; _brick.Ports[_selectedSensorControl.BrickInputPort].SetMode(e.SensorMode); _selectedSensorControl.UpdateUx(); _selectedSensorControl = null; }