Exemplo n.º 1
0
        public void CloseLoadingBar()
        {
            if (_loadingBarVm == null)
            {
                throw new InvalidOperationException("Loading bar is not opened");
            }

            _loadingBarVm.Close();
            _eventAggregator.PublishOnUIThread(new LoadingBarClosedEventArgs());
            _loadingBarVm = null;
        }
Exemplo n.º 2
0
        public ILoadingBarWindow ShowLoadingBar()
        {
            if (_loadingBarVm != null)
            {
                throw new InvalidOperationException("Loading bar already opened");
            }

            _eventAggregator.PublishOnUIThread(new LoadingBarOpenedEventArgs());
            _loadingBarVm = new LoadingBarViewModel();
            _windowManager.ShowWindow(_loadingBarVm);
            return(_loadingBarVm);
        }