private void ToolBox_MouseMove(object sender, MouseEventArgs e) { ToolBoxNode node = GetNodeAt(e.X, e.Y); if (node == null || node.Tag == null) { if (ShowTooltip) { toolTip.Hide(this); } HoverNode = node; this.Refresh(); return; } if (HoverNode == node) { return; } HoverNode = node; this.Refresh(); if (ShowTooltip) { toolTip.ToolTipTitle = node.Text; toolTip.Show(node.Tag.ToString() + " (" + node.Tag2.ToString() + ")", this, 0, node.Bounds.Bottom + 15); } }
private void ToolBox_MouseLeave(object sender, EventArgs e) { if (ShowTooltip) { toolTip.Hide(this); } HoverNode = null; this.Refresh(); }
private void SelectNodeAt(int x, int y, ICollection nodes) { ToolBoxNode node = GetNodeAt(x, y, nodes); if (node == null) { return; } SelectedNode = node; this.Refresh(); }
private ToolBoxNode GetNodeAt(int x, int y, ICollection nodes) { foreach (ToolBoxNode node in nodes) { if (node.Bounds.Contains(x, y) && node.IsVisible) { ToolBoxNode potential_node = GetNodeAt(x, y, node.Nodes); if (potential_node == null) { return(node); } else { return(potential_node); } } } return(null); }
public override bool Show(ToolBoxNode node) { return (Text == null || node.Text.ToLower().Contains(Text) || (node.Tag != null && node.Tag.ToString().ToLower().Contains(Text))); }
public abstract bool Show(ToolBoxNode node);
private void ToolBox_MouseLeave(object sender, EventArgs e) { toolTip.Hide(this); HoverNode = null; this.Refresh(); }
private void ToolBox_MouseMove(object sender, MouseEventArgs e) { ToolBoxNode node = GetNodeAt(e.X, e.Y); if (node == null || node.Tag == null) { toolTip.Hide(this); HoverNode = node; this.Refresh(); return; } if (HoverNode == node) return; HoverNode = node; this.Refresh(); toolTip.ToolTipTitle = node.Text; toolTip.Show(node.Tag.ToString(), this, 0, node.Bounds.Bottom+15); }
public override bool Show(ToolBoxNode node) { return(Text == null || node.Text.ToLower().Contains(Text) || (node.Tag != null && node.Tag.ToString().ToLower().Contains(Text)) || (node.Tag2 != null && node.Tag2.ToString().ToLower().Contains(Text))); }
private ToolBoxNode GetNewToolChildNode(string line) { int comma = line.IndexOf(","); ToolBoxNode child = null; if (comma > 0) { child = new ToolBoxNode(line.Substring(0, comma)); child.Tag = line.Substring(comma + 1); } else { child = new ToolBoxNode(line); child.AlwaysExpand = true; } return child; }
public override bool Show(ToolBoxNode node) { return (node.Tag != null && SmartFactory.GetInstance().IsEventValidType(node.Tag.ToString(), Type)); }
private ToolBoxNode GetNewToolChildNode(string line) { int comma = line.IndexOf(","); ToolBoxNode child = null; if (comma > 0) { child = new ToolBoxNode(line.Substring(0, comma)); child.Tag = line.Substring(comma + 1); Dictionary<SmartType, Dictionary<string, int>> smart_name_to_id = SmartFactory.GetInstance().smart_name_to_id; child.Tag2 = SmartFactory.GetInstance().NameToId(type, line.Substring(comma + 1)); } else { child = new ToolBoxNode(line); child.AlwaysExpand = true; } return child; }