Esempio n. 1
0
        public override bool Equals(object obj)
        {
            if (obj is XmlTypeSelector)
            {
                XmlTypeSelector selector = obj as XmlTypeSelector;
                if (selector.elementType == elementType)
                {
                    return(true);
                }
            }

            return(false);
        }
Esempio n. 2
0
        private void addSelectorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            XmlElementSelector selector = null;

            switch ((sender as ToolStripMenuItem).Name)
            {
            case "TypeSelector": selector = new XmlTypeSelector(); break;

            case "NameSelector": selector = new XmlNameSelector(); break;

            //case "GeneralSelector": selector = new XmlGeneralSelector(); break;
            case "ClassSelector": selector = new XmlClassSelector(); break;
            }

            if (tvPropertySettingGroups.SelectedNode != null)
            {
                AddSelector(tvPropertySettingGroups.SelectedNode, selector);
                XmlPropertySettingGroup group = tvPropertySettingGroups.SelectedNode.Parent.Tag as XmlPropertySettingGroup;
                group.Selectors.Add(selector);
                tvPropertySettingGroups.SelectedNode.Expand();
            }
        }