Esempio n. 1
0
        public const int indicatorDebugCurrentLine        = 30;         // (Int32)ScintillaNet.Enums.IndicatorStyle.Max

        #region scintilla events

        /// <summary>
        ///
        /// </summary>
        static public void AddSciEvent(String value)
        {
            ScintillaControl sci = GetScintillaControl(value);

            sci.ModEventMask  |= (Int32)ScintillaNet.Enums.ModificationFlags.ChangeMarker;
            sci.MarkerChanged += new MarkerChangedHandler(SciControl_MarkerChanged);

            sci.MarginSensitiveN(0, true);

            int mask = sci.GetMarginMaskN(0);

            mask |= GetMarkerMask(markerBPEnabled);
            mask |= GetMarkerMask(markerBPDisabled);
            mask |= GetMarkerMask(markerBPNotAvailable);
            mask |= GetMarkerMask(markerCurrentLine);

            sci.SetMarginMaskN(0, mask);
            sci.SetMarginWidthN(0, 18);

            sci.MarkerDefinePixmap(markerBPEnabled, Properties.Resource.XpmBreakPointEnabled);
            sci.MarkerDefinePixmap(markerBPDisabled, Properties.Resource.XpmBreakPointDisabled);

            sci.MarkerDefinePixmap(markerCurrentLine, Properties.Resource.XpmCurrentLine);

            sci.MarkerSetBack(markerBPEnabled, DataConverter.ColorToInt32(PluginMain.settingObject.BreakPointEnableLineColor));             //enable
            sci.MarkerSetBack(markerBPDisabled, DataConverter.ColorToInt32(PluginMain.settingObject.BreakPointDisableLineColor));           //dis

            sci.Modified    += new ModifiedHandler(sci_Modified);
            sci.MarginClick += new MarginClickHandler(SciControl_MarginClick);
        }
Esempio n. 2
0
        static public void InitMarkers(ScintillaControl sci)
        {
            sci.ModEventMask  |= (Int32)ScintillaNet.Enums.ModificationFlags.ChangeMarker;
            sci.MarkerChanged += new MarkerChangedHandler(SciControl_MarkerChanged);
            sci.MarginSensitiveN(0, true);
            int mask = sci.GetMarginMaskN(0);

            mask |= GetMarkerMask(markerBPEnabled);
            mask |= GetMarkerMask(markerBPDisabled);
            mask |= GetMarkerMask(markerBPNotAvailable);
            mask |= GetMarkerMask(markerCurrentLine);
            sci.SetMarginMaskN(0, mask);
            var enabledImage  = ScaleHelper.Scale(Properties.Resource.Enabled);
            var disabledImage = ScaleHelper.Scale(Properties.Resource.Disabled);
            var curlineImage  = ScaleHelper.Scale(Properties.Resource.CurLine);

            sci.MarkerDefineRGBAImage(markerBPEnabled, enabledImage);
            sci.MarkerDefineRGBAImage(markerBPDisabled, disabledImage);
            sci.MarkerDefineRGBAImage(markerCurrentLine, curlineImage);
            Language lang = PluginBase.MainForm.SciConfig.GetLanguage("as3");       // default

            sci.MarkerSetBack(markerBPEnabled, lang.editorstyle.ErrorLineBack);     // enable
            sci.MarkerSetBack(markerBPDisabled, lang.editorstyle.DisabledLineBack); // disable
            sci.MarginClick += new MarginClickHandler(SciControl_MarginClick);
            sci.Modified    += new ModifiedHandler(sci_Modified);
        }
Esempio n. 3
0
        static public void InitMarkers(ScintillaControl sci)
        {
            sci.ModEventMask  |= (Int32)ScintillaNet.Enums.ModificationFlags.ChangeMarker;
            sci.MarkerChanged += new MarkerChangedHandler(SciControl_MarkerChanged);
            sci.MarginSensitiveN(0, true);
            int mask = sci.GetMarginMaskN(0);

            mask |= GetMarkerMask(markerBPEnabled);
            mask |= GetMarkerMask(markerBPDisabled);
            mask |= GetMarkerMask(markerBPNotAvailable);
            mask |= GetMarkerMask(markerCurrentLine);
            sci.SetMarginMaskN(0, mask);
            sci.MarkerDefinePixmap(markerBPEnabled, ScintillaNet.XPM.ConvertToXPM(ScaleHelper.Stretch(Properties.Resource.Enabled), "#00FF00"));
            sci.MarkerDefinePixmap(markerBPDisabled, ScintillaNet.XPM.ConvertToXPM(ScaleHelper.Stretch(Properties.Resource.Disabled), "#00FF00"));
            sci.MarkerDefinePixmap(markerCurrentLine, ScintillaNet.XPM.ConvertToXPM(ScaleHelper.Stretch(Properties.Resource.CurLine), "#00FF00"));
            Language lang = PluginBase.MainForm.SciConfig.GetLanguage("lua");       // default

            sci.MarkerSetBack(markerBPEnabled, lang.editorstyle.ErrorLineBack);     // enable
            sci.MarkerSetBack(markerBPDisabled, lang.editorstyle.DisabledLineBack); // disable
            sci.MarginClick += new MarginClickHandler(SciControl_MarginClick);
            sci.Modified    += new ModifiedHandler(sci_Modified);
        }