void Obj_OnNameChanged(object sender, EventArgs e)
        {
            EventArgNameChange nc = e as EventArgNameChange;

            if (nc != null)
            {
                Text = nc.NewName;
            }
            else
            {
                NodeObjectComponent noc = this.PropertyObject as NodeObjectComponent;
                Text = noc.Class.ComponentName;
            }
        }
 public ComponentNode GetComponentNodeById(UInt32 id)
 {
     for (int i = 0; i < Nodes.Count; i++)
     {
         ComponentNode cNode = Nodes[i] as ComponentNode;
         if (cNode != null)
         {
             NodeObjectComponent cData = (NodeObjectComponent)cNode.PropertyObject;
             if (cData.Class.ComponentId == id)
             {
                 return(cNode);
             }
         }
     }
     return(null);
 }
 public ComponentNode GetComponentNodeByName(string name)
 {
     for (int i = 0; i < Nodes.Count; i++)
     {
         ComponentNode cNode = Nodes[i] as ComponentNode;
         if (cNode != null)
         {
             NodeObjectComponent cData = (NodeObjectComponent)cNode.PropertyObject;
             if (string.CompareOrdinal(name, cData.Name) == 0)
             {
                 return(cNode);
             }
         }
     }
     return(null);
 }
        public List <ObjectTextID> GetClassUsages(UInt32 classId)
        {
            List <ObjectTextID> lst = new List <ObjectTextID>();

            for (int i = 0; i < _nodes.Nodes.Count; i++)
            {
                ComponentNode cn = _nodes.Nodes[i] as ComponentNode;
                if (cn != null)
                {
                    NodeObjectComponent cnd = cn.PropertyObject as NodeObjectComponent;
                    if (cnd.Class.ComponentId != classId)
                    {
                        XmlNode nd = cnd.Class.ComponentXmlNode.SelectSingleNode(string.Format(CultureInfo.InvariantCulture, "//*[@{0}='{1}']", XmlTags.XMLATT_ClassID, classId));
                        if (nd != null)
                        {
                            lst.Add(new ObjectTextID(cn.Text, cnd.Class.ComponentName, cnd.Class.ComponentName));
                        }
                    }
                }
            }
            return(lst);
        }