private Config() { TagDelimiter = "_"; ThumbnailSize = new Size(128, 96); DateTimeDisplayFormat = "MM/dd HH:mm:ss"; DefaultThumbnailNamePattern = "s-{1}.{2}"; DesignConfig = new DesignConfig(); }
public static DesignConfig ReadXml(XmlNode node) { if (node.Name != "designs") return new DesignConfig(); DesignConfig dc = new DesignConfig(); foreach (XmlNode children in node.ChildNodes) { string name = children.Name; XmlAttribute attr = children.Attributes["type"]; string type = attr == null ? "" : attr.InnerText.Trim(); if (children.HasChildNodes) { object value = parseValueXml(children.ChildNodes[0]); if (value != null) dc.SetValue(name, value); } } return dc; }