public void Execute()
        {
            foreach (var message in _messages)
            {
                int senderNumber = message.SenderNumber;

                if (!_currentContext.MessagesWindows.ContainsKey(senderNumber))
                {
                    ICommand command = _newMessagesWindowFactory(senderNumber);
                    CommandInvoker.Execute(command);
                }

                MessagesViewModel messagesViewModel = _currentContext.MessagesWindows[senderNumber];
                messagesViewModel.AddMessage(message);
            }
        }
Ejemplo n.º 2
0
 public void AddMessage(Message msg)
 {
     vm.AddMessage(msg);
 }