private static void OnVolumeChanged(IVolumeSettingsView volumeSettingsView, int volume) { volumeSettingsView.OnVolumeChanged(volume); var color = volume > 5 ? Color.red : Color.black; volumeSettingsView.SetVolumeColoring(color); }
public VolumeSettingsPresenter(IVolumeSettingsView volumeSettingsView, IVolumeModel volumeModel) { volumeSettingsView.OnIncreaseVolumeButtonClicked += () => { IncreaseVolume(volumeModel); }; volumeSettingsView.OnDecreaseVolumeButtonClicked += () => { DecreaseVolume(volumeModel); }; volumeModel.OnVolumeChanged += volume => { OnVolumeChanged(volumeSettingsView, volume); }; }