Exemple #1
0
        public override bool Equals(object obj)
        {
            if (obj is XmlNameSelector)
            {
                XmlNameSelector selector = obj as XmlNameSelector;
                if (selector.elementName == elementName)
                {
                    return(true);
                }
            }

            return(false);
        }
Exemple #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();
            }
        }