private void MessageBoxNotificationRequestProcess(BaseEventAggregatorMessage messageInput, MessageBoxNotification notification) { BaseEventAggregatorMessage messageOutput = messageInput.Clone() as BaseEventAggregatorMessage; messageOutput.MessageBoxOutput = notification.Output; messageOutput.SenderName = messageInput.RecepientName; messageOutput.RecepientName = messageInput.SenderName; AppStorage.Instance.EventAggregator.GetEvent <BaseEventAggregatorToken>().Publish(messageOutput); }
private void MessageBoxNotificationRequestRaise(BaseEventAggregatorMessage messageInput) { // Show LoginView in 'login' mode _messageBoxNotification = new MessageBoxNotification() { Title = messageInput.Title ?? "WPFUserSearch", Message = messageInput.Caption, Input = messageInput.MessageBoxInput, }; this.MessageBoxNotificationRequest.Raise(_messageBoxNotification, Raised => { MessageBoxNotificationRequestProcess(messageInput, _messageBoxNotification); }); }
public void EventAggregatorMessageProcess(BaseEventAggregatorMessage messageInput) { // Process only relevant messages if (messageInput.RecepientName != this.GetType().Name) { return; } switch (messageInput.Command) { case CommandNameEnum.MessageBoxShow: MessageBoxNotificationRequestRaise(messageInput); break; } }
private void SingleUserNotificationRequestRaise(BaseEventAggregatorMessage messageInput, SingleUserViewModeEnum mode) { _singleUserNotification = new SingleUserNotification() { Title = mode == SingleUserViewModeEnum.Create ? "Create User" : "Update User", Mode = mode, User = mode == SingleUserViewModeEnum.Create ? new User() { PK_User = Guid.NewGuid(), } : this.UserSelectedItem, }; this.SingleUserNotificationRequest.Raise(_singleUserNotification, Raised => { if (Raised.Confirmed) { InitializeData(); } }); }