public ControlPanel() { InitializeComponent(); journey = new TrainJourney(); controller = new TrainController(journey); }
public TrainDisplay(ITrainJourney journey) { InitializeComponent(); this.journey = journey; this.journey.AddTrainObserver(this); int nrOfObservers = journey.NrOfTrainObservers; Name = $"StationsDisplay{nrOfObservers}"; Text = $"TrainDisplay #{nrOfObservers}"; }
public TrainDisplay(ITrainJourney journey) { InitializeComponent(); this.journey = journey; this.journey.AddObserver(this); }
public TrainController(ITrainJourney journey) { this.journey = journey; }
private void ControlPanel_Load(object sender, EventArgs e) { journey = new TrainJourney(); controller = new TrainController(journey); }