コード例 #1
0
 internal CallTip(Scintilla scintilla) : base(scintilla)
 {
     //	Go ahead and enable this. It's all pretty idiosyncratic IMO. For one
     //	thing you can't turn it off. We set the CallTip styles by default
     //	anyhow.
     NativeScintilla.CallTipUseStyle(10);
     Scintilla.BeginInvoke(new MethodInvoker(delegate()
     {
         HighlightTextColor = HighlightTextColor;
         ForeColor          = ForeColor;
         BackColor          = BackColor;
     }));
 }
コード例 #2
0
        private void snippetLinkTimer_Tick(object sender, EventArgs e)
        {
            _snippetLinkTimer.Enabled = false;
            Range sr = Scintilla.Selection.Range;

            if (_snippetLinks.IsActive)
            {
                SnippetLink      oldActiveSnippetLink = _snippetLinks.ActiveSnippetLink;
                SnippetLinkRange oldActiveRange       = _snippetLinks.ActiveRange;

                if (oldActiveRange != null && (oldActiveRange.IntersectsWith(sr) || oldActiveRange.Equals(sr)))
                {
                    Scintilla.BeginInvoke(new MethodInvoker(delegate()
                    {
                        cascadeSnippetLinkRangeChange(oldActiveSnippetLink, oldActiveRange);

                        foreach (SnippetLink sl in _snippetLinks.Values)
                        {
                            foreach (Range r in sl.Ranges)
                            {
                                if (sl == _snippetLinks.ActiveSnippetLink)
                                {
                                    r.ClearIndicator(Scintilla.Snippets.InactiveSnippetIndicator);
                                    r.SetIndicator(Scintilla.Snippets.ActiveSnippetIndicator);
                                }
                                else
                                {
                                    r.SetIndicator(Scintilla.Snippets.InactiveSnippetIndicator);
                                    r.ClearIndicator(Scintilla.Snippets.ActiveSnippetIndicator);
                                }
                            }
                        }

                        if (_pendingUndo)
                        {
                            _pendingUndo = false;
                            Scintilla.UndoRedo.EndUndoAction();
                        }

                        Scintilla.NativeInterface.Colourise(0, -1);
                    }));
                }
            }
        }