Example #1
0
 private void ActCliConnectionEstablished(object sender, EventArgs e)
 {
     var msg= new Message
                  {Type = MessageType.Connect, Content = _pairedManager.ServiceAddress, From = "Mediator"};
     ((ActivityClient)sender).SendMessage(msg);
 }
Example #2
0
 private void HandleMessage(Message message)
 {
     if(message.Type==MessageType.Connect)
     {
         _client = null;
         StartClient(message.Content);
     }
 }
 /// <summary>
 /// Sends a message to the activity manager
 /// </summary>
 /// <param name="message">Message that needs to be send to the activity manager</param>
 public void SendMessage(Message message)
 {
     _client.SendMessage(message);
     txtInput.Text = "";
 }
 private void btnSend_Click(object sender, RoutedEventArgs e)
 {
     var msg = new Message() { From = "steven", To = "all", Header = "Controller.RoleChanged", Content = txtInput.Text };
     taskbar.SendMessage(msg);
 }