Ejemplo n.º 1
0
        public virtual void CollectScintillaNodes(ArrayList list)
        {
            if (_parent == this)
            {
                if (list != null)
                {
                    return;
                }
                list = new System.Collections.ArrayList();
                // add my children's includes first!
                if (ChildScintilla != null)
                {
                    ChildScintilla.CollectScintillaNodes(list);
                }
            }
            else if (list == null)
            {
                return;
            }

            ConfigFile cf;

            if (includedFiles != null)
            {
                for (int i = 0; i < includedFiles.Length; i++)
                {
                    cf = includedFiles[i];
                    // add the included file's scintilla to the list.
                    if (cf.ChildScintilla != null)
                    {
                        list.Add(cf.ChildScintilla);
                    }

                    // add the child scintilla's children to the list
                    if (cf.ChildScintilla != null)
                    {
                        cf.ChildScintilla.CollectScintillaNodes(list);
                    }

                    // add the included file's included
                    if (cf.includedFiles != null && cf.includedFiles.Length > 0)
                    {
                        cf.CollectScintillaNodes(list);
                    }
                }
            }

            if (_parent == this)
            {
                ChildScintilla.includedFiles = new ConfigFile [list.Count];
                list.CopyTo(ChildScintilla.includedFiles);
            }
        }
Ejemplo n.º 2
0
        public virtual void CollectScintillaNodes(ArrayList list)
        {
            if (_parent == this)
            {
                if (list != null)
                {
                    return;
                }
                list = new ArrayList();
                if (ChildScintilla != null)
                {
                    ChildScintilla.CollectScintillaNodes(list);
                }
            }
            else if (list == null)
            {
                return;
            }
            ConfigFile cf;

            if (includedFiles != null)
            {
                for (int i = 0; i < includedFiles.Length; i++)
                {
                    cf = includedFiles[i];
                    if (cf == null)
                    {
                        continue;
                    }
                    if (cf.ChildScintilla != null)
                    {
                        list.Add(cf.ChildScintilla);
                    }
                    if (cf.ChildScintilla != null)
                    {
                        cf.ChildScintilla.CollectScintillaNodes(list);
                    }
                    if (cf.includedFiles != null && cf.includedFiles.Length > 0)
                    {
                        cf.CollectScintillaNodes(list);
                    }
                }
            }
            if (_parent == this)
            {
                ChildScintilla.includedFiles = new ConfigFile[list.Count];
                list.CopyTo(ChildScintilla.includedFiles);
            }
        }