本文整理汇总了C#中Aga.Controls.Tree.TreeNodeAdvMouseEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# TreeNodeAdvMouseEventArgs类的具体用法?C# TreeNodeAdvMouseEventArgs怎么用?C# TreeNodeAdvMouseEventArgs使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TreeNodeAdvMouseEventArgs类属于Aga.Controls.Tree命名空间,在下文中一共展示了TreeNodeAdvMouseEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MouseDoubleClick
public override void MouseDoubleClick(TreeNodeAdvMouseEventArgs args)
{
base.MouseDoubleClick(args);
Entry ent = args.Node.Tag as Entry;
((FileEditorGUI)this.Parent.Model).OnModifyEntry(ent, args.Node);
}
示例2: MouseDown
public override void MouseDown(TreeNodeAdvMouseEventArgs args)
{
if (args.Node != null)
{
Tree.ItemDragMode = true;
Tree.ItemDragStart = args.Location;
if (args.Button == MouseButtons.Left || args.Button == MouseButtons.Right)
{
Tree.BeginUpdate();
try
{
Tree.CurrentNode = args.Node;
if (args.Node.IsSelected)
_mouseDownFlag = true;
else
{
_mouseDownFlag = false;
DoMouseOperation(args);
}
}
finally
{
Tree.EndUpdate();
}
}
}
else
{
Tree.ItemDragMode = false;
MouseDownAtEmptySpace(args);
}
}
示例3: MouseDown
public override void MouseDown(TreeNodeAdvMouseEventArgs args)
{
// Handling of the right click does not need view update
if (args.Button != MouseButtons.Right)
{
Tree.ChangeInput();
Tree.UpdateView();
}
Tree.OnColumnClicked(Column, args.Button);
}
示例4: DoMouseOperation
protected override void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
{
if (Tree.SelectionMode == TreeSelectionMode.Single)
{
base.DoMouseOperation(args);
}
else if (CanSelect(args.Node))
{
args.Node.IsSelected = !args.Node.IsSelected;
Tree.SelectionStart = args.Node;
}
}
示例5: _treeView_NodeMouseDoubleClick
private void _treeView_NodeMouseDoubleClick(object sender, TreeNodeAdvMouseEventArgs e)
{
if (e.Button == System.Windows.Forms.MouseButtons.Left)
{
BaseContentInventoryNode node = e.Node.Tag as BaseContentInventoryNode;
if (node != null)
{
e.Handled = true;
EditNode(node.Content);
}
}
}
示例6: MouseDown
public override void MouseDown(TreeNodeAdvMouseEventArgs args)
{
TreeNode content = ((TreeViewVarNode)args.Node).Content;
if (content is IContextMenu && args.Button == MouseButtons.Right) {
ContextMenuStrip menu = ((IContextMenu)content).GetContextMenu();
if (menu != null) {
menu.Show(args.Node.Tree, args.Location);
args.Handled = true;
}
} else {
base.MouseDown(args);
}
}
示例7: DoMouseOperation
protected override void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
{
if (Tree.SelectionMode == TreeSelectionMode.Single || Tree.SelectionStart == null)
{
base.DoMouseOperation(args);
}
else if (CanSelect(args.Node))
{
Tree.SuspendSelectionEvent = true;
try
{
SelectAllFromStart(args.Node);
}
finally
{
Tree.SuspendSelectionEvent = false;
}
}
}
示例8: CreateMouseArgs
private TreeNodeAdvMouseEventArgs CreateMouseArgs(MouseEventArgs e)
{
TreeNodeAdvMouseEventArgs args = new TreeNodeAdvMouseEventArgs(e);
args.ViewLocation = new Point(e.X + OffsetX,
e.Y + _rowLayout.GetRowBounds(FirstVisibleRow).Y - ColumnHeaderHeight);
args.ModifierKeys = ModifierKeys;
args.Node = GetNodeAt(e.Location);
NodeControlInfo info = GetNodeControlInfoAt(args.Node, e.Location);
args.ControlBounds = info.Bounds;
args.Control = info.Control;
return args;
}
示例9: MouseDownAtEmptySpace
protected virtual void MouseDownAtEmptySpace(TreeNodeAdvMouseEventArgs args)
{
Tree.ClearSelectionInternal();
}
示例10: MouseUp
public override void MouseUp(TreeNodeAdvMouseEventArgs args)
{
Tree.ItemDragMode = false;
if (_mouseDownFlag)
{
if (args.Button == MouseButtons.Left)
DoMouseOperation(args);
else if (args.Button == MouseButtons.Right)
Tree.CurrentNode = args.Node;
}
_mouseDownFlag = false;
}
示例11: MouseDown
public override void MouseDown(TreeNodeAdvMouseEventArgs args)
{
}
示例12: OnSelectNode
private void OnSelectNode(object sender, TreeNodeAdvMouseEventArgs e)
{
SetSelectedObject(e.Node);
DialogResult = DialogResult.OK;
Close();
}
示例13: DoMouseOperation
protected virtual void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
{
if (Tree.SelectedNodes.Count == 1 && args.Node != null && args.Node.IsSelected)
return;
Tree.SuspendSelectionEvent = true;
try
{
Tree.ClearSelectionInternal();
if (args.Node != null)
args.Node.IsSelected = true;
Tree.SelectionStart = args.Node;
}
finally
{
Tree.SuspendSelectionEvent = false;
}
}
示例14: DoMouseOperation
protected virtual void DoMouseOperation(TreeNodeAdvMouseEventArgs args)
{
this.Tree.SuspendSelectionEvent = true;
try
{
this.Tree.ClearSelectionInternal();
if (args.Node != null)
args.Node.IsSelected = true;
this.Tree.SelectionStart = args.Node;
}
finally
{
this.Tree.SuspendSelectionEvent = false;
}
}
示例15: MouseUp
public override void MouseUp(TreeNodeAdvMouseEventArgs args)
{
if (_mouseDownFlag)
{
switch (args.Button)
{
case MouseButtons.Left:
this.DoMouseOperation(args);
break;
case MouseButtons.Right:
this.Tree.CurrentNode = args.Node;
break;
}
}
_mouseDownFlag = false;
}