Example #1
0
        //uint uItemType;

        // Construction
        public CDDLBase()
        {
            m_pParent  = null;
            m_bIsValid = true;
            //m_IndexNumber = -1; //unused
            m_ChildList = new List <CDDLBase>();
            m_strLabel  = "";
        }
Example #2
0
        // Operations

        // Tree and List Control
        // Removed InsertChild( CDDLBase * pHdw, CDDIdeDoc* pDoc ), POB - 5/22/2014
        public bool AddChild(CDDLBase pChild)// true@success(doesn't exist)
        {
            if (m_ChildList.Contains(pChild))
            {
                return(false);
            }
            else
            {
                m_ChildList.Add(pChild);
                return(true);
            }
        }
Example #3
0
        public int Insert(CDDLBase ddb, int index)
        {
            CDDLBase pIB = new CDDLBase();

            if (index > 0 && index < items.Count())
            {
                //if (pDev.getItembyID(uiRefID, ref pIB))
                if (ddb.eType == nitype.nList)
                {
                    items.Insert(index, ddb);
                    return(Common.SUCCESS);
                }
            }
            return(Common.FAILURE);
        }