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


C# Tree.TreeNodeAdv类代码示例

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


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

示例1: GetToolTip

 public string GetToolTip(TreeNodeAdv node)
 {
     if (node.Tag is RootItem)
         return null;
     else
         return "Double click to rename node";
 }
开发者ID:ishani,项目名称:VSOExp,代码行数:7,代码来源:FolderBrowser.cs

示例2: GetToolTip

 public string GetToolTip(TreeNodeAdv node, NodeControl nodeControl)
 {
     if (node.Tag is RootItem)
         return null;
     else
         return "Second click to rename node";
 }
开发者ID:segafan,项目名称:wme1_jankavan_tlc_edition-repo,代码行数:7,代码来源:FolderBrowser.cs

示例3: AddUserWatchFromNode

        protected virtual void AddUserWatchFromNode(TreeNodeAdv node)
        {
            string varName = "";

            while (node != node.Tree.Root)
            {
                WatchNode watchNode = node != null ? node.Tag as WatchNode : null;
                node = node.Parent;

                if (watchNode == null) continue;
                if (watchNode.Variable.StartsWith("[[")) continue;
                if (varName.Length > 0 && varName[0] != '[') { varName = "." + varName; }

                int position = watchNode.Variable.LastIndexOf('[');

                if (position >= 0 && node != node.Tree.Root)
                {
                    varName = watchNode.Variable.Substring(position, watchNode.Variable.Length - position) + varName;
                }
                else
                {
                    varName = watchNode.Variable + varName;
                }
            }

            if (varName.Length > 0) { UnrealDebuggerIDE.Commands.AddWatch(varName); }
        }
开发者ID:TroutZhang,项目名称:unreal-debugger,代码行数:27,代码来源:WatchPanel.cs

示例4: CreateEditor

        protected override Control CreateEditor(TreeNodeAdv node) {
            var comboBox = new ComboBox();

            if (DropDownItems != null) {
                comboBox.Items.AddRange(DropDownItems.ToArray());
            }

            var value = GetValue(node);
            var property = (ValueId) value;

            var index = 0;
            // TODO
            
            if(property != null) {
                foreach (var item in comboBox.Items) {
                    if(item.Equals(value)) {
                        comboBox.SelectedIndex = index;
                        break;
                    }

                    index++;
                }
            }
            
            comboBox.DropDownStyle = ComboBoxStyle.DropDownList;
            comboBox.DropDownClosed += EditorDropDownClosed;
            SetEditControlProperties(comboBox, node);
            return comboBox;
        }
开发者ID:JogoShugh,项目名称:VersionOne.Client.VisualStudio,代码行数:29,代码来源:NodeComboBox.cs

示例5: DrawNode

        public void DrawNode(TreeNodeAdv node, DrawContext context)
        {
            foreach (NodeControlInfo item in GetNodeControls(node))
            {
                if (item.Bounds.X >= OffsetX && item.Bounds.X - OffsetX < this.Bounds.Width)// skip invisible nodes
                {
                    if (!DragMode)
                    {
                        if (ColumnSelectionMode == ColumnSelectionMode.All)
                        {
                            if (node.IsSelected && Focused)
                                context.DrawSelection = DrawSelectionMode.Active;
                            else if (node.IsSelected && !Focused && !HideSelection)
                                context.DrawSelection = DrawSelectionMode.Inactive;
                        }
                        else
                        {
                            bool selectedColumn = ((item.Control != null) && (item.Control.ParentColumn != null) && (this.SelectedColumnIndex == item.Control.ParentColumn.Index));
                            if (node.IsSelected && Focused && selectedColumn)
                                context.DrawSelection = DrawSelectionMode.Active;
                            else if (node.IsSelected && !Focused && !HideSelection && selectedColumn)
                                context.DrawSelection = DrawSelectionMode.Inactive;
                            else
                                context.DrawSelection = DrawSelectionMode.None;
                        }
                    }

                    context.Bounds = item.Bounds;
                    context.Graphics.SetClip(context.Bounds);
                    item.Control.Draw(node, context);
                    context.Graphics.ResetClip();
                }
            }
        }
开发者ID:redoz,项目名称:bitdiffer,代码行数:34,代码来源:TreeViewAdv.Draw.cs

示例6: Draw

        public override void Draw(TreeNodeAdv node, DrawContext context)
        {
            Graphics g = context.Graphics;
            Rectangle targetRect = new Rectangle(
                context.Bounds.X + this.LeftMargin,
                context.Bounds.Y,
                context.Bounds.Width - this.LeftMargin,
                context.Bounds.Height);

            // Retrieve item information
            PackageItem item = node.Tag as PackageItem;
            Image typeIcon = null;
            if (item != null)
            {
                switch (item.Type)
                {
                    case PackageItem.PackageType.Core:
                        typeIcon = PackageManagerFrontendResCache.IconCore;
                        break;
                    case PackageItem.PackageType.Editor:
                        typeIcon = PackageManagerFrontendResCache.IconEditor;
                        break;
                    case PackageItem.PackageType.Sample:
                        typeIcon = PackageManagerFrontendResCache.IconSample;
                        break;
                }
            }
            if (typeIcon == null) return;

            // Draw icon centered
            Point iconPos = new Point(
                targetRect.X + targetRect.Width / 2 - typeIcon.Width / 2,
                targetRect.Y + targetRect.Height / 2 - typeIcon.Height / 2);
            g.DrawImageUnscaled(typeIcon, iconPos.X, iconPos.Y);
        }
