Esempio n. 1
0
        /// <summary>
        /// Creates a ZipCodeObject instance with specified name and parent.
        /// </summary>
        /// <param name="name">The name of the ZipCodeObject instance.</param>
        /// <param name="parent">The parent of the ZipCodeObject instance.</param>
        /// <returns>The ZipCodeObject instance.</returns>
        public static ZipCodeObject CreateZipCodeObject(string name, Base parent)
        {
            ZipCodeObject zipCode = new ZipCodeObject();

            zipCode.Name   = name;
            zipCode.Parent = parent;
            return(zipCode);
        }
        /// <summary>
        /// Creates a ZipCodeObject instance with specified name and parent.
        /// </summary>
        /// <param name="name">The name of the ZipCodeObject instance.</param>
        /// <param name="parent">The parent of the ZipCodeObject instance.</param>
        /// <returns>The ZipCodeObject instance.</returns>
        public static ZipCodeObject CreateZipCodeObject(string name, Base parent)
        {
            ZipCodeObject zipCode = new ZipCodeObject();

            zipCode.Name = name;
            if ((parent as IParent).CanContain(zipCode))
            {
                zipCode.Parent = parent;
            }
            return(zipCode);
        }
        private void LoadZipCode(string name, Base parent)
        {
            string        description = GetObjectDescription(name);
            ZipCodeObject zipCode     = ComponentsFactory.CreateZipCodeObject(name, parent);

            LoadComponent(description, zipCode);
            LoadSize(description, zipCode);
            zipCode.FillColor    = UnitsConverter.ConvertBackColor(GetPropertyValue("BackColor", description));
            zipCode.Border.Color = UnitsConverter.ConvertColor(GetPropertyValue("ForeColor", description));
            zipCode.Text         = GetPropertyValue("Text", description).Replace("\"", "");
            zipCode.Style        = GetPropertyValue("StyleName", description).Replace("\"", "");
        }
Esempio n. 4
0
        private void LoadZipCode(XmlNode node, Base parent)
        {
            ZipCodeObject zipCode = ComponentsFactory.CreateZipCodeObject(node.Name, parent);

            AddLocalizationItemsAttributes(node);
            LoadComponent(node, zipCode);
            LoadSize(node, zipCode);
            zipCode.FillColor    = UnitsConverter.ConvertBackColor(GetAttribute(node, "BackColor"));
            zipCode.Border.Color = UnitsConverter.ConvertColor(GetAttribute(node, "ForeColor"));
            zipCode.Text         = GetAttribute(node, "Text").Replace("\"", "");
            ApplyStyle(node, zipCode);
        }