Esempio n. 1
0
        public void InitTree()
        {
            NodeIcon ctrlIcon = new NodeIcon();

            ctrlIcon.DataPropertyName = "Image";
            ctrlIcon.ToType           = null;
            this.NodeControls.Add(ctrlIcon);

            NodeTextBox ctrlTB = new NodeTextBox();

            ctrlTB.DataPropertyName = "Text";
            ctrlTB.ToType           = null;
            this.NodeControls.Add(ctrlTB);

            NodeNumericUpDown ctrlNum = new NodeNumericUpDown();

            //ctrlNum.LeftMargin = 1;
            ctrlNum.ToType = typeof(BomNode);
            //ctrlNum.
            ctrlNum.DataPropertyName = "Quantity";
            this.NodeControls.Add(ctrlNum);

            BomTreeModel model = new BomTreeModel();

            model.InitModel();

            //_childFont = new Font(treeViewAdv1.Font.FontFamily, 18, FontStyle.Bold);
            this.Model = model;

            this.ItemDrag             += new System.Windows.Forms.ItemDragEventHandler(this._tree_ItemDrag);
            this.NodeMouseDoubleClick += new System.EventHandler <Aga.Controls.Tree.TreeNodeAdvMouseEventArgs>(this._tree_NodeMouseDoubleClick);
            this.SelectionChanged     += new System.EventHandler(this._tree_SelectionChanged);
            this.DragDrop             += new System.Windows.Forms.DragEventHandler(this._tree_DragDrop);
            this.DragOver             += new System.Windows.Forms.DragEventHandler(this._tree_DragOver);
        }
Esempio n. 2
0
        private void InitTree()
        {
            NodeIcon ctrlIcon = new NodeIcon();

            ctrlIcon.DataPropertyName = "Image";
            ctrlIcon.ToType           = null;
            this.NodeControls.Add(ctrlIcon);

            NodeTextBox ctrlTB = new NodeTextBox();

            ctrlTB.DataPropertyName = "Text";
            ctrlTB.ToType           = null;
            this.NodeControls.Add(ctrlTB);

            NodeNumericUpDown ctrlNum = new NodeNumericUpDown();

            //ctrlNum.LeftMargin = 1;
            ctrlNum.DataPropertyName = "Count";
            ctrlNum.ToType           = typeof(PartNode);
            this.NodeControls.Add(ctrlNum);

            NodeIntegerTextBox ctrlInt = new NodeIntegerTextBox();

            //ctrlInt.LeftMargin = 1;
            ctrlInt.DataPropertyName = "Sequence";
            ctrlInt.ToType           = typeof(ProcessNode);
            this.NodeControls.Add(ctrlInt);
            //treeViewAdv1.NodeMouseClick += new EventHandler<TreeNodeAdvMouseEventArgs>(_tree_NodeMouseClick);

            PPRTreeModel model = new PPRTreeModel();

            model.InitModel();

            //_childFont = new Font(treeViewAdv1.Font.FontFamily, 18, FontStyle.Bold);
            this.Model = model;
        }