コード例 #1
0
 public HeartController(IDJView view, IHeartModel model)
 {
     this.view  = view;
     this.model = model;
     view.DisableStartMenuItem();
     view.DisableStartMenuItem();
 }
コード例 #2
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();
        }
 public HeartAdapter(IHeartModel heart)
 {
     _heart = heart;
 }
コード例 #4
0
 public HeartAdapter(IHeartModel heart)
 {
     _heart              = heart;
     _heart.BeatOccured += OnBeatOccured;
     _heart.BpmChanged  += OnBpmChanged;
 }
コード例 #5
0
 public HeartAdapter(IHeartModel heart)
 {
     this.heart = heart;
 }