コード例 #1
0
        private SmState ShowToolTip(IKeyboardToolTip tool, ToolTip toolTip)
        {
            string toolTipText  = tool.GetCaptionForTool(toolTip);
            int    autoPopDelay = toolTip.GetDelayTime(NativeMethods.TTDT_AUTOPOP);

            if (!this.currentTool.IsHoveredWithMouse())
            {
                toolTip.ShowKeyboardToolTip(toolTipText, this.currentTool, autoPopDelay);
            }
            this.StartTimer(autoPopDelay, this.GetOneRunTickHandler((Timer sender) => this.Transit(SmEvent.AutoPopupDelayTimerExpired, this.currentTool)));
            return(SmState.Shown);
        }
コード例 #2
0
        private SmState ShowToolTip(IKeyboardToolTip tool, ToolTip toolTip)
        {
            string toolTipText  = tool.GetCaptionForTool(toolTip);
            int    autoPopDelay = toolTip.GetDelayTime(ComCtl32.TTDT.AUTOPOP);

            if (!_currentTool.IsHoveredWithMouse())
            {
                toolTip.ShowKeyboardToolTip(toolTipText, _currentTool, autoPopDelay);
            }
            StartTimer(autoPopDelay,
                       GetOneRunTickHandler((Timer sender) => Transit(SmEvent.AutoPopupDelayTimerExpired, _currentTool)));
            return(SmState.Shown);
        }