开发者ID:ninja2003,项目名称:duality,代码行数:35,代码来源:DualityPackageTypeNodeControl.cs

示例7: SetValue

		public override void SetValue(TreeNodeAdv node, object value)
		{
			ISetText content = (ISetText)((TreeViewVarNode)node).Content;
			if (content.CanSetText) {
				content.SetText(value.ToString());
			}
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:7,代码来源:TreeViewVarNode.cs

示例8: GetToolTip

        public override string GetToolTip(TreeNodeAdv node)
        {
            AssemblyGroup grp = ((AssemblyGroupTreeItem)node.Tag).Group;

            string tip = "Assembly " + grp.Name;

            if (grp.HasErrors)
            {
                tip += " failed to load. Check log messages for detailed error information.";
            }
            else if (ChangeTypeUtil.HasBreaking(grp.Change))
            {
                tip += " has breaking changes.";
            }
            else if (ChangeTypeUtil.HasNonBreaking(grp.Change))
            {
                tip += " has non-breaking changes.";
            }
            else
            {
                tip += " has no changes.";
            }

            return tip;
        }
开发者ID:redoz,项目名称:bitdiffer,代码行数:25,代码来源:AssemblyGroupNodeControl.cs

示例9: Perf_test

        public void Perf_test()
        {
            var treeNodeAdv = new TreeNodeAdv(new ThreeStateNode("node"));
            var newCheckBox = new NodeCheckBox();
            var oldCheckBox = new Aga.Controls.Tree.NodeControls.NodeCheckBox
                                  {
                                      DataPropertyName = "CheckState"
                                  };
                       
            const int reps = 1000000;

            var oldTime = Time(() =>
                                   {
                                       for (int i = 0; i < reps; i++)
                                           oldCheckBox.GetValue(treeNodeAdv);
                                   });

            Console.WriteLine("Base node check box: {0}", oldTime);

            var newTime = Time(() =>
                                   {
                                       for (int i = 0; i < reps; i++)
                                           newCheckBox.GetValue(treeNodeAdv);
                                   });

            Console.WriteLine("New node check box: {0}", newTime);

            Assert.GreaterThan(oldTime, newTime);
        }
开发者ID:rprouse,项目名称:mbunit-v3,代码行数:29,代码来源:NodeCheckBoxTest.cs

示例10: SetCheckState

        protected override void SetCheckState(TreeNodeAdv node, CheckState value)
        {
            if (node.Tag is FileNode)
                return;

            base.SetCheckState(node, value);
        }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:7,代码来源:NodeCheckBox.cs

示例11: GetToolTip

 public string GetToolTip(TreeNodeAdv node, NodeControl nodeControl)
 {
     var item = node.Tag as BaseItem;
     if (item != null)
         return item.Description;
     return null;
 }
开发者ID:Erguotou,项目名称:EmbSysRegViewSharp,代码行数:7,代码来源:EmbSysRegViewMain.cs

示例12: TreeViewRowDrawEventArgs

		public TreeViewRowDrawEventArgs(Graphics graphics, Rectangle clipRectangle, TreeNodeAdv node, DrawContext context, int row, Rectangle rowRect)
			: base(graphics, clipRectangle)
		{
			_node = node;
			_context = context;
			_row = row;
			_rowRect = rowRect;
		}
开发者ID:ASK-sa,项目名称:ASK.ServEasy,代码行数:8,代码来源:TreeViewRowDrawEventArgs.cs

示例13: AdvNodeAccessibleObject

 public AdvNodeAccessibleObject(TreeNodeAdv advNode, AdvNodeAccessibleObject parent,
     TreeViewAdvAccessibleObject owner)
     : base()
 {
     node = advNode;
     this.parent = parent;
     this.owner = owner;
 }
开发者ID:abibell,项目名称:mysql-workbench,代码行数:8,代码来源:TreeViewAdv.Accessibility.cs

示例14: GetValue

		public override object GetValue(TreeNodeAdv node)
		{
			if (node is TreeViewVarNode) {
				return ((TreeViewVarNode)node).Content.Text;
			} else {
				// Happens during incremental search
				return base.GetValue(node);
			}
		}
开发者ID:Bombadil77,项目名称:SharpDevelop,代码行数:9,代码来源:TreeViewVarNode.cs

示例15: GetToolTip

        public string GetToolTip(TreeNodeAdv node, Aga.Controls.Tree.NodeControls.NodeControl nodeControl)
        {
            var pNode = _tree.FindNode(node);

            if (pNode != null)
                return pNode.GetTooltipText(this);
            else
                return "";
        }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:9,代码来源:ProcessToolTipProvider.cs


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