Esempio n. 1
0
        private void CreateTreeView()
        {
            _SplitContainer = DxComponent.CreateDxSplitContainer(this, null, DockStyle.Fill, Orientation.Vertical, SplitFixedPanel.Panel1, 280, showSplitGlyph: true);

            _TreeList = new DxTreeViewListSimple()
            {
                Dock = DockStyle.Fill
            };
            _TreeList.SelectImageList       = _Images16;
            _TreeList.StateImageList        = _Images16;
            _TreeList.ImageIndexSearcher    = GetImageIndex;
            _TreeList.LazyLoadNodeText      = "Copak to tu asi bude?";
            _TreeList.LazyLoadNodeImageName = "hourglass_16";
            _TreeList.EditorShowMode        = TreeListEditorShowMode.Click;

            _TreeList.Parent = this;
            _SplitContainer.Panel1.Controls.Add(_TreeList);               // Musí být dřív než se začne pracovat s daty!!!

            DateTime t0    = DateTime.Now;
            var      nodes = _CreateSampleList(ItemCountType.Big);
            DateTime t1    = DateTime.Now;

            _TreeList.AddNodes(nodes);
            DateTime t2 = DateTime.Now;

            _TreeList.NodeSelected      += _TreeList_AnyAction;
            _TreeList.NodeDoubleClick   += _TreeList_AnyAction;
            _TreeList.NodeExpanded      += _TreeList_AnyAction;
            _TreeList.NodeCollapsed     += _TreeList_AnyAction;
            _TreeList.ActivatedEditor   += _TreeList_AnyAction;
            _TreeList.EditorDoubleClick += _TreeList_AnyAction;
            _TreeList.NodeEdited        += _TreeList_NodeEdited;
            _TreeList.NodeDelete        += _TreeList_NodeDelete;
            _TreeList.LazyLoadChilds    += _TreeList_LazyLoadChilds;

            int y = 0;

            _MemoEdit      = DxComponent.CreateDxMemoEdit(0, ref y, 100, 100, this._SplitContainer.Panel2, readOnly: true);
            _MemoEdit.Dock = DockStyle.Fill;
            _LogId         = 0;
            _Log           = "";

            string line = "Počet nodů: " + nodes.Count.ToString();

            _AddLogLine(line);
            line = "Tvorba nodů: " + ((TimeSpan)(t1 - t0)).TotalMilliseconds.ToString("##0.000") + " ms";
            _AddLogLine(line);
            line = "Plnění do TreeView: " + ((TimeSpan)(t2 - t1)).TotalMilliseconds.ToString("##0.000") + " ms";
            _AddLogLine(line);
        }
Esempio n. 2
0
        private void CreateTreeView()
        {
            var treeList = new DxTreeViewListSimple()
            {
                Dock = DockStyle.Fill
            };

            //  treeList.StateImageList = _Images16;
            treeList.SelectImageList    = _Images16;
            treeList.ImageIndexSearcher = GetImageIndex;
            treeList.Parent             = this;
            this.Controls.Add(treeList);               // Musí být dřív než se začne pracovat s daty!!!
            _TreeList = treeList;

            // treeList.AddNodes(NodeItemInfo.CreateSampleList());
        }