Example #1
0
        public NoteView()
        {
            InitializeComponent();

              _model = new NoteModel();
              _presenter = new NotePresenter(_model);
        }
Example #2
0
        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;
        }
Example #3
0
        public NotePresenter(NoteModel model)
        {
            _model = model;

              UpdateViewFromModel();

              _model.ContentChanged += OnModelContentChanged;
        }
Example #4
0
        public NoteController(INoteView view, NoteModel model)
        {
            _view = view;
              _model = model;

              UpdateViewFromModel();

              _model.ContentChanged += OnModelContentChanged;
        }
Example #5
0
        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);
        }
Example #6
0
 public void SetUp()
 {
     _model = new NoteModel();
       _presenter = new NotePresenter(_model);
       _view = new NoteViewMock(_presenter);
 }
Example #7
0
 public void SetUp()
 {
     _view = new NoteViewMock { SaveButtonEnabled = true, ContentTextBoxValue = "Default view content"};
       _model = new NoteModel { Content = "" };
       _controller = new NoteController(_view, _model);
 }