예제 #1
0
 public void ShowCallTip(Pos pos, string text)
 {
     using (var g = editor.CreateGraphics())
     {
         var info = ProcessHtmlString(text);
         ShowCallTip(g, pos, info.Size, (gr, pt) => DrawTip(info, gr, pt));
     }
 }
예제 #2
0
        private void Tick(object sender, EventArgs e)
        {
            if ((!editor.Focused && timerDraw) ||
                editor.Buffer == null ||
                OverlapRectangle(editor.CallTips.TipRectangle) ||
                editor.ReadOnly)
            {
                return;
            }

            using (var g = editor.CreateGraphics())
            {
                g.TranslateTransform(editor.Scroll.ScrollPosition.X, editor.Scroll.ScrollPosition.Y);

                if (timerDraw && timerBitmap != null)
                {
                    DrawSurface(g, caretX, caretY);
                }
                else
                {
                    DrawCaret(g, caretX, caretY, true);
                }
            }

            timerDraw = !timerDraw;
        }