private void SendInfo() { var Information = new InformationToUser() { Message = InformationToUser.ServerError, Color = Brushes.Red }; eventAggregator.PublishOnUIThreadAsync(Information); }
public MainWindowViewModel(IWindowManager _windowManager, IEventAggregator _eventAggretator, IUnitOfWork _unitOfWork) { windowManager = _windowManager; eventAggregator = _eventAggretator; unitOfWork = _unitOfWork; eventAggregator.Subscribe(this); timer.Interval = new TimeSpan(0, 0, 15); timer.Tick += TimerTick; ActivateItem(new WelcomeViewModel()); if (!unitOfWork.Start()) { timer.Stop(); Information = new InformationToUser() { Message = InformationToUser.ServerError, Color = Brushes.Red }; timer.Start(); } }
private void TimerTick(object sender, EventArgs e) { timer.Stop(); Information = new InformationToUser(); }
public void Handle(InformationToUser message) { timer.Stop(); Information = message; timer.Start(); }