public StatusBarPresenter(IStatusBarView view, ITestModel model)
        {
            _view = view;
            _model = model;

            WireUpEvents();
        }
        public void CreatePresenter()
        {
            _view = Substitute.For<IStatusBarView>();
            _model = Substitute.For<ITestModel>();

            _presenter = new StatusBarPresenter(_view, _model);
        }
Exemple #3
0
        public void CreatePresenter()
        {
            _view  = Substitute.For <IStatusBarView>();
            _model = Substitute.For <ITestModel>();

            _presenter = new StatusBarPresenter(_view, _model);
        }
Exemple #4
0
        public StatusBarPresenter(IStatusBarView view, ITestModel model)
        {
            _view  = view;
            _model = model;

            WireUpEvents();
        }
Exemple #5
0
        public StatusBarViewModel(IStatusBarView view, IEventAggregator eventAggregator)
        {
            View             = view;
            View.DataContext = this;

            eventAggregator.GetEvent <ItemSelectedEvent>().Subscribe(s => Status = s);
        }
Exemple #6
0
 public StatusBarViewModel(IStatusBarView view, IEventAggregator eventAggregator)
 {
     LastMessage = "Not Set";
     View = view;
     View.DataContext = this;
     _eventAggregator = eventAggregator;
     _eventAggregator.GetEvent<EntityUpdatedEvent>().Subscribe(EntityUpdated);
 }
Exemple #7
0
 public StatusBarViewModel(IStatusBarView view, IEventAggregator eventAggregator)
 {
     LastMessage      = "Not Set";
     View             = view;
     View.DataContext = this;
     _eventAggregator = eventAggregator;
     _eventAggregator.GetEvent <EntityUpdatedEvent>().Subscribe(EntityUpdated);
 }
Exemple #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StatusBarPresentationModel"/> class.
 /// </summary>
 /// <param name="eventAggregator">The event aggregator.</param>
 /// <param name="view">The view.</param>
 public StatusBarPresentationModel(
     IEventAggregator eventAggregator,
     IStatusBarView view)
 {
     _view       = view;
     _view.Model = this;
     eventAggregator.GetEvent <AppStatusMessageEvent>().Subscribe(OnAppStatusChanged, ThreadOption.UIThread, true);
     AppStatusMessage = "Ready...";
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="StatusBarPresentationModel"/> class.
 /// </summary>
 /// <param name="eventAggregator">The event aggregator.</param>
 /// <param name="view">The view.</param>
 public StatusBarPresentationModel(
     IEventAggregator eventAggregator, 
     IStatusBarView view)
 {
     _view = view;
     _view.Model = this;
     eventAggregator.GetEvent<AppStatusMessageEvent>().Subscribe(OnAppStatusChanged, ThreadOption.UIThread, true);
     AppStatusMessage = "Ready...";
 }
        public StatusBarViewModel(IEventAggregator eventAggregator, IStatusBarView view)
            : base(view)
        {
            if (eventAggregator == null)
            {
                throw new ArgumentNullException("eventAggregator");
            }
            _eventAggregator = eventAggregator;

            _eventAggregator.GetEvent <UpdateStatusEvent>().Subscribe(ProcessUpdateStatusBarMessage);
        }
Exemple #11
0
 public StatusBarPresenter(IStatusBarView view, IMoBiConfiguration moBiConfiguration)
 {
     _view = view;
     _moBiConfiguration = moBiConfiguration;
 }
 protected override void Context()
 {
     _statusBarView            = A.Fake <IStatusBarView>();
     _applicationConfiguration = A.Fake <IApplicationConfiguration>();
     sut = new StatusBarPresenter(_statusBarView, _applicationConfiguration);
 }
 public StatusBarViewModel(IStatusBarView view) : base(view)
 {
 }
 public StatusBarViewModel(IStatusBarView view, IEventAggregator eventAggregator)
     : base(view)
 {
     _eventAggregator = eventAggregator;
     _eventAggregator.GetEvent<PersonUpdatedEvent>().Subscribe(PersonUpdated);
 }
Exemple #15
0
 public StatusBarService(IStatusBarView statusBar)
 {
     _statusBarView = statusBar ?? throw new ArgumentNullException(nameof(statusBar));
 }
Exemple #16
0
 public virtual void Dispose()
 {
     _statusBarView = null;
 }
Exemple #17
0
 public StatusBarViewModel(IStatusBarView view, IEventAggregator eventAggregator)
 //: base(view) Module 7
 {
     _eventAggregator = eventAggregator;
     _eventAggregator.GetEvent <PersonUpdatedEvent>().Subscribe(PersonUpdated);
 }
Exemple #18
0
        public MainView(IToolbarView toolbarView, ITextInputView textInputView, IWordCounterView wordCounterView, IStatusBarView statusbarView)
        {
            InitializeComponent();

            ((Form)textInputView).TopLevel        = false;
            ((Form)textInputView).FormBorderStyle = FormBorderStyle.None;
            ((Form)textInputView).Show();
            ((Form)textInputView).Dock = DockStyle.Fill;
            splitContainer1.Panel1.Controls.Add((Form)textInputView);

            ((Form)wordCounterView).TopLevel        = false;
            ((Form)wordCounterView).FormBorderStyle = FormBorderStyle.None;
            ((Form)wordCounterView).Show();
            ((Form)wordCounterView).Dock = DockStyle.Fill;
            splitContainer1.Panel2.Controls.Add((Form)wordCounterView);

            ((Form)toolbarView).TopLevel        = false;
            ((Form)toolbarView).FormBorderStyle = FormBorderStyle.None;
            ((Form)toolbarView).Show();
            ((Form)toolbarView).Dock = DockStyle.Fill;
            panel1.Controls.Add((Form)toolbarView);

            panel1.Height = 96;
            splitContainer1.BringToFront();

            ((Form)statusbarView).TopLevel        = false;
            ((Form)statusbarView).FormBorderStyle = FormBorderStyle.None;
            ((Form)statusbarView).Show();
            ((Form)statusbarView).Dock = DockStyle.Fill;
            panel2.Controls.Add((Form)statusbarView);
            panel2.Height = ((Form)statusbarView).Height;
        }
Exemple #19
0
 public StatusBarPresenter(IStatusBarView view, IApplicationConfiguration applicationConfiguration)
 {
     _view = view;
     _applicationConfiguration = applicationConfiguration;
 }