Beispiel #1
0
        public HeartController(IHeartModel model)
        {
            _model = model;

            // Normally both the model and controller would be sent to a view, but in this case a separate view is created for each component.
            _viewModel = new DJViewModel(new HeartAdapter(model));
            _viewModel.Show();

            _viewControl = new DJViewControl(this, new HeartAdapter(model));
            _viewControl.Show();
            _viewControl.DisableStopMenuItem();
            _viewControl.EnableStartMenuItem();
        }
Beispiel #2
0
        public BeatController(IBeatModel model)
        {
            _model = model;

            // Normally both the model and controller would be sent to a view, but in this case a separate view is created for each component.
            _viewModel = new DJViewModel(model);
            _viewModel.Show();

            _viewControl = new DJViewControl(this, model);
            _viewControl.Show();
            _viewControl.DisableStopMenuItem();
            _viewControl.EnableStartMenuItem();

            _model.Initialize();
        }