Esempio n. 1
0
		protected void RaiseChanged()
		{
			StoplightChangedHandler handlers = Changed;
			if(handlers != null)
			{
				LightChangedEventArgs e = new LightChangedEventArgs(currentColor);
				handlers(this, e);
			}
		}
Esempio n. 2
0
        protected void RaiseChanged()
        {
            StoplightChangedHandler handlers = Changed;

            if (handlers != null)
            {
                LightChangedEventArgs e = new LightChangedEventArgs(currentColor);
                handlers(this, e);
            }
        }
Esempio n. 3
0
		private void OnStoplightChanged(object sender, LightChangedEventArgs e)
		{
			switch (e.CurrentColor)
			{
			case StoplightColors.Green:
				view.CurrentColor = Color.Green;
				break;

			case StoplightColors.Yellow:
				view.CurrentColor = Color.Yellow;
				break;

			case StoplightColors.Red:
				view.CurrentColor = Color.Red;
				break;
			}
		}