void IObserver.Update() { if (UnsereAA.GetStatus() == State_Scharf.GetInstance()) { this.BackColor = Color.Yellow; } else if (UnsereAA.GetStatus() == State_Aus.GetInstance()) { this.BackColor = Color.LimeGreen; } else if (UnsereAA.GetStatus() == State_Alarmiert.GetInstance()) { this.BackColor = Color.Magenta; } else { MessageBox.Show("Something is wrong!"); } }
public void AlarmAusloesen(Alarmanlage alarmanlage) { alarmanlage.SetStatus(State_Alarmiert.GetInstance()); }