public IPreference FromXmlNode(System.Xml.XmlNode node) { if (node.Attributes != null && node.Attributes["ColumnCount"] != null) { int v; int.TryParse(node.Attributes["ColumnCount"].InnerText, out v); Capacity = v; for (int idx = 0; idx < v; idx++) { Add(null); } } else { Capacity = node.ChildNodes.Count; } for (int idx = 0; idx < node.ChildNodes.Count; idx++) { object o = (object)PreferenceCache.LoadPreference(node.ChildNodes[idx]); this[idx] = o as ListHeaderColumnSettings; } return(this); }
public IPreference FromXmlNode(XmlNode node) { XmlNode curNode = node.SelectSingleNode("StringProperty"); if (curNode != null) { StringProperty = (string)PreferenceCache.LoadPreference(curNode); } else { StringProperty = null; } curNode = node.SelectSingleNode("IntProperty"); if (curNode != null) { IntProperty = (int)PreferenceCache.LoadPreference(curNode); } else { IntProperty = 0; } curNode = node.SelectSingleNode("BoolProperty"); if (curNode != null) { BoolProperty = (bool)PreferenceCache.LoadPreference(curNode); } else { BoolProperty = false; } return(this); }
public IPreference FromXmlNode(System.Xml.XmlNode node) { int Capacity = node.ChildNodes.Count; for (int idx = 0; idx < node.ChildNodes.Count; idx++) { KeyValuePairPreference kvp = PreferenceCache.LoadPreference(node.ChildNodes[idx]) as KeyValuePairPreference; this.Add(kvp.Key, kvp.Value); } return(this); }
public IPreference FromXmlNode(System.Xml.XmlNode node) { if (node.Attributes != null && node.Attributes["maxCapacity"] != null) { int v; int.TryParse(node.Attributes["maxCapacity"].InnerText, out v); Capacity = v; } else { Capacity = node.ChildNodes.Count; } items = new object[Capacity]; for (int idx = 0; idx < node.ChildNodes.Count; idx++) { items[idx] = (object)PreferenceCache.LoadPreference(node.ChildNodes[idx]); } return(this); }
public IPreference FromXmlNode(System.Xml.XmlNode node) { this.Key = (string)PreferenceCache.LoadPreference(node.ChildNodes[0]); this.Value = (IPreference)PreferenceCache.LoadPreference(node.ChildNodes[1]); return(this); }