private void MessageSent(GameMessage sender)
 {
     if (MessageSentEvent != null)
     {
         MessageSentEvent(sender as GameMessage);
     }
 }
Esempio n. 2
0
 public GameMessage(GameMessage msg)
 {
     m_name = msg.Name;
     m_parameter = msg.m_parameter.copy();
     m_parameter.Changed += new DataItems.Parameter.ParameterChangedEventHandler(m_parameter_Changed);
 }
 void myCtrl_MessageSentEvent(GameMessage message)
 {
     CogaenEditExtensionPackage.MessageHandler.sendMessage(message);
 }
Esempio n. 4
0
 public void sendMessage(GameMessage message)
 {
     String xml = message.toXml(message.Target.Name);
     send("PUT /GameObjects/" + message.Target.Name + "/Messages/ " + xml + " HTTP/1.1", (byte)Connection.CommandType.C_PUT, sendMessageCallbackRest);
 }
Esempio n. 5
0
 public void updateMessageDataCallbackRest(String asw, byte type, uint id, object data)
 {
     if (data is Element)
     {
         Element el = data as Element;
         XmlNodeList messages = getRestData(asw);
         foreach (XmlElement message in messages)
         {
             GameMessage msg = new GameMessage();
             XmlNode msgIdNode = XmlHelper.getNodeByNameAttribute(message.ChildNodes, "msgId");
             msg.Name = XmlHelper.getNodeAttributeValue(msgIdNode, "Default");
             msg.Parameter.Params = XmlTools.parseParameterXmlList(message.ChildNodes, el, msgIdNode);
             el.Messages.Add(msg);
         }
     }
     else if (data is Service)
     {
         Service service = data as Service;
         XmlNodeList messages = getRestData(asw);
         foreach (XmlElement message in messages)
         {
             GameMessage msg = new GameMessage();
             XmlNode msgIdNode = XmlHelper.getNodeByNameAttribute(message.ChildNodes, "msgId");
             msg.Name = XmlHelper.getNodeAttributeValue(msgIdNode, "Default");
             msg.Parameter.Params = XmlTools.parseParameterXmlList(message.ChildNodes, service, msgIdNode);
             service.Messages.Add(msg);
         }
     }
 }
 private void OnMessageSent(GameMessage sender)
 {
     MessageSentEvent(sender);
 }
 void Message_Changed(GameMessage sender, EventArgs e)
 {
     OnMessageSent(sender);
 }
 private void Message_Changed(GameMessage sender, EventArgs e)
 {
     if (!sender.ManualUpdate)
     {
         sendMessage(sender);
     }
 }
 private void MessageSentEvent(GameMessage sender)
 {
     sendMessage(sender);
 }
 private void sendMessage(GameMessage msg)
 {
     App app = App.Current as App;
     app.MessageHandler.sendMessage(msg);
 }