Ejemplo n.º 1
0
        public StatusBarPresenter(IStatusBarView view, ITestModel model)
        {
            _view = view;
            _model = model;

            WireUpEvents();
        }
Ejemplo n.º 2
0
        public void CreatePresenter()
        {
            _view = Substitute.For<IStatusBarView>();
            _model = Substitute.For<ITestModel>();

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

            _presenter = new StatusBarPresenter(_view, _model);
        }
Ejemplo n.º 4
0
        public StatusBarPresenter(IStatusBarView view, ITestModel model)
        {
            _view  = view;
            _model = model;

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

            eventAggregator.GetEvent <ItemSelectedEvent>().Subscribe(s => Status = s);
        }
Ejemplo n.º 6
0
 public StatusBarViewModel(IStatusBarView view, IEventAggregator eventAggregator)
 {
     LastMessage = "Not Set";
     View = view;
     View.DataContext = this;
     _eventAggregator = eventAggregator;
     _eventAggregator.GetEvent<EntityUpdatedEvent>().Subscribe(EntityUpdated);
 }
Ejemplo n.º 7
0
 public StatusBarViewModel(IStatusBarView view, IEventAggregator eventAggregator)
 {
     LastMessage      = "Not Set";
     View             = view;
     View.DataContext = this;
     _eventAggregator = eventAggregator;
     _eventAggregator.GetEvent <EntityUpdatedEvent>().Subscribe(EntityUpdated);
 }
Ejemplo n.º 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...";
 }
Ejemplo n.º 10
0
        public StatusBarViewModel(IEventAggregator eventAggregator, IStatusBarView view)
            : base(view)
        {
            if (eventAggregator == null)
            {
                throw new ArgumentNullException("eventAggregator");
            }
            _eventAggregator = eventAggregator;

            _eventAggregator.GetEvent <UpdateStatusEvent>().Subscribe(ProcessUpdateStatusBarMessage);
        }
Ejemplo n.º 11
0
 public StatusBarPresenter(IStatusBarView view, IMoBiConfiguration moBiConfiguration)
 {
     _view = view;
     _moBiConfiguration = moBiConfiguration;
 }
Ejemplo n.º 12
0
 protected override void Context()
 {
     _statusBarView            = A.Fake <IStatusBarView>();
     _applicationConfiguration = A.Fake <IApplicationConfiguration>();
     sut = new StatusBarPresenter(_statusBarView, _applicationConfiguration);
 }
Ejemplo n.º 13
0
 public StatusBarViewModel(IStatusBarView view) : base(view)
 {
 }
 public StatusBarViewModel(IStatusBarView view, IEventAggregator eventAggregator)
     : base(view)
 {
     _eventAggregator = eventAggregator;
     _eventAggregator.GetEvent<PersonUpdatedEvent>().Subscribe(PersonUpdated);
 }
Ejemplo n.º 15
0
 public StatusBarService(IStatusBarView statusBar)
 {
     _statusBarView = statusBar ?? throw new ArgumentNullException(nameof(statusBar));
 }
Ejemplo n.º 16
0
 public virtual void Dispose()
 {
     _statusBarView = null;
 }
Ejemplo n.º 17
0
 public StatusBarViewModel(IStatusBarView view, IEventAggregator eventAggregator)
 //: base(view) Module 7
 {
     _eventAggregator = eventAggregator;
     _eventAggregator.GetEvent <PersonUpdatedEvent>().Subscribe(PersonUpdated);
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 19
0
 public StatusBarPresenter(IStatusBarView view, IApplicationConfiguration applicationConfiguration)
 {
     _view = view;
     _applicationConfiguration = applicationConfiguration;
 }