예제 #1
0
        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);
        }
예제 #3
0
        public void CreatePresenter()
        {
            _view  = Substitute.For <IStatusBarView>();
            _model = Substitute.For <ITestModel>();

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

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

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

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