public NoteView() { InitializeComponent(); _model = new NoteModel(); _presenter = new NotePresenter(_model); }
public void SetUp() { _note = new NoteModel { Content = "Don't forget to buy pizzas for tonight."}; _content_modification_published = false; _note.ContentChanged += (s, a) => _content_modification_published = true; }
public NotePresenter(NoteModel model) { _model = model; UpdateViewFromModel(); _model.ContentChanged += OnModelContentChanged; }
public NoteController(INoteView view, NoteModel model) { _view = view; _model = model; UpdateViewFromModel(); _model.ContentChanged += OnModelContentChanged; }
public NoteView() { InitializeComponent(); _model = new NoteModel(); _presenter = new NotePresenter(Model); _contentTextBox.DataBindings.Add("Text", Model, "Content", false, DataSourceUpdateMode.OnPropertyChanged); _saveButton.DataBindings.Add("Enabled", Presenter, "SaveButtonEnabled", false, DataSourceUpdateMode.OnPropertyChanged); }
public void SetUp() { _model = new NoteModel(); _presenter = new NotePresenter(_model); _view = new NoteViewMock(_presenter); }
public void SetUp() { _view = new NoteViewMock { SaveButtonEnabled = true, ContentTextBoxValue = "Default view content"}; _model = new NoteModel { Content = "" }; _controller = new NoteController(_view, _model); }