void DoTooltipAfterMouseMove(Point p) { NodePanel current = _layout.LocatePanel(p); if (LayoutHelper.MovedTest(_nodePanel, current, p)) { _ttTimer.Stop(); if (current == null) { return; } Controller.SetCurrentModules(current.TreeNode, Controller.ConsumerTreeNode); _nodePanel = current; _tooltip.SetToolTip(this, TooltipString(current.TreeNode.NodeValue)); _tooltip.Active = true; _ttTimer.Start(); } }
/// <summary> /// Constructor /// </summary> public TypeUserPanel() { InitializeComponent(); Font sysFont = SystemFonts.MessageBoxFont; Font = new Font(sysFont.Name, sysFont.SizeInPoints, sysFont.Style); _borderPen = new Pen(Brushes.DarkGray, 1); _vStringFormat = new StringFormat(StringFormatFlags.DirectionVertical); _imgExpanded = Resources.Expanded; _imgCollapsed = Resources.Collapsed; _tooltip = new ToolTip(); _ttTimer = new Timer { Interval = 4000 }; _ttTimer.Tick += TtTimerTick; _layout = new LayoutHelper(); }