public bool LoadFromXML(XmlNode node) { if (node.Attributes["id"] != null) { ID = node.Attributes["id"].Value; } if (node.Attributes["channel"] != null) { int i = 0; int.TryParse(node.Attributes["channel"].Value, out i); Channel = i; } if (node.Attributes["macro"] != null) { Macro = node.Attributes["macro"].Value; } XmlNodeList nl = node.SelectNodes("keys/key"); for (int j = 0; j < nl.Count; j++) { PatternAutomationKey pn = new PatternAutomationKey(); if (pn.LoadFromXML(nl[j])) Keys.Add(pn); } return true; }
public PatternAutomationKey Clone() { PatternAutomationKey ret = new PatternAutomationKey(); ret.ID = ID; ret.Time = Time; ret.Value = Value; return ret; }