/// <summary> /// Creates and parses a message contained in some instructions. /// </summary> /// <param name="ins"></param> /// <param name="body"></param> static void InterpretMessage(CheckBase ins, XmlNodeList body) { if (body != null) { Message message = new Message(); foreach (XmlNode node in body) { switch (node.Name) { case "#text": // a nameless text node message.AddText(node.Value); break; case "data": message.AddDataRef(XmlFiler.getAttribute(node, "of"), ins); break; case "beep": message.AddSound(CreateBeep(node)); break; case "sound": message.AddSound(CreateSound(node)); break; } } ins.Message = message; } }
/// <summary> /// Creates and parses a message contained in some instructions. /// </summary> /// <param name="ins"></param> /// <param name="body"></param> static void InterpretMessage(CheckBase ins, XmlNodeList body) { if (body != null ) { Message message = new Message(); foreach (XmlNode node in body) { switch (node.Name) { case "#text": // a nameless text node message.AddText(node.Value); break; case "data": message.AddDataRef(XmlFiler.getAttribute(node,"of"),ins); break; case "beep": message.AddSound(CreateBeep(node)); break; case "sound": message.AddSound(CreateSound(node)); break; } } ins.Message = message; } }