示例#1
0
        public TimMenuItemCollection TopNodes()
        {
            TimMenuItemCollection topNodes = new TimMenuItemCollection();
            bool flag = base.Count > 0;
            TimMenuItemCollection result;

            if (flag)
            {
                for (int i = 0; i < base.Count; i++)
                {
                    bool flag2 = this[i].FatherValue == "";
                    if (flag2)
                    {
                        topNodes.Add(this[i]);
                    }
                }
                result = topNodes;
            }
            else
            {
                result = null;
            }
            return(result);
        }
示例#2
0
        public TimMenuItemCollection GetChilds(TimMenuItemCollection col)
        {
            TimMenuItemCollection tnc = new TimMenuItemCollection();
            bool flag = col != null;
            TimMenuItemCollection result;

            if (flag)
            {
                for (int i = 0; i < col.Count; i++)
                {
                    bool flag2 = col[i].FatherValue == this.Value;
                    if (flag2)
                    {
                        tnc.Add(col[i]);
                    }
                }
                result = tnc;
            }
            else
            {
                result = null;
            }
            return(result);
        }