Esempio n. 1
0
 /// <summary>
 /// Prepares this variable and the Scintilla control to display images.
 /// Calls SCI_ANNOTATIONSETVISIBLE(ANNOTATION_STANDARD). Need it because will draw images in annotation areas.
 /// </summary>
 /// <param name="c">The control.</param>
 /// <param name="isEditor">Display images that are not in "&lt;image "path etc"&gt; tag. Then does not display icons of files that don't contain images. Then limits image height to 10 lines.</param>
 internal SciImages(AuScintilla c, bool isEditor = false)
 {
     if (t_data == null)
     {
         t_data = new _ThreadSharedData();
     }
     _c        = c;
     _t        = c.Z;
     _isEditor = isEditor;
     _sci_AnnotationDrawCallback = _AnnotationDrawCallback;
     _callbackPtr = Marshal.GetFunctionPointerForDelegate(_sci_AnnotationDrawCallback);
     _c.Call(SCI_SETANNOTATIONDRAWCALLBACK, 0, _callbackPtr);
     _visible = AnnotationsVisible.ANNOTATION_STANDARD;
     _c.Call(SCI_ANNOTATIONSETVISIBLE, (int)_visible);             //keep annotations always visible. Adding annotations while visible is slower, but much faster than getting images from files etc.
 }
Esempio n. 2
0
    protected override void OnLoad(EventArgs e)
    {
        var z = _sci.Z;

        z.StyleBackColor(Sci.STYLE_DEFAULT, 0xF0F0F0);
        z.StyleFont(Sci.STYLE_DEFAULT, Font);
        z.MarginWidth(1, 4);
        z.StyleClearAll();
        //_sci.Call(Sci.SCI_SETHSCROLLBAR);
        _sci.Call(Sci.SCI_SETVSCROLLBAR);

        Program.MousePosChangedWhenProgramVisible += _MouseInfo;
        ATimer.After(50, _ => { ZSetAboutInfo(); _html.Show(); });

        base.OnLoad(e);
    }