/// <summary> /// Set the custom properties given the properties object /// </summary> /// <param name="node"></param> /// <param name="inst"></param> public void SetPropertiesInstance(XmlNode node, object inst) { node.RemoveAll(); // Get rid of all properties BarCodeBooklandProperties bcp = inst as BarCodeBooklandProperties; if (bcp == null) { return; } // ISBN CreateChild(node, "ISBN", bcp.ISBN); }
/// <summary> /// Return an instance of the class representing the properties. /// This method is called at design time; /// </summary> /// <returns></returns> public object GetPropertiesInstance(XmlNode iNode) { BarCodeBooklandProperties bcp = new BarCodeBooklandProperties(this, iNode); foreach (XmlNode n in iNode.ChildNodes) { if (n.Name != "CustomProperty") { continue; } string pname = this.GetNamedElementValue(n, "Name", ""); switch (pname) { case "ISBN": bcp.SetISBN(GetNamedElementValue(n, "Value", "0-15-602732-1")); break; default: break; } } return(bcp); }
/// <summary> /// Return an instance of the class representing the properties. /// This method is called at design time; /// </summary> /// <returns></returns> public object GetPropertiesInstance(XmlNode iNode) { BarCodeBooklandProperties bcp = new BarCodeBooklandProperties(this, iNode); foreach (XmlNode n in iNode.ChildNodes) { if (n.Name != "CustomProperty") continue; string pname = this.GetNamedElementValue(n, "Name", ""); switch (pname) { case "ISBN": bcp.SetISBN(GetNamedElementValue(n, "Value", "0-15-602732-1")); break; default: break; } } return bcp; }