Exemplo n.º 1
0
 /// <summary></summary>
 /// <param name="nextOnLight">下個 On 的燈/param>
 /// <param name="colorLightOn">on 時的顏色</param>
 /// <param name="durationSeconds">On 的時間</param>
 public BaseTrafficLight(BaseTrafficLight nextOnLight, Color colorLightOn, int durationSeconds) : this()
 {
     NextOnLight     = nextOnLight;
     ColorLightOn    = colorLightOn;
     ColorLightOff   = Color.Gray;
     DurationSeconds = durationSeconds;
 }
Exemplo n.º 2
0
 public TrafficLight(BaseTrafficLight nextLight, Color colorLightOn, int durationSeconds) : base(nextLight, colorLightOn, durationSeconds)
 {
     this.Visible = true;
 }
Exemplo n.º 3
0
 public BaseTrafficLight(BaseTrafficLight nextOnLight, Color colorLightOn, Color colorLightOff, int durationSeconds) : this(nextOnLight, colorLightOn, durationSeconds)
 {
     ColorLightOff = colorLightOff;
 }
Exemplo n.º 4
0
 public void SetNextOnLight(BaseTrafficLight nextOnLight)
 {
     NextOnLight = nextOnLight;
 }