Beispiel #1
0
        public string ToXML()
        {
            string output = "<Output>";

            if (Signal != null)
            {
                output += Signal.ToXML();
            }
            if (Event != null)
            {
                output += Event.ToXML();
            }
            output += "<Name>" + Name + "</Name>";
            output += "<Enabled>" + Enabled + "</Enabled>";
            output += "<MidiChannel>" + MidiChannel + "</MidiChannel>";
            output += "<CCNumber>" + CCNumber + "</CCNumber>";
            output += "<IsNote>" + IsNote + "</IsNote>";
            output += "<FilterEnabled>" + FilterEnabled + "</FilterEnabled>";
            output += "<FilterMin>" + FilterMin + "</FilterMin>";
            output += "<FilterMax>" + FilterMax + "</FilterMax>";
            if (Filter != null)
            {
                output += "<Filter>" + Filter.ToXML() + "</Filter>";
            }

            output += "<CrosstalkSignals>";
            foreach (var xtalk in CrosstalkSignals)
            {
                output += xtalk.ToXML();
            }
            output += "</CrosstalkSignals>";

            var veloXml = Serializer.SerializeToXML(VelocityMap);
            var doc     = new System.Xml.XmlDocument();

            doc.LoadXml(veloXml);
            veloXml = doc.ChildNodes[1].OuterXml;
            output += veloXml;

            output += "</Output>";
            return(output);
        }
Beispiel #2
0
 public string ToXML()
 {
     return(String.Format("<Crosstalk><Factor>{0:0.000}</Factor>{1}</Crosstalk>", Factor, Signal.ToXML()));
 }