예제 #1
0
        public MainPresenter(IView view)
        {
            this.BoyModel = new BoyModel();
            this.View     = view;

            this.BoyModel.Changed += (sender, args) => this.CallDraw();
        }
예제 #2
0
        public MainViewModel()
        {
            _model          = new BoyModel();
            _model.Changed += (sender, args) => OnPropertyChanged(nameof(Data));

            RightCommand = new RelayCommand(() =>
            {
                _model.Position = Math.Min(10, _model.Position + 1);
            });
            LeftCommand = new RelayCommand(() =>
            {
                _model.Position = Math.Max(0, _model.Position - 1);
            });
        }
예제 #3
0
 public MainController()
 {
     this.BoyModel = new BoyModel();
 }