当前位置: 首页>>代码示例>>C#>>正文


C# Tree.TreeColumn类代码示例

本文整理汇总了C#中Aga.Controls.Tree.TreeColumn的典型用法代码示例。如果您正苦于以下问题:C# TreeColumn类的具体用法?C# TreeColumn怎么用?C# TreeColumn使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


TreeColumn类属于Aga.Controls.Tree命名空间,在下文中一共展示了TreeColumn类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ResizeColumnState

 public ResizeColumnState(TreeViewAdv tree, TreeColumn column, Point p)
     : base(tree)
 {
     _column = column;
     _initLocation = p;
     _initWidth = column.Width;
 }
开发者ID:virl,项目名称:yttrium,代码行数:7,代码来源:ResizeColumnState.cs

示例2: AutoSizeColumn

        public void AutoSizeColumn(TreeColumn column)
        {
            if (!Columns.Contains(column))
                throw new ArgumentException("column");

            DrawContext context = new DrawContext();
            context.Graphics = Graphics.FromImage(new Bitmap(1, 1));
            context.Font = this.Font;
            int res = 0;
            for (int row = 0; row < RowCount; row++)
            {
                if (row < RowMap.Count)
                {
                    int w = 0;
                    TreeNodeAdv node = RowMap[row];
                    foreach (NodeControl nc in NodeControls)
                    {
                        if (nc.ParentColumn == column)
                            w += nc.GetActualSize(node, _measureContext).Width;
                    }
                    res = Math.Max(res, w);
                }
            }

            if (res > 0)
                column.Width = res;
        }
开发者ID:ldh9451,项目名称:XLE,代码行数:27,代码来源:TreeViewAdv.Draw.cs

示例3: ProcessTree

        public ProcessTree()
        {
            InitializeComponent();

            var column = new TreeColumn("CPU History", 60);

            column.IsVisible = false;
            column.MinColumnWidth = 10;
            treeProcesses.Columns.Add(column);
            treeProcesses.NodeControls.Add(new ProcessHacker.Components.NodePlotter()
            {
                DataPropertyName = "CpuHistory",
                ParentColumn = column
            });

            column = new TreeColumn("I/O History", 60);
            column.IsVisible = false;
            column.MinColumnWidth = 10;
            treeProcesses.Columns.Add(column);
            treeProcesses.NodeControls.Add(new ProcessHacker.Components.NodePlotter()
            {
                DataPropertyName = "IoHistory",
                ParentColumn = column
            });

            treeProcesses.KeyDown += new KeyEventHandler(ProcessTree_KeyDown);
            treeProcesses.MouseDown += new MouseEventHandler(treeProcesses_MouseDown);
            treeProcesses.MouseUp += new MouseEventHandler(treeProcesses_MouseUp);
            treeProcesses.DoubleClick += new EventHandler(treeProcesses_DoubleClick);

            nodeName.ToolTipProvider = _tooltipProvider = new ProcessToolTipProvider(this);

            // make it draw when we want it to draw :)
            treeProcesses.BeginUpdate();
        }
开发者ID:andyvand,项目名称:ProcessHacker,代码行数:35,代码来源:ProcessTree.cs

示例4: OnColumnReordered

		internal void OnColumnReordered(TreeColumn column)
		{
            this.InvalidateNodeControlCache();

			if (ColumnReordered != null)
				ColumnReordered(this, new TreeColumnEventArgs(column));
		}
开发者ID:andyvand,项目名称:ProcessHacker,代码行数:7,代码来源:TreeViewAdv.cs

示例5: ReorderColumnState

		public ReorderColumnState(TreeViewAdv tree, TreeColumn column, Point initialMouseLocation)
			: base(tree, column)
		{
			_location = new Point(initialMouseLocation.X + Tree.OffsetX, 0);
			_dragOffset = tree.GetColumnX(column) - initialMouseLocation.X;
			_ghostImage = column.CreateGhostImage(new Rectangle(0, 0, column.Width, tree.ActualColumnHeaderHeight), tree.Font);
		}
开发者ID:ImaginationSydney,项目名称:flashdevelop,代码行数:7,代码来源:ReorderColumnState.cs

示例6: MouseMove

		public override bool MouseMove(MouseEventArgs args)
		{
			_dropColumn = null;
			_location = new Point(args.X + Tree.OffsetX, 0);
			int x = 0;
			foreach (TreeColumn c in Tree.Columns)
			{
				if (c.IsVisible)
				{
					if (_location.X < x + c.Width / 2)
					{
						_dropColumn = c;
						break;
					}
					x += c.Width;
				}
			}
			Tree.UpdateHeaders();
			return true;
		}
开发者ID:ImaginationSydney,项目名称:flashdevelop,代码行数:20,代码来源:ReorderColumnState.cs

示例7: ProcessTree

        public ProcessTree()
        {
            InitializeComponent();

            TreeColumn column = new TreeColumn("CPU History", 60)
            {
                IsVisible = false, 
                MinColumnWidth = 10
            };

            treeProcesses.Columns.Add(column);
            treeProcesses.NodeControls.Add(new Components.NodePlotter
            {
                DataPropertyName = "CpuHistory",
                ParentColumn = column
            });

            column = new TreeColumn("I/O History", 60)
            {
                IsVisible = false, 
                MinColumnWidth = 10
            };
            treeProcesses.Columns.Add(column);
            treeProcesses.NodeControls.Add(new Components.NodePlotter
            {
                DataPropertyName = "IoHistory",
                ParentColumn = column
            });

            treeProcesses.KeyDown += this.ProcessTree_KeyDown;
            treeProcesses.MouseDown += this.treeProcesses_MouseDown;
            treeProcesses.MouseUp += this.treeProcesses_MouseUp;
            treeProcesses.DoubleClick += this.treeProcesses_DoubleClick;

            nodeName.ToolTipProvider = _tooltipProvider = new ProcessToolTipProvider(this);

            // make it draw when we want it to draw :)
            treeProcesses.BeginUpdate();
        }
开发者ID:john-peterson,项目名称:processhacker,代码行数:39,代码来源:ProcessTree.cs

示例8: ReorderColumnState

 public ReorderColumnState(TreeViewAdv tree, TreeColumn column, Point p)
     : base(tree, column)
 {
     _location = _initLocation = new Point(p.X, 0);
     _ghostImage = column.CreateGhostImage(new Rectangle(0, 0, column.Width, tree.ColumnHeaderHeight), tree.Font);
 }
开发者ID:segafan,项目名称:wme1_jankavan_tlc_edition-repo,代码行数:6,代码来源:ReorderColumnState.cs

示例9: InitializeColumnHeaders

        private void InitializeColumnHeaders()
        {
            // 
            // tcProcessIcon
            // 
            _tcProcessIcon = new TreeColumn
                                 {
                                     Header = "Process",
                                     SortOrder = SortOrder.None,
                                     TooltipText = null,
                                     Width = 250
                                 };

            // 
            // tcProcessPid
            // 
            _tcProcessPid = new TreeColumn
                                {
                                    Header = "Pid",
                                    SortOrder = SortOrder.None,
                                    TooltipText = null
                                };
        }
开发者ID:subTee,项目名称:Deviare2,代码行数:23,代码来源:ProcessesTreeView.cs

示例10: ReconfigureTreeColumns

        public void ReconfigureTreeColumns() {
			if (!DataLayer.IsConnected) {
				return;
			}

            tvWorkitems.HideEditor();
            tvWorkitems.Columns.Clear();
            tvWorkitems.NodeControls.Clear();
            columnToAttributeMappings.Clear();

			foreach (var column in configuration.GridSettings.Columns) {
                if (column.EffortTracking && !DataLayer.EffortTracking.TrackEffort) {
					continue;
				}
                var columnName = DataLayer.LocalizerResolve(column.Name);
                var dataPropertyName = columnName.Replace(" ", string.Empty);

                columnToAttributeMappings.Add(dataPropertyName, column.Attribute);

                var treeColumn = new TreeColumn(columnName, column.Width) { SortOrder = SortOrder.None, TooltipText = dataPropertyName };

			    switch(column.Type) {
                    case "String":
                    case "Effort":
                        var textEditor = new CustomNodeTextBox();
                        ConfigureEditor(textEditor, dataPropertyName);
                        textEditor.EditEnabled = !textEditor.IsReadOnly;
                        textEditor.IsColumnReadOnly = column.ReadOnly;
                        textEditor.ParentColumn = treeColumn;
                        textEditor.IsEditEnabledValueNeeded += CheckCellEditability;
                        tvWorkitems.NodeControls.Add(textEditor);
                        textEditor.KeyTextBoxDown += tvWorkitems_PreviewKeyDown;
                        break;
                    case "List":
                        var listEditor = new NodeComboBox();
                        ConfigureEditor(listEditor, dataPropertyName);
                        listEditor.EditEnabled = !column.ReadOnly;
                        listEditor.ParentColumn = treeColumn;
                        listEditor.IsEditEnabledValueNeeded += CheckCellEditability;
                        tvWorkitems.NodeControls.Add(listEditor);
                        listEditor.KeyComboBoxDown += tvWorkitems_PreviewKeyDown;
                        break;
                    case "Multi":
			            var listBoxEditor = new NodeListBox {ParentTree = tvWorkitems};
			            ConfigureEditor(listBoxEditor, dataPropertyName);
                        listBoxEditor.EditEnabled = !column.ReadOnly;
                        listBoxEditor.ParentColumn = treeColumn;
                        listBoxEditor.IsEditEnabledValueNeeded += CheckCellEditability;
                        tvWorkitems.NodeControls.Add(listBoxEditor);
                        listBoxEditor.KeyListBoxDown += tvWorkitems_PreviewKeyDown;
                        break;
                    default:
                        throw new NotSupportedException();
                }

				tvWorkitems.Columns.Add(treeColumn);
			}

            AddStateIcon();
        }
开发者ID:ubailey,项目名称:VersionOne.Client.VisualStudio,代码行数:60,代码来源:WorkitemTreeControl.cs

示例11: TreeColumnEventArgs

		public TreeColumnEventArgs(TreeColumn column)
		{
			_column = column;
		}
开发者ID:ASK-sa,项目名称:ASK.ServEasy,代码行数:4,代码来源:TreeColumnEventArgs.cs

示例12: TreeColumnEventArgs

 public TreeColumnEventArgs(TreeColumn column, MouseButtons button)
 {
     _column = column;
       Button = button;
 }
开发者ID:abibell,项目名称:mysql-workbench,代码行数:5,代码来源:TreeColumnEventArgs.cs

示例13: ColumnState

		public ColumnState(TreeViewAdv tree, TreeColumn column)
			: base(tree)
		{
			_column = column;
		}
开发者ID:AndrewTPohlmann,项目名称:open-hardware-monitor,代码行数:5,代码来源:ColumnState.cs

示例14: InvertSortOrderOf

 private void InvertSortOrderOf(TreeColumn aColun)
 {
     aColun.SortOrder = aColun.SortOrder == SortOrder.Ascending ? SortOrder.Descending : SortOrder.Ascending;
 }
开发者ID:subTee,项目名称:Deviare2,代码行数:4,代码来源:DeviareTreeView.cs

示例15: OnColumnWidthChanged

 internal void OnColumnWidthChanged(TreeColumn column)
 {
     if (ColumnWidthChanged != null)
     ColumnWidthChanged(this, new TreeColumnEventArgs(column));
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:5,代码来源:TreeViewAdv.cs


注:本文中的Aga.Controls.Tree.TreeColumn类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。