protected static void SetCaretPosition(ITextControl textControl, NTriplesIntentionResult result)
 {
     if (result.PreferredSelection != DocumentRange.InvalidRange)
     {
         textControl.Selection.SetRange(result.PreferredSelection.TextRange);
     }
 }
Пример #2
0
 protected static void SetCaretPosition(ITextControl textControl, NTriplesIntentionResult result)
 {
     if (result.PreferredSelection != DocumentRange.InvalidRange)
     {
         textControl.Selection.SetRange(result.PreferredSelection.TextRange);
     }
 }
        protected virtual void OnHotspotSessionExecutionStartedInternal(NTriplesIntentionResult result, ITextControl textControl)
        {
            var hotspotSessionUi = this.HotspotSessionExecutor.CurrentSession;
            if (hotspotSessionUi == null)
            {
                SetCaretPosition(textControl, result);
            }
            else
            {
                hotspotSessionUi.HotspotSession.Closed.Advise(
                    EternalLifetime.Instance,
                    args =>
                    {
                        if (args.TerminationType != TerminationType.Finished)
                        {
                            return;
                        }

                        SetCaretPosition(textControl, result);
                    });
            }
        }
Пример #4
0
        protected virtual void OnHotspotSessionExecutionStartedInternal(NTriplesIntentionResult result, ITextControl textControl)
        {
            var hotspotSessionUi = this.HotspotSessionExecutor.CurrentSession;

            if (hotspotSessionUi == null)
            {
                SetCaretPosition(textControl, result);
            }
            else
            {
                hotspotSessionUi.HotspotSession.Closed.Advise(
                    EternalLifetime.Instance,
                    args =>
                {
                    if (args.TerminationType != TerminationType.Finished)
                    {
                        return;
                    }

                    SetCaretPosition(textControl, result);
                });
            }
        }
 public void OnHotspotSessionExecutionStarted(NTriplesIntentionResult result, ITextControl textControl)
 {
     this.OnHotspotSessionExecutionStartedInternal(result, textControl);
 }
Пример #6
0
 public void OnHotspotSessionExecutionStarted(NTriplesIntentionResult result, ITextControl textControl)
 {
     this.OnHotspotSessionExecutionStartedInternal(result, textControl);
 }