private void SendInfo()
        {
            var Information = new InformationToUser()
            {
                Message = InformationToUser.ServerError,
                Color   = Brushes.Red
            };

            eventAggregator.PublishOnUIThreadAsync(Information);
        }
Esempio n. 2
0
        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();
            }
        }
Esempio n. 3
0
 private void TimerTick(object sender, EventArgs e)
 {
     timer.Stop();
     Information = new InformationToUser();
 }
Esempio n. 4
0
 public void Handle(InformationToUser message)
 {
     timer.Stop();
     Information = message;
     timer.Start();
 }