public MainPresenter(IView view) { this.BoyModel = new BoyModel(); this.View = view; this.BoyModel.Changed += (sender, args) => this.CallDraw(); }
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); }); }
public MainController() { this.BoyModel = new BoyModel(); }