private void EhValueChanged(object sender, EventArgs e)
        {
            if (object.ReferenceEquals(sender, _guiAmbientControl))
            {
                _lighting = _lighting.WithAmbientLight(_guiAmbientControl.SelectedValue);
            }

            LightingChanged?.Invoke(this, e);
        }
 private void EhDiscreteLightChanged(object sender, EventArgs e)
 {
     if (object.ReferenceEquals(sender, _guiDiscreteLight0))
     {
         _lighting = _lighting.WithDiscreteLight(0, _guiDiscreteLight0.SelectedValue);
         LightingChanged?.Invoke(this, e);
     }
     else if (object.ReferenceEquals(sender, _guiDiscreteLight1))
     {
         _lighting = _lighting.WithDiscreteLight(1, _guiDiscreteLight1.SelectedValue);
         LightingChanged?.Invoke(this, e);
     }
     else if (object.ReferenceEquals(sender, _guiDiscreteLight2))
     {
         _lighting = _lighting.WithDiscreteLight(2, _guiDiscreteLight2.SelectedValue);
         LightingChanged?.Invoke(this, e);
     }
     else if (object.ReferenceEquals(sender, _guiDiscreteLight3))
     {
         _lighting = _lighting.WithDiscreteLight(3, _guiDiscreteLight3.SelectedValue);
         LightingChanged?.Invoke(this, e);
     }
 }
Exemple #3
0
 private void OnLightingChanged() => LightingChanged?.Invoke();