public MaterialDesignPopupHandler(IReactiveEventAggregator eventAggregator) { this.eventAggregator = eventAggregator; eventAggregator.GetEvent <DefaultConfirmationRequestData>().ObserveOn(DispatcherScheduler.Current).Subscribe(this.ShowDefaultConfirmationPopup); eventAggregator.GetEvent <StringRequestData>().ObserveOn(DispatcherScheduler.Current).Subscribe(this.ShowDefaultRequestStringPopup); eventAggregator.GetEvent <PasswordRequestData>().ObserveOn(DispatcherScheduler.Current).Subscribe(this.ShowDefaultRequestPasswordPopup); eventAggregator.GetEvent <PopupConfirmationWindowRequestData>().ObserveOn(DispatcherScheduler.Current).Subscribe(this.ShowCustomPopupWindow); eventAggregator.GetEvent <PopupCustomButtonsWindowRequestData>().ObserveOn(DispatcherScheduler.Current).Subscribe(this.ShowPopupWindowWithCustomButtons); }
public PendingProcessHandler(IReactiveEventAggregator eventAggregator) { eventAggregator.GetEvent <PendingProcessStartEvent>().ObserveOn(Dispatcher.CurrentDispatcher, DispatcherPriority.Render).Subscribe(v => { this.pendingProcessRequestsCount++; this.PendingProcessDescriptions.Add(v.Description); this.OnPropertyChanged(() => this.PendingProcessIsActive); }); eventAggregator.GetEvent <PendingProcessStopEvent>().ObserveOn(Dispatcher.CurrentDispatcher, DispatcherPriority.Render).Subscribe(v => { this.pendingProcessRequestsCount--; this.PendingProcessDescriptions.Remove(v.Description); this.OnPropertyChanged(() => this.PendingProcessIsActive); }); }