public override void MouseDoubleClick(TreeNodeAdvMouseEventArgs args) { base.MouseDoubleClick(args); Entry ent = args.Node.Tag as Entry; ((FileEditorGUI)this.Parent.Model).OnModifyEntry(ent, args.Node); }
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); } }
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); }
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); } } }
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; } }
protected override void OnMouseClick(MouseEventArgs e) { //TODO: Disable when click on plusminus icon TreeNodeAdvMouseEventArgs args = CreateMouseArgs(e); if (args.Node != null) { OnNodeMouseClick(args); } base.OnMouseClick(e); }
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); } }
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); }
protected override void OnMouseDown(MouseEventArgs e) { if (!Focused) { Focus(); } Search.EndSearch(); if (e.Button == MouseButtons.Left) { TreeColumn c; c = GetColumnAt(e.Location, true); if (c != null) { Input = new ResizeColumnState(this, c, e.Location); return; } c = GetColumnAt(e.Location, false); if (c != null) { Input = new ClickColumnState(this, c, e.Location); UpdateView(); return; } } ChangeInput(); TreeNodeAdvMouseEventArgs args = CreateMouseArgs(e); if (args.Node != null && args.Control != null) { args.Control.MouseDown(args); } // [xiperware] toggle on single click if (!args.Handled) { if (args.Node != null && args.Button == MouseButtons.Left) { args.Node.IsExpanded = !args.Node.IsExpanded; } } if (!args.Handled) { Input.MouseDown(args); } base.OnMouseDown(e); }
protected override void OnMouseClick(MouseEventArgs e) { TreeNodeAdvMouseEventArgs args = CreateMouseArgs(e); if (args.Node != null) { OnNodeMouseClick(args); } base.OnMouseClick(e); this.FullUpdate(); this.Invalidate(); }
public override void MouseUp(TreeNodeAdvMouseEventArgs args) { Tree.ItemDragMode = false; if (/*_mouseDownFlag && */ args.Node != null) { if (args.Button == MouseButtons.Left && !(this is InputWithControl)) { DoMouseOperation(args, false); } else if (args.Button == MouseButtons.Right) { Tree.CurrentNode = args.Node; } } _mouseDownFlag = false; }
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; }
private string GetNodeToolTip(TreeNodeAdvMouseEventArgs args) { string msg = null; BaseTextControl btc = args.Control as BaseTextControl; if (btc != null && btc.DisplayHiddenContentInToolTip) { Size ms = btc.MeasureSize(args.Node, _measureContext); if (ms.Width > args.ControlBounds.Size.Width || ms.Height > args.ControlBounds.Size.Height) { // [xiperware] || args.ControlBounds.Right - OffsetX > DisplayRectangle.Width) msg = btc.GetLabel(args.Node); } } if (String.IsNullOrEmpty(msg)) { msg = args.Control.GetToolTip(args.Node); } if (String.IsNullOrEmpty(msg) && DefaultToolTipProvider != null) { msg = DefaultToolTipProvider.GetToolTip(args.Node, args.Control); } return(msg); /* [xiperware] give displayhiddencontent higher priority than custom tooltip * * string msg = args.Control.GetToolTip(args.Node); * * BaseTextControl btc = args.Control as BaseTextControl; * if (btc != null && btc.DisplayHiddenContentInToolTip && String.IsNullOrEmpty(msg)) * { * Size ms = btc.MeasureSize(args.Node, _measureContext); * if (ms.Width > args.ControlBounds.Size.Width || ms.Height > args.ControlBounds.Size.Height || args.ControlBounds.Right - OffsetX > DisplayRectangle.Width) || msg = btc.GetLabel(args.Node); || } || || if (String.IsNullOrEmpty(msg) && DefaultToolTipProvider != null) || msg = DefaultToolTipProvider.GetToolTip(args.Node, args.Control); || || return msg; */ }
protected override void OnMouseDown(MouseEventArgs e) { if (CurrentEditorOwner != null) { CurrentEditorOwner.EndEdit(true); return; } if (!Focused) { Focus(); } _search.EndSearch(); if (e.Button == MouseButtons.Left) { TreeColumn c; c = GetColumnDividerAt(e.Location); if (c != null) { Input = new ResizeColumnState(this, c, e.Location); return; } c = GetColumnAt(e.Location); if (c != null) { Input = new ClickColumnState(this, c, e.Location); UpdateView(); return; } } ChangeInput(); TreeNodeAdvMouseEventArgs args = CreateMouseArgs(e); if (args.Node != null && args.Control != null) { args.Control.MouseDown(args); } if (!args.Handled) { Input.MouseDown(args); } base.OnMouseDown(e); }
protected override void OnMouseDown(MouseEventArgs e) { _dragEscaped = false; if (CurrentEditorOwner != null) { CurrentEditorOwner.EndEdit(true); return; } if (!Focused && this.GetStyle(ControlStyles.Selectable)) { Focus(); } //_search?.EndSearch(); if (e.Button == MouseButtons.Left) { TreeColumn c; c = GetColumnDividerAt(e.Location); if (c != null) { Input = new ResizeColumnState(this, c, e.Location); return; } c = GetColumnAt(e.Location); if (c != null) { Input = new ClickColumnState(this, c, e.Location); UpdateView(); return; } } ChangeInput(); TreeNodeAdvMouseEventArgs args = CreateMouseArgs(e); args.Control?.MouseDown(args); if (!args.Handled) { Input.MouseDown(args); } base.OnMouseDown(e); }
protected override void OnMouseClick(MouseEventArgs e) { if (_dragEscaped) { return; } TreeNodeAdvMouseEventArgs args = CreateMouseArgs(e); if (args.Node != null) { if (!(args.Control is NodePlusMinus)) { OnNodeMouseClick(args); } } base.OnMouseClick(e); }
protected override void DoMouseOperation(TreeNodeAdvMouseEventArgs args) { if (Tree.SelectionMode == TreeSelectionMode.Single || Tree.SelectionStart == null) { base.DoMouseOperation(args); } else if (CanSelect(args.Node)) { Tree.SuspendSelectionEvent(SelectionReason.Multi); try { SelectAllFromStart(args.Node); } finally { Tree.ResumeSelectionEvent(); } } }
public override void MouseUp(TreeNodeAdvMouseEventArgs args) { Tree.ItemDragMode = false; if (_mouseDownFlag && args.Node != null) { if (_mouseDownFlag && args.Button == MouseButtons.Left) { DoMouseOperation(args, false); } _mouseDownFlag = false; } else { base.MouseUp(args); } }
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; }
protected virtual void DoMouseOperation(TreeNodeAdvMouseEventArgs args) { Tree.SuspendSelectionEvent = true; try { Tree.ClearSelection(); if (args.Node != null) { args.Node.IsSelected = true; } Tree.SelectionStart = args.Node; } finally { Tree.SuspendSelectionEvent = false; } }
private string GetNodeToolTip(TreeNodeAdvMouseEventArgs args) { string msg = args.Control.GetToolTip(args.Node); if (args.Control is BaseTextControl btc && btc.DisplayHiddenContentInToolTip && String.IsNullOrEmpty(msg)) { Size ms = btc.GetActualSize(args.Node, _measureContext); //if (ms.Width > args.ControlBounds.Size.Width || ms.Height > args.ControlBounds.Size.Height || args.ControlBounds.Right - OffsetX > DisplayRectangle.Width) msg = btc.GetLabel(args.Node); } if (String.IsNullOrEmpty(msg) && DefaultToolTipProvider != null) { msg = DefaultToolTipProvider.GetToolTip(args.Node, args.Control); } return(msg); }
protected override void DoMouseOperation(TreeNodeAdvMouseEventArgs args) { if (this.Tree.SelectionMode == TreeSelectionMode.Single || this.Tree.SelectionStart == null) { base.DoMouseOperation(args); } else if (CanSelect(args.Node)) { this.Tree.SuspendSelectionEvent = true; try { SelectAllFromStart(args.Node); } finally { this.Tree.SuspendSelectionEvent = false; } } }
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; } } }
protected override void OnMouseDoubleClick(MouseEventArgs e) { TreeNodeAdvMouseEventArgs args = CreateMouseArgs(e); if (args.Node != null && args.Control != null) { args.Control.MouseDoubleClick(args); } if (!args.Handled) { if (args.Node != null) { OnNodeMouseDoubleClick(args); } } base.OnMouseDoubleClick(e); }
protected virtual void DoMouseOperation(TreeNodeAdvMouseEventArgs args) { if (Tree.SelectedNodes.Count == 1 && args.Node != null && args.Node.IsSelected) { return; } Tree.SuspendSelectionEvent(args.Button == MouseButtons.Left ? SelectionReason.LeftClick : SelectionReason.RightClick); try { Tree.ClearSelectionInternal(); if (args.Node != null) { args.Node.IsSelected = true; } Tree.SelectionStart = args.Node; } finally { Tree.ResumeSelectionEvent(); } }
public override void MouseDown(TreeNodeAdvMouseEventArgs args) { if (args.Node != null) { if (args.Button == MouseButtons.Left || args.Button == MouseButtons.Right) { if (args.Node.IsSelected) { _mouseDownFlag = true; return; } else { _mouseDownFlag = false; } } } base.MouseDown(args); }
protected override void OnMouseUp(MouseEventArgs e) { TreeNodeAdvMouseEventArgs args = CreateMouseArgs(e); if (Input is ResizeColumnState) { Input.MouseUp(args); } else { if (args.Node != null && args.Control != null) { args.Control.MouseUp(args); } if (!args.Handled) { Input.MouseUp(args); } base.OnMouseUp(e); } }
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; } }
protected override void OnMouseDoubleClick(MouseEventArgs e) { TreeNodeAdvMouseEventArgs args = CreateMouseArgs(e); if (args.Node != null && args.Control != null) { args.Control.MouseDoubleClick(args); } if (!args.Handled) { // disabled by wj32 - I think this behaviour sucks. //if (args.Node != null && args.Button == MouseButtons.Left) // args.Node.IsExpanded = !args.Node.IsExpanded; if (args.Node != null) { OnNodeMouseDoubleClick(args); } } base.OnMouseDoubleClick(e); }
protected virtual void DoMouseOperation(TreeNodeAdvMouseEventArgs args) { if (Tree.SelectedNodes.Count == 1 && args.Node.IsSelected && Tree.ColumnSelectionMode == ColumnSelectionMode.All) { return; } Tree.SuspendSelectionEvent = true; try { Tree.ClearSelectionInternal(); if (args.Node != null) { args.Node.IsSelected = true; Tree.SelectedColumnIndex = ((args.Control != null) && (args.Control.ParentColumn != null)) ? args.Control.ParentColumn.Index : -1; } Tree.SelectionStart = args.Node; } finally { Tree.SuspendSelectionEvent = false; } }
private string GetNodeToolTip(TreeNodeAdvMouseEventArgs args) { string msg = args.Control.GetToolTip(args.Node); BaseTextControl btc = args.Control as BaseTextControl; if (btc != null && btc.DisplayHiddenContentInToolTip && String.IsNullOrEmpty(msg)) { //SHOULDDO: now no tooltip for multiline when TrimMultiLine true Size ms = btc.GetActualSize(args.Node, _measureContext); if (ms.Width > args.ControlBounds.Width || ms.Height > args.ControlBounds.Height || args.ControlBounds.Right - OffsetX > DisplayRectangle.Width) { msg = btc.GetLabel(args.Node); } } if (String.IsNullOrEmpty(msg) && DefaultToolTipProvider != null) { msg = DefaultToolTipProvider.GetToolTip(args.Node, args.Control); } return(msg); }
protected virtual void DoMouseOperation(TreeNodeAdvMouseEventArgs args) { if (Tree.SelectedNodes.Count == 1 && args.Node.IsSelected && Tree.ColumnSelectionMode == ColumnSelectionMode.All) return; Tree.SuspendSelectionEvent = true; try { Tree.ClearSelectionInternal(); if (args.Node != null) { args.Node.IsSelected = true; Tree.SelectedColumnIndex = ((args.Control != null) && (args.Control.ParentColumn != null)) ? args.Control.ParentColumn.Index : -1; } Tree.SelectionStart = args.Node; } finally { Tree.SuspendSelectionEvent = false; } }
private void folderView_NodeMouseDoubleClick(object sender, TreeNodeAdvMouseEventArgs e) { if (e.Node == null) return; this.OpenResource(e.Node); }
private void treeView_NodeMouseDoubleClick(object sender, TreeNodeAdvMouseEventArgs e) { SensorNode node = e.Node.Tag as SensorNode; if (node != null && node.Sensor != null && node.Sensor.Parameters.Length > 0) { ShowParameterForm(node.Sensor); } }
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; } }
public override void MouseUp(TreeNodeAdvMouseEventArgs args) { //Workaround of specific ComboBox control behaviour if (args.Node != null && args.Node.IsSelected) { base.MouseUp(args); } }
public override void MouseUp(TreeNodeAdvMouseEventArgs args) { this.Tree.ChangeInput(); this.Tree.UpdateView(); this.Tree.OnColumnClicked(this.Column); }
private void objectView_NodeMouseDoubleClick(object sender, TreeNodeAdvMouseEventArgs e) { e.Handled = this.OpenResource(e.Node); }
private void OnPreviewNode(object sender, TreeNodeAdvMouseEventArgs e) { SetSelectedObject(e.Node); UpdatePreview(); }
void _tree_NodeMouseDoubleClick(object sender, TreeNodeAdvMouseEventArgs e) { DataNode node = e.Node.Tag as DataNode; if (node.Text == "..." && node.Variable == null) { e.Handled = true; _tree.BeginUpdate(); (node.Parent as DataNode).ChildrenShowLimit += 500; TreeNodeAdv parent = e.Node.Parent; int ind = e.Node.Index; parent.Collapse(true); node.Parent.Nodes.Clear(); parent.Expand(true); _tree.EndUpdate(); if (parent.Children.Count>ind) _tree.ScrollTo(parent.Children[ind]); } }
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; }
private void treeProcesses_NodeMouseDoubleClick(object sender, TreeNodeAdvMouseEventArgs e) { propertiesProcessMenuItem_Click(null, null); }
public override void MouseUp(TreeNodeAdvMouseEventArgs args) { FinishResize(); }
private void columnsTreeView_NodeMouseDoubleClick(object sender, TreeNodeAdvMouseEventArgs e) { if (e.Node != null && e.Node.Tag != null) { GrtListNode node = e.Node.Tag as GrtListNode; if (node != null && e.Control == columnIconNodeControl) { int isPk; columnsListModel.GrtList.get_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsPK, out isPk); columnsListModel.GrtList.set_field(node.NodeId, (int)MySQLTableColumnsListWrapper.MySQLColumnListColumns.IsPK, (isPk + 1) % 2); } else if (e.Control is AdvNodeTextBox) { AdvNodeTextBox tbox = e.Control as AdvNodeTextBox; tbox.BeginEdit(); } else if (e.Control is AdvNodeComboBox) { AdvNodeComboBox tbox = e.Control as AdvNodeComboBox; tbox.BeginEdit(); } } }
public override void MouseDown(TreeNodeAdvMouseEventArgs args) { }
private void OnNodeMouseDoubleClick(TreeNodeAdvMouseEventArgs args) { if (NodeMouseDoubleClick != null) NodeMouseDoubleClick(this, args); }
private void OnSelectNode(object sender, TreeNodeAdvMouseEventArgs e) { SetSelectedObject(e.Node); DialogResult = DialogResult.OK; Close(); }
private void treeDump_NodeMouseDoubleClick(object sender, TreeNodeAdvMouseEventArgs e) { if (e.Node.Tag is DicomNode) { DicomNode dn = e.Node.Tag as DicomNode; if (dn.VR != "SQ" || e.Button == MouseButtons.Right) { DicomDictionaryForm ddf = new DicomDictionaryForm(dn.ElementTag.Substring(1, 9)); ddf.ShowDialog(this); } } }
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; }
protected virtual void MouseDownAtEmptySpace(TreeNodeAdvMouseEventArgs args) { Tree.ClearSelectionInternal(); }
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; } }
protected override void MouseDownAtEmptySpace(TreeNodeAdvMouseEventArgs args) { }
private void treeViewAdv1_NodeMouseClick(object sender, TreeNodeAdvMouseEventArgs e) { if (treeViewAdv1.SelectedNodes.Count == 1) { if (treeViewAdv1.SelectedNode != null) { if (treeViewAdv1.SelectedNode.Tag != null) { var tempNode = (ElasticNode)treeViewAdv1.SelectedNode.Tag; if (tempNode != null && tempNode.IndexStatus != null) { toolStripStatusLabel1.Text = tempNode.IndexStatus.ToString(); } else if(treeViewAdv1.SelectedNode.Level==4) { WriteLog("\r\n-----\r\n"); WriteLog("\r\n"); var type = (treeViewAdv1.SelectedNode.Tag as ElasticNode).Tag as TypeSetting; WriteLog(JsonSerializer.Get(type,true)); } } } } }
private string GetNodeToolTip(TreeNodeAdvMouseEventArgs args) { string msg = args.Control.GetToolTip(args.Node); BaseTextControl btc = args.Control as BaseTextControl; if (btc != null && btc.DisplayHiddenContentInToolTip && String.IsNullOrEmpty(msg)) { Size ms = btc.GetActualSize(args.Node, _measureContext); if (ms.Width > args.ControlBounds.Size.Width || ms.Height > args.ControlBounds.Size.Height || args.ControlBounds.Right - OffsetX > DisplayRectangle.Width) msg = btc.GetLabel(args.Node); } if (String.IsNullOrEmpty(msg) && DefaultToolTipProvider != null) msg = DefaultToolTipProvider.GetToolTip(args.Node, args.Control); return msg; }
void Tree_NameNodeMouseClick(object sender, TreeNodeAdvMouseEventArgs e) { if (e.Node.Level == 1 && e.Control == NameNodeTextBox && !e.Node.CanExpand && (Tree.SelectedNode == null || Tree.SelectedNode == e.Node)) { NameNodeTextBox.BeginEdit(); e.Handled = true; } }