Exemplo n.º 1
0
        public ControlPanel()
        {
            InitializeComponent();

            journey    = new TrainJourney();
            controller = new TrainController(journey);
        }
Exemplo n.º 2
0
        public TrainDisplay(ITrainJourney journey)
        {
            InitializeComponent();

            this.journey = journey;
            this.journey.AddTrainObserver(this);
            int nrOfObservers = journey.NrOfTrainObservers;

            Name = $"StationsDisplay{nrOfObservers}";
            Text = $"TrainDisplay #{nrOfObservers}";
        }
Exemplo n.º 3
0
 public TrainDisplay(ITrainJourney journey)
 {
     InitializeComponent();
     this.journey = journey;
     this.journey.AddObserver(this);
 }
Exemplo n.º 4
0
 public TrainController(ITrainJourney journey)
 {
     this.journey = journey;
 }
 private void ControlPanel_Load(object sender, EventArgs e)
 {
     journey    = new TrainJourney();
     controller = new TrainController(journey);
 }