Example #1
0
 public override void Execute()
 {
     if (_clickedMouseButtonsProvider.ClickedMouseButtons == MouseButtons.Right)
     {
         if (_functionsDetails.ContainsKey(Text))
         {
             _showFunctionDetails.Show(_functionsDetails[Text]);
             // menuFunctionsToolTip.SetFunctionInfo(FunctionsDetails.Details[this.Text]);
             //menuFunctionsToolTip.Show(this, menuItem.Width + 3, 0);
             // menuFunctionsToolTip.Show();
         }
     }
     else
     {
         if ((int)_sharedViewState.CurrentView < 4)
         {
             _expressionTextProvider.Text += Text;
         }
         else if ((int)_sharedViewState.CurrentView == 4)
         {
             _scriptingTextProvider.Text += Text;
         }
         else if ((int)_sharedViewState.CurrentView == 5)
         {
             _customFunctionsTextProvider.Text += Text;
         }
     }
 }
Example #2
0
        public void ShowToolTip(AutocompleteItem autocompleteItem, Control control = null)
        {
            toolTip.Close();
            var signature = autocompleteItem.Text;

            if (!_functionDetails.ContainsKey(signature))
            {
                return;
            }
            var functionInfo = _functionDetails[signature];

            if (string.IsNullOrWhiteSpace(functionInfo.Description) || string.IsNullOrWhiteSpace(functionInfo.Title) ||
                functionInfo.Description.Contains("here goes description (not done yet)") ||
                functionInfo.Title.Contains("_title_")
                )
            {
                return;
            }

            if (Settings.Default.TooltipType ==
                TooltipType.Default)
            {
                toolTip.setFunctionInfo(functionInfo);

                if (control == null)
                {
                    control = this;
                }

                toolTip.Show(control, Width + 3, 0);
            }
            else if (Settings.Default.TooltipType ==
                     TooltipType.Form)
            {
                formTip.SetFunctionInfo(functionInfo);
                formTip.Show();
            }
        }