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

			LightingChanged?.Invoke(this, e);
		}
Beispiel #2
0
        private void EhValueChanged(object sender, EventArgs e)
        {
            if (object.ReferenceEquals(sender, _guiAmbientControl))
            {
                _lighting = _lighting.WithAmbientLight(_guiAmbientControl.SelectedValue);
            }

            LightingChanged?.Invoke(this, e);
        }
Beispiel #3
0
 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);
     }
 }
Beispiel #4
0
		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);
			}
		}