Exemple #1
0
        public void SetSelectItem(RenderBase render)
        {
            if (render == null)
            {
                propGrid.SelectedObject = null;
                return;
            }
            XmlNode     tmpXNode    = DynamicObj.propXmlDoc.SelectSingleNode("Components/Component[@Name='" + render.Name + "']");
            XmlNodeList tmpXPropLst = null;

            if (tmpXNode != null)
            {
                tmpXPropLst = tmpXNode.SelectNodes("Propertys/Property");
            }
            CustomProperty cp = new CustomProperty(render, tmpXPropLst);

            tmpXNode = DynamicObj.propXmlDoc.SelectSingleNode("Components/Component[@Name='Base']");
            if (tmpXNode != null)
            {
                tmpXPropLst = tmpXNode.SelectNodes("Propertys/Property");
                cp.AddProperty(tmpXPropLst);
            }
            propGrid.SelectedObject = cp;
        }