void ExecuteNewMessageCommand() { var parameters = new DialogParameters(); parameters.Add("id", 0); RegionDialogService.Show("MessageView", parameters, (result) => { if (_currentFolder == FolderParameters.Sent) { Messages.Add(result.Parameters.GetValue <MailMessage>("messageSent")); } }); }
void ExecuteMessageCommand(string parameter) { if (Message == null) { return; } var parameters = new DialogParameters(); var viewName = "MessageView"; MessageMode replyType = MessageMode.Read; switch (parameter) { case nameof(MessageMode.Read): { viewName = "MessageReadOnlyView"; replyType = MessageMode.Read; break; } case nameof(MessageMode.Reply): { replyType = MessageMode.Reply; break; } case nameof(MessageMode.ReplyAll): { replyType = MessageMode.ReplyAll; break; } case nameof(MessageMode.Forward): { replyType = MessageMode.Forward; break; } } parameters.Add(MailParameters.MessageId, Message.Id); parameters.Add(MailParameters.MessageMode, replyType); RegionDialogService.Show(viewName, parameters, (result) => { HandleMessageCallBack(result); }); }