internal TreeGridNode(TreeGridView owner) : this() { this._grid = owner; this.IsExpanded = true; }
public TreeGridNode(TreeGridView owner, IListItem content) : this(owner) { this.content = content; }
public OptionsTab(TabControl tabControl) : base() { Name = "Options"; Text = "_Options"; Tag = "Options"; m_TreeGridView = new TreeGridView(); m_TreeGridView.Dock = DockStyle.Fill; //m_TreeGridView.Columns.Add("1", "2"); //m_TreeGridView.Columns.Add("3", "4"); Node.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; Node.DefaultNodeImage = null; Node.HeaderText = "Имя"; Node.Name = "Node"; Node.ReadOnly = true; Node.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; Value.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; Value.HeaderText = "Значение"; Value.MinimumWidth = 50; Value.Name = "Value"; Value.ReadOnly = false; Value.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; Value.Width = 50; /* * this.TreeGridColumn.DefaultNodeImage = null; * this.TreeGridColumn.HeaderText = "TreeGridColumn"; * this.TreeGridColumn.Name = "TreeGridColumn"; * this.TreeGridColumn.ReadOnly = true; * this.TreeGridColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; * * this.DataGridColumn.HeaderText = "DataGridColumn"; * this.DataGridColumn.Name = "DataGridColumn"; * this.DataGridColumn.ReadOnly = true; * this.DataGridColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; * * this.TreeGrid.DefaultNodeImage = null; * this.TreeGrid.HeaderText = "TreeGrid"; * this.TreeGrid.Name = "TreeGrid"; * this.TreeGrid.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; * * this.NameGrid.HeaderText = "NameGrid"; * this.NameGrid.Name = "NameGrid"; * this.NameGrid.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; * * this.ValueGrid.HeaderText = "ValueGrid"; * this.ValueGrid.Name = "ValueGrid"; * this.ValueGrid.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; */ m_TreeGridView.AllowUserToAddRows = false; m_TreeGridView.AllowUserToDeleteRows = false; m_TreeGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; m_TreeGridView.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells; m_TreeGridView.BackgroundColor = System.Drawing.SystemColors.Control; m_TreeGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; m_TreeGridView.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; m_TreeGridView.ColumnHeadersVisible = true; m_TreeGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Node, this.Value }); dataGridViewCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle.BackColor = System.Drawing.SystemColors.Control; dataGridViewCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); dataGridViewCellStyle.ForeColor = System.Drawing.SystemColors.ControlText; dataGridViewCellStyle.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(245)))), ((int)(((byte)(248))))); dataGridViewCellStyle.SelectionForeColor = System.Drawing.SystemColors.ControlText; dataGridViewCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.False; m_TreeGridView.DefaultCellStyle = dataGridViewCellStyle; m_TreeGridView.Dock = System.Windows.Forms.DockStyle.Fill; m_TreeGridView.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; //m_TreeGridView.ImageList = this.imageList; m_TreeGridView.Location = new System.Drawing.Point(3, 16); m_TreeGridView.Name = "m_TreeGridView"; m_TreeGridView.ReadOnly = false; m_TreeGridView.RowHeadersVisible = false; m_TreeGridView.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; m_TreeGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; m_TreeGridView.ShowLines = false; m_TreeGridView.Size = new System.Drawing.Size(826, 399); m_TreeGridView.TabIndex = 0; //m_TreeGridView.NodeExpanding += new AdvancedDataGridView.ExpandingEventHandler(this.treeGridView1_NodeExpanding); //m_TreeGridView.NodeCollapsing += new AdvancedDataGridView.CollapsingEventHandler(this.treeGridView1_NodeCollapsing); this.GotFocus += new EventHandler(OptionsTab_GotFocus); m_TreeGridView.CellClick += new DataGridViewCellEventHandler(m_TreeGridView_CellClick); this.Controls.Add(m_TreeGridView); tabControl.TabPages.Add(this); InitNodeList(); }
public OptionsTab(TabControl tabControl) : base() { Name = "Options"; Text = "_Options"; Tag = "Options"; m_TreeGridView = new TreeGridView(); m_TreeGridView.Dock = DockStyle.Fill; //m_TreeGridView.Columns.Add("1", "2"); //m_TreeGridView.Columns.Add("3", "4"); Node.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; Node.DefaultNodeImage = null; Node.HeaderText = "Имя"; Node.Name = "Node"; Node.ReadOnly = true; Node.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; Value.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; Value.HeaderText = "Значение"; Value.MinimumWidth = 50; Value.Name = "Value"; Value.ReadOnly = false; Value.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; Value.Width = 50; /* this.TreeGridColumn.DefaultNodeImage = null; this.TreeGridColumn.HeaderText = "TreeGridColumn"; this.TreeGridColumn.Name = "TreeGridColumn"; this.TreeGridColumn.ReadOnly = true; this.TreeGridColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.DataGridColumn.HeaderText = "DataGridColumn"; this.DataGridColumn.Name = "DataGridColumn"; this.DataGridColumn.ReadOnly = true; this.DataGridColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.TreeGrid.DefaultNodeImage = null; this.TreeGrid.HeaderText = "TreeGrid"; this.TreeGrid.Name = "TreeGrid"; this.TreeGrid.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.NameGrid.HeaderText = "NameGrid"; this.NameGrid.Name = "NameGrid"; this.NameGrid.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; this.ValueGrid.HeaderText = "ValueGrid"; this.ValueGrid.Name = "ValueGrid"; this.ValueGrid.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; */ m_TreeGridView.AllowUserToAddRows = false; m_TreeGridView.AllowUserToDeleteRows = false; m_TreeGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; m_TreeGridView.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells; m_TreeGridView.BackgroundColor = System.Drawing.SystemColors.Control; m_TreeGridView.BorderStyle = System.Windows.Forms.BorderStyle.None; m_TreeGridView.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None; m_TreeGridView.ColumnHeadersVisible = true; m_TreeGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.Node, this.Value}); dataGridViewCellStyle.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle.BackColor = System.Drawing.SystemColors.Control; dataGridViewCellStyle.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); dataGridViewCellStyle.ForeColor = System.Drawing.SystemColors.ControlText; dataGridViewCellStyle.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(245)))), ((int)(((byte)(248))))); dataGridViewCellStyle.SelectionForeColor = System.Drawing.SystemColors.ControlText; dataGridViewCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.False; m_TreeGridView.DefaultCellStyle = dataGridViewCellStyle; m_TreeGridView.Dock = System.Windows.Forms.DockStyle.Fill; m_TreeGridView.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; //m_TreeGridView.ImageList = this.imageList; m_TreeGridView.Location = new System.Drawing.Point(3, 16); m_TreeGridView.Name = "m_TreeGridView"; m_TreeGridView.ReadOnly = false; m_TreeGridView.RowHeadersVisible = false; m_TreeGridView.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; m_TreeGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; m_TreeGridView.ShowLines = false; m_TreeGridView.Size = new System.Drawing.Size(826, 399); m_TreeGridView.TabIndex = 0; //m_TreeGridView.NodeExpanding += new AdvancedDataGridView.ExpandingEventHandler(this.treeGridView1_NodeExpanding); //m_TreeGridView.NodeCollapsing += new AdvancedDataGridView.CollapsingEventHandler(this.treeGridView1_NodeCollapsing); this.GotFocus += new EventHandler(OptionsTab_GotFocus); m_TreeGridView.CellClick += new DataGridViewCellEventHandler(m_TreeGridView_CellClick); this.Controls.Add(m_TreeGridView); tabControl.TabPages.Add(this); InitNodeList(); }