ACPAddIn.ThisAddIn.triggerSuggestion C# (CSharp) Method

triggerSuggestion() private method

private triggerSuggestion ( bool auto ) : void
auto bool
return void
        private void triggerSuggestion(bool auto)
        {
            // initialize the coordinates to pop-up the suggestion box
            //evaluateCaretPosition();

            // Create a background worker thread to invoke requestSuggestion() method.
            // After the background worker thread is completed, it will call displaySuggestion() method
            // to display the result.
            MethodInvoker workerThread = null;

            // MethodInvoker can only take in method without parameter, hence we need to create two different methods
            // to separate the two modes.
            if (auto)
                workerThread = new MethodInvoker(requestSuggestionAutomatic);
            else
                workerThread = new MethodInvoker(requestSuggestionManual);

            workerThread.BeginInvoke(null, null);
        }