Exemplo n.º 1
0
        private void BuildNodes()
        {
            if (!anyUpdate)
            {
                return;
            }

            _nodes.Clear();

            NaturalStringComparer c = new NaturalStringComparer();

            _globalFiles.Sort((a, b) => c.Compare(a.Name, b.Name));
            _folders.Sort((a, b) => c.Compare(a.Name, b.Name));
            _files.Sort((a, b) => c.Compare(a.Name + a.SF.FileExt.ToString(), b.Name + b.SF.FileExt.ToString())); // unexpected sorting -> added extension behind name

            foreach (AssemblyTreeFile f in _globalFiles)
            {
                _nodes.Add(f);
                if (f.HasChildren)
                {
                    f.Nodes.Add("FakeNode");
                }
            }

            foreach (AssemblyTreeFolder f in _folders)
            {
                _nodes.Add(f);
                if (f.HasChildren)
                {
                    f.Nodes.Add("FakeNode");
                }
            }

            foreach (AssemblyTreeFile f in _files)
            {
                _nodes.Add(f);
                if (f.HasChildren)
                {
                    f.Nodes.Add("FakeNode");
                }
            }

            anyUpdate = false;
        }
Exemplo n.º 2
0
        private void BuildNodes()
        {
            if (!anyUpdate)
            {
                return;
            }

            _nodes.Clear();

            NaturalStringComparer c = new NaturalStringComparer();

            _members.Sort((a, b) => c.Compare(a.Name, b.Name));
            _usings.Sort((a, b) => c.Compare(a.Name, b.Name));
            _constants.Sort((a, b) => c.Compare(a.Name, b.Name));
            _functions.Sort((a, b) => c.Compare(a.Name, b.Name));

            foreach (AssemblyTreeMember f in _members)
            {
                _nodes.Add(f);
            }

            foreach (AssemblyTreeMember f in _usings)
            {
                _nodes.Add(f);
            }

            foreach (AssemblyTreeMember f in _constants)
            {
                _nodes.Add(f);
            }

            foreach (AssemblyTreeMember f in _functions)
            {
                _nodes.Add(f);
            }

            anyUpdate = false;
        }