本文整理汇总了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";
}
示例2: GetToolTip
public string GetToolTip(TreeNodeAdv node, NodeControl nodeControl)
{
if (node.Tag is RootItem)
return null;
else
return "Second click to rename node";
}
示例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); }
}
示例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;
}
示例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();
}
}
}
示例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);
}
示例7: SetValue
public override void SetValue(TreeNodeAdv node, object value)
{
ISetText content = (ISetText)((TreeViewVarNode)node).Content;
if (content.CanSetText) {
content.SetText(value.ToString());
}
}
示例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;
}
示例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);
}
示例10: SetCheckState
protected override void SetCheckState(TreeNodeAdv node, CheckState value)
{
if (node.Tag is FileNode)
return;
base.SetCheckState(node, value);
}
示例11: GetToolTip
public string GetToolTip(TreeNodeAdv node, NodeControl nodeControl)
{
var item = node.Tag as BaseItem;
if (item != null)
return item.Description;
return null;
}
示例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;
}
示例13: AdvNodeAccessibleObject
public AdvNodeAccessibleObject(TreeNodeAdv advNode, AdvNodeAccessibleObject parent,
TreeViewAdvAccessibleObject owner)
: base()
{
node = advNode;
this.parent = parent;
this.owner = owner;
}
示例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);
}
}
示例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 "";
}