• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Tree.TreeColumn类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Sort

 protected void Sort(TreeColumn aColumn)
 {
     _sortedTreeModel.Comparer = new NodeSorter(aColumn, this);
 }
开发者ID:subTee,项目名称:Deviare2,代码行数:4,代码来源:DeviareTreeView.cs


示例17: OnColumnClicked

 protected internal virtual void OnColumnClicked(TreeColumn column, MouseButtons button)
 {
     if (ColumnClicked != null)
         ColumnClicked(this, new TreeColumnEventArgs(column, button));
 }
开发者ID:abibell,项目名称:mysql-workbench,代码行数:5,代码来源:TreeViewAdv.cs


示例18: InitializeComponent

		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ComplexConcMorphDlg));
			this.m_btnHelp = new System.Windows.Forms.Button();
			this.m_btnCancel = new System.Windows.Forms.Button();
			this.m_btnOK = new System.Windows.Forms.Button();
			this.m_helpProvider = new System.Windows.Forms.HelpProvider();
			this.groupBox2 = new System.Windows.Forms.GroupBox();
			this.m_glossWsComboBox = new System.Windows.Forms.ComboBox();
			this.m_glossTextBox = new SIL.FieldWorks.Common.Widgets.FwTextBox();
			this.groupBox3 = new System.Windows.Forms.GroupBox();
			this.m_entryWsComboBox = new System.Windows.Forms.ComboBox();
			this.m_entryTextBox = new SIL.FieldWorks.Common.Widgets.FwTextBox();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.m_formWsComboBox = new System.Windows.Forms.ComboBox();
			this.m_formTextBox = new SIL.FieldWorks.Common.Widgets.FwTextBox();
			this.groupBox4 = new System.Windows.Forms.GroupBox();
			this.m_categoryNotCheckBox = new System.Windows.Forms.CheckBox();
			this.m_categoryComboBox = new SIL.FieldWorks.Common.Widgets.TreeCombo();
			this.groupBox5 = new System.Windows.Forms.GroupBox();
			this.m_inflFeatsTreeView = new Aga.Controls.Tree.TreeViewAdv();
			this.m_featureColumn = new Aga.Controls.Tree.TreeColumn();
			this.m_notColumn = new Aga.Controls.Tree.TreeColumn();
			this.m_valueColumn = new Aga.Controls.Tree.TreeColumn();
			this.m_featureIcon = new Aga.Controls.Tree.NodeControls.NodeIcon();
			this.m_featureTextBox = new Aga.Controls.Tree.NodeControls.NodeTextBox();
			this.m_valueComboBox = new Aga.Controls.Tree.NodeControls.NodeComboBox();
			this.m_inflNotCheckBox = new Aga.Controls.Tree.NodeControls.NodeCheckBox();
			this.m_imageList = new System.Windows.Forms.ImageList(this.components);
			this.groupBox2.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.m_glossTextBox)).BeginInit();
			this.groupBox3.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.m_entryTextBox)).BeginInit();
			this.groupBox1.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this.m_formTextBox)).BeginInit();
			this.groupBox4.SuspendLayout();
			this.groupBox5.SuspendLayout();
			this.SuspendLayout();
			//
			// m_btnHelp
			//
			resources.ApplyResources(this.m_btnHelp, "m_btnHelp");
			this.m_btnHelp.Name = "m_btnHelp";
			this.m_btnHelp.UseVisualStyleBackColor = true;
			this.m_btnHelp.Click += new System.EventHandler(this.m_btnHelp_Click);
			//
			// m_btnCancel
			//
			resources.ApplyResources(this.m_btnCancel, "m_btnCancel");
			this.m_btnCancel.Name = "m_btnCancel";
			this.m_btnCancel.UseVisualStyleBackColor = true;
			this.m_btnCancel.Click += new System.EventHandler(this.m_btnCancel_Click);
			//
			// m_btnOK
			//
			resources.ApplyResources(this.m_btnOK, "m_btnOK");
			this.m_btnOK.Name = "m_btnOK";
			this.m_btnOK.UseVisualStyleBackColor = true;
			this.m_btnOK.Click += new System.EventHandler(this.m_btnOK_Click);
			//
			// groupBox2
			//
			this.groupBox2.Controls.Add(this.m_glossWsComboBox);
			this.groupBox2.Controls.Add(this.m_glossTextBox);
			resources.ApplyResources(this.groupBox2, "groupBox2");
			this.groupBox2.Name = "groupBox2";
			this.m_helpProvider.SetShowHelp(this.groupBox2, ((bool)(resources.GetObject("groupBox2.ShowHelp"))));
			this.groupBox2.TabStop = false;
			//
			// m_glossWsComboBox
			//
			this.m_glossWsComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
			this.m_glossWsComboBox.FormattingEnabled = true;
			resources.ApplyResources(this.m_glossWsComboBox, "m_glossWsComboBox");
			this.m_glossWsComboBox.Name = "m_glossWsComboBox";
			this.m_helpProvider.SetShowHelp(this.m_glossWsComboBox, ((bool)(resources.GetObject("m_glossWsComboBox.ShowHelp"))));
			this.m_glossWsComboBox.SelectedIndexChanged += new System.EventHandler(this.m_glossWsComboBox_SelectedIndexChanged);
			//
			// m_glossTextBox
			//
			this.m_glossTextBox.AcceptsReturn = false;
			this.m_glossTextBox.AdjustStringHeight = true;
			this.m_glossTextBox.BackColor = System.Drawing.SystemColors.Window;
			this.m_glossTextBox.controlID = null;
			resources.ApplyResources(this.m_glossTextBox, "m_glossTextBox");
			this.m_glossTextBox.HasBorder = true;
			this.m_glossTextBox.Name = "m_glossTextBox";
			this.m_helpProvider.SetShowHelp(this.m_glossTextBox, ((bool)(resources.GetObject("m_glossTextBox.ShowHelp"))));
			this.m_glossTextBox.SuppressEnter = true;
			this.m_glossTextBox.WordWrap = false;
			//
			// groupBox3
			//
			this.groupBox3.Controls.Add(this.m_entryWsComboBox);
			this.groupBox3.Controls.Add(this.m_entryTextBox);
//.........这里部分代码省略.........
开发者ID:sillsdev,项目名称:FieldWorks,代码行数:101,代码来源:ComplexConcMorphDlg.cs


示例19: ClickColumnState

 public ClickColumnState(TreeViewAdv tree, TreeColumn column, Point location)
     : base(tree, column)
 {
     _location = location;
 }
开发者ID:segafan,项目名称:wme1_jankavan_tlc_edition-repo,代码行数:5,代码来源:ClickColumnState.cs


示例20: LoadFrom

        public void LoadFrom(AssemblyGroup grp)
        {
            treeViewAdv1.BeginUpdate();

            try
            {
                while (treeViewAdv1.Columns.Count > 1)
                {
                    treeViewAdv1.Columns.RemoveAt(1);
                }

                while (treeViewAdv1.NodeControls.Count > 2)
                {
                    treeViewAdv1.NodeControls.RemoveAt(2);
                }

                treeViewAdv1.Model = new TreeModel();

                if ((grp != null) && (!grp.HasErrors))
                {
                    int divisor = Math.Max(1, grp.Assemblies.Count);
                    int colWidth = Math.Max(1, (treeViewAdv1.ClientRectangle.Width - treeViewAdv1.Columns[0].Width - System.Windows.Forms.SystemInformation.VerticalScrollBarWidth - 5) / divisor);

                    int col = 0;
                    foreach (AssemblyDetail ad in grp.Assemblies)
                    {
                        TreeColumn tc = new TreeColumn();
                        tc.Header = ad.Location;
                        tc.TooltipText = tc.Header;
                        tc.Width = colWidth;
                        treeViewAdv1.Columns.Add(tc);

                        DetailChangeNodeControl dnc = new DetailChangeNodeControl(col++);
                        dnc.ParentColumn = tc;
                        dnc.DisplayHiddenContentInToolTip = true;
                        dnc.EditEnabled = false;
                        dnc.Trimming = StringTrimming.EllipsisCharacter;

                        treeViewAdv1.NodeControls.Add(dnc);
                    }

                    treeViewAdv1.Model = new AssemblyGroupModel(grp);
                    //treeViewAdv1.Root.Children[0].Expand();
                }
            }
            finally
            {
                treeViewAdv1.EndUpdate();
            }
        }
开发者ID:redoz,项目名称:bitdiffer,代码行数:50,代码来源:DiffViewer.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Tree.TreeModelEventArgs类代码示例发布时间:2022-05-24
下一篇:
C# Tree.DrawContext类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap