本文整理汇总了C#中ScintillaNet.ScintillaControl.SetMarginMaskN方法的典型用法代码示例。如果您正苦于以下问题:C# ScintillaControl.SetMarginMaskN方法的具体用法?C# ScintillaControl.SetMarginMaskN怎么用?C# ScintillaControl.SetMarginMaskN使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ScintillaNet.ScintillaControl
的用法示例。
在下文中一共展示了ScintillaControl.SetMarginMaskN方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitMarkers
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(Properties.Resource.Enabled, "#00FF00"));
sci.MarkerDefinePixmap(markerBPDisabled, ScintillaNet.XPM.ConvertToXPM(Properties.Resource.Disabled, "#00FF00"));
sci.MarkerDefinePixmap(markerCurrentLine, ScintillaNet.XPM.ConvertToXPM(Properties.Resource.CurLine, "#00FF00"));
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);
}
示例2: InitMarkers
static public void InitMarkers(ScintillaControl sci)
{
sci.ModEventMask |= (Int32)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(Resource.Enabled);
var disabledImage = ScaleHelper.Scale(Resource.Disabled);
var curlineImage = ScaleHelper.Scale(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);
}
示例3: CreateControl
public static ScintillaControl CreateControl( )
{
ScintillaControl sci = new ScintillaControl();
sci.AutoCSeparator = 32;
sci.AutoCTypeSeparator = 63;
sci.IsAutoCGetAutoHide = true;
sci.IsAutoCGetCancelAtStart = false;
sci.IsAutoCGetChooseSingle = false;
sci.IsAutoCGetDropRestOfWord = false;
sci.IsAutoCGetIgnoreCase = false;
sci.ControlCharSymbol = 0;
sci.CurrentPos = 0;
sci.CursorType = -1;
sci.Dock = System.Windows.Forms.DockStyle.Fill;
sci.DocPointer = 187541976;
sci.EndAtLastLine = 1;
sci.EdgeColumn = 0;
sci.EdgeMode = 0;
sci.IsHScrollBar = true;
sci.IsMouseDownCaptures = true;
sci.IsBufferedDraw = true;
sci.IsOvertype = false;
sci.IsReadOnly = false;
sci.IsUndoCollection = true;
sci.IsVScrollBar = true;
sci.IsUsePalette = true;
sci.IsTwoPhaseDraw = true;
sci.LayoutCache = 1;
sci.Lexer = 3;
sci.Location = new System.Drawing.Point(0, 0);
sci.MarginLeft = 0;
sci.MarginRight = 0;
sci.ModEventMask = (Int32)ScintillaNet.Enums.ModificationFlags.InsertText | (Int32)ScintillaNet.Enums.ModificationFlags.DeleteText | (Int32)ScintillaNet.Enums.ModificationFlags.RedoPerformed | (Int32)ScintillaNet.Enums.ModificationFlags.UndoPerformed;
sci.MouseDwellTime = ScintillaControl.MAXDWELLTIME;
sci.Name = "sci";
sci.PasteConvertEndings = false;
sci.PrintColourMode = (Int32)ScintillaNet.Enums.PrintOption.Normal;
sci.PrintWrapMode = (Int32)ScintillaNet.Enums.Wrap.Word;
sci.PrintMagnification = 0;
sci.SearchFlags = 0;
sci.SelectionEnd = 0;
sci.SelectionMode = 0;
sci.SelectionStart = 0;
sci.SmartIndentType = ScintillaNet.Enums.SmartIndent.CPP;
sci.Status = 0;
sci.StyleBits = 7;
sci.TabIndex = 0;
sci.TargetEnd = 0;
sci.TargetStart = 0;
sci.WrapStartIndent = 4;
sci.WrapVisualFlagsLocation = (Int32)ScintillaNet.Enums.WrapVisualLocation.EndByText;
sci.WrapVisualFlags = (Int32)ScintillaNet.Enums.WrapVisualFlag.End;
sci.XOffset = 0;
sci.ZoomLevel = 0;
sci.UsePopUp(true);
sci.SetMarginTypeN(0, 1);
sci.SetMarginMaskN(0, 0);
sci.SetYCaretPolicy((Int32)(ScintillaNet.Enums.CaretPolicy.Jumps | ScintillaNet.Enums.CaretPolicy.Even), 0);
/*try
{
sci.Encoding = Encoding.GetEncoding((Int32)MainForm.Settings.DefaultCodePage);
}
catch(Exception error)
{
sci.Encoding = Encoding.GetEncoding(65001);
}*/
sci.Encoding = Encoding.UTF8;
sci.EmptyUndoBuffer();
ApplySciSettings(sci);
return sci;
}
示例4: CreateNewSciControl
/**
* Creates a new editor control for the document
*/
public ScintillaControl CreateNewSciControl(string file, string text, int codepage)
{
ScintillaControl sciControl = new ScintillaControl();
sciControl.AutoCSeparator = 32;
sciControl.AutoCTypeSeparator = 63;
sciControl.IsAutoCGetAutoHide = true;
sciControl.IsAutoCGetCancelAtStart = false;
sciControl.IsAutoCGetChooseSingle = false;
sciControl.IsAutoCGetDropRestOfWord = false;
sciControl.IsAutoCGetIgnoreCase = false;
sciControl.ControlCharSymbol = 0;
sciControl.CurrentPos = 0;
sciControl.CursorType = -1;
sciControl.Dock = System.Windows.Forms.DockStyle.Fill;
sciControl.DocPointer = 187541976;
sciControl.EndAtLastLine = 1;
sciControl.EdgeColumn = 0;
sciControl.EdgeMode = 0;
sciControl.IsHScrollBar = true;
sciControl.IsMouseDownCaptures = true;
sciControl.IsBufferedDraw = true;
sciControl.IsOvertype = false;
sciControl.IsReadOnly = false;
sciControl.IsUndoCollection = true;
sciControl.IsVScrollBar = true;
sciControl.IsUsePalette = true;
sciControl.IsTwoPhaseDraw = true;
sciControl.LayoutCache = 1;
sciControl.Lexer = 3;
sciControl.Location = new System.Drawing.Point(0, 0);
sciControl.MarginLeft = 5;
sciControl.MarginRight = 5;
sciControl.ModEventMask = this.sciEventMask;
sciControl.MouseDwellTime = ScintillaControl.MAXDWELLTIME;
sciControl.Name = "sciControl";
sciControl.PrintMagnification = 0;
sciControl.PrintColourMode = (int)ScintillaNet.Enums.PrintOption.Normal;
sciControl.PrintWrapMode = (int)ScintillaNet.Enums.Wrap.Word;
sciControl.SearchFlags = 0;
sciControl.SelectionEnd = 0;
sciControl.SelectionMode = 0;
sciControl.SelectionStart = 0;
sciControl.Size = new System.Drawing.Size(100, 100);
sciControl.SmartIndentType = ScintillaNet.Enums.SmartIndent.CPP;
sciControl.Status = 0;
sciControl.StyleBits = 7;
sciControl.TabIndex = 0;
sciControl.TargetEnd = 0;
sciControl.TargetStart = 0;
sciControl.WrapStartIndent = 4;
sciControl.WrapVisualFlagsLocation = (int)ScintillaNet.Enums.WrapVisualLocation.EndByText;
sciControl.WrapVisualFlags = (int)ScintillaNet.Enums.WrapVisualFlag.End;
sciControl.XOffset = 0;
sciControl.ZoomLevel = 0;
sciControl.UsePopUp(false);
sciControl.SetMarginTypeN(0, 0);
sciControl.SetMarginWidthN(0, 14);
sciControl.SetMarginTypeN(1, 1);
sciControl.SetMarginMaskN(1, 0);
sciControl.SetMarginTypeN(2, 0);
sciControl.SetMarginMaskN(2, -33554432);
sciControl.MarginSensitiveN(2, true);
sciControl.MarkerDefinePixmap(0, this.xpmBookmark);
sciControl.MarkerSetBack((int)ScintillaNet.Enums.MarkerOutline.Folder, 0x777777);
sciControl.MarkerSetFore((int)ScintillaNet.Enums.MarkerOutline.Folder, 0xFFFFFF);
sciControl.MarkerSetBack((int)ScintillaNet.Enums.MarkerOutline.FolderOpen, 0x777777);
sciControl.MarkerSetFore((int)ScintillaNet.Enums.MarkerOutline.FolderOpen, 0xFFFFFF);
sciControl.MarkerSetBack((int)ScintillaNet.Enums.MarkerOutline.FolderSub, 0x777777);
sciControl.MarkerSetFore((int)ScintillaNet.Enums.MarkerOutline.FolderSub, 0xFFFFFF);
sciControl.MarkerSetBack((int)ScintillaNet.Enums.MarkerOutline.FolderTail, 0x777777);
sciControl.MarkerSetFore((int)ScintillaNet.Enums.MarkerOutline.FolderTail, 0xFFFFFF);
sciControl.MarkerSetBack((int)ScintillaNet.Enums.MarkerOutline.FolderEnd, 0x777777);
sciControl.MarkerSetFore((int)ScintillaNet.Enums.MarkerOutline.FolderEnd, 0xFFFFFF);
sciControl.MarkerSetBack((int)ScintillaNet.Enums.MarkerOutline.FolderOpenMid, 0x777777);
sciControl.MarkerSetFore((int)ScintillaNet.Enums.MarkerOutline.FolderOpenMid, 0xFFFFFF);
sciControl.MarkerSetBack((int)ScintillaNet.Enums.MarkerOutline.FolderMidTail, 0x777777);
sciControl.MarkerSetFore((int)ScintillaNet.Enums.MarkerOutline.FolderMidTail, 0xFFFFFF);
sciControl.MarkerDefine((int)ScintillaNet.Enums.MarkerOutline.Folder, ScintillaNet.Enums.MarkerSymbol.BoxPlus);
sciControl.MarkerDefine((int)ScintillaNet.Enums.MarkerOutline.FolderOpen, ScintillaNet.Enums.MarkerSymbol.BoxMinus);
sciControl.MarkerDefine((int)ScintillaNet.Enums.MarkerOutline.FolderSub, ScintillaNet.Enums.MarkerSymbol.VLine);
sciControl.MarkerDefine((int)ScintillaNet.Enums.MarkerOutline.FolderTail, ScintillaNet.Enums. MarkerSymbol.LCorner);
sciControl.MarkerDefine((int)ScintillaNet.Enums.MarkerOutline.FolderEnd, ScintillaNet.Enums.MarkerSymbol.BoxPlusConnected);
sciControl.MarkerDefine((int)ScintillaNet.Enums.MarkerOutline.FolderOpenMid, ScintillaNet.Enums.MarkerSymbol.BoxMinusConnected);
sciControl.MarkerDefine((int)ScintillaNet.Enums.MarkerOutline.FolderMidTail, ScintillaNet.Enums.MarkerSymbol.TCorner);
sciControl.MarkerSetBack((int)ScintillaNet.Enums.MarkerSymbol.Background, SharedUtils.ResolveColor(this.settings.GetValue("FlashDevelop.BookmarkColor")));
sciControl.CodePage = this.SelectCodePage(codepage);
sciControl.Encoding = Encoding.GetEncoding(codepage);
sciControl.Text = SharedUtils.ConvertText(text, codepage, sciControl.CodePage);
sciControl.Tag = file;
sciControl.ContextMenu = this.editorMenu;
sciControl.MarginClick += new MarginClickHandler(this.OnScintillaControlMarginClick);
sciControl.Modified += new ModifiedHandler(this.OnScintillaControlModified);
sciControl.UpdateUI += new UpdateUIHandler(this.OnScintillaControlUpdateControl);
sciControl.URIDropped += new URIDroppedHandler(this.OnScintillaControlDropFiles);
sciControl.ModifyAttemptRO += new ModifyAttemptROHandler(this.OnScintillaControlModifyRO);
if (!file.StartsWith("Untitled")) sciControl.IsReadOnly = FileSystem.IsReadOnly(file);
sciControl.SetFoldFlags(this.settings.GetInt("FlashDevelop.FoldFlags"));
//.........这里部分代码省略.........
示例5: CreateControl
/// <summary>
/// Creates a new editor control for the document
/// </summary>
public static ScintillaControl CreateControl(String file, String text, Int32 codepage)
{
ScintillaControl sci = new ScintillaControl();
sci.AutoCSeparator = 32;
sci.AutoCTypeSeparator = 63;
sci.IsAutoCGetAutoHide = true;
sci.IsAutoCGetCancelAtStart = false;
sci.IsAutoCGetChooseSingle = false;
sci.IsAutoCGetDropRestOfWord = false;
sci.IsAutoCGetIgnoreCase = false;
sci.ControlCharSymbol = 0;
sci.CurrentPos = 0;
sci.CursorType = -1;
sci.Dock = System.Windows.Forms.DockStyle.Fill;
sci.DocPointer = 187541976;
sci.EndAtLastLine = 1;
sci.EdgeColumn = 0;
sci.EdgeMode = 0;
sci.IsHScrollBar = true;
sci.IsMouseDownCaptures = true;
sci.IsBufferedDraw = true;
sci.IsOvertype = false;
sci.IsReadOnly = false;
sci.IsUndoCollection = true;
sci.IsVScrollBar = true;
sci.IsUsePalette = true;
sci.IsTwoPhaseDraw = true;
sci.LayoutCache = 1;
sci.Lexer = 3;
sci.Location = new System.Drawing.Point(0, 0);
sci.MarginLeft = 5;
sci.MarginRight = 5;
sci.ModEventMask = (Int32)ScintillaNet.Enums.ModificationFlags.InsertText | (Int32)ScintillaNet.Enums.ModificationFlags.DeleteText | (Int32)ScintillaNet.Enums.ModificationFlags.RedoPerformed | (Int32)ScintillaNet.Enums.ModificationFlags.UndoPerformed;
sci.MouseDwellTime = ScintillaControl.MAXDWELLTIME;
sci.Name = "sci";
sci.PasteConvertEndings = false;
sci.PrintColourMode = (Int32)ScintillaNet.Enums.PrintOption.Normal;
sci.PrintWrapMode = (Int32)ScintillaNet.Enums.Wrap.Word;
sci.PrintMagnification = 0;
sci.SearchFlags = 0;
sci.SelectionEnd = 0;
sci.SelectionMode = 0;
sci.SelectionStart = 0;
sci.SmartIndentType = ScintillaNet.Enums.SmartIndent.CPP;
sci.Status = 0;
sci.StyleBits = 7;
sci.TabIndex = 0;
sci.TargetEnd = 0;
sci.TargetStart = 0;
sci.WrapStartIndent = Globals.Settings.IndentSize;
sci.WrapVisualFlagsLocation = (Int32)ScintillaNet.Enums.WrapVisualLocation.EndByText;
sci.WrapVisualFlags = (Int32)ScintillaNet.Enums.WrapVisualFlag.End;
sci.XOffset = 0;
sci.ZoomLevel = 0;
sci.UsePopUp(false);
sci.SetMarginTypeN(0, 0);
sci.SetMarginWidthN(0, 14);
sci.SetMarginTypeN(1, 1);
sci.SetMarginMaskN(1, 0);
sci.SetMarginTypeN(2, 0);
sci.SetMarginMaskN(2, -33554432 | 1 << 2);
sci.MarginSensitiveN(2, true);
sci.MarkerDefinePixmap(0, XpmBookmark);
sci.SetMarginMaskN(0, MarkerManager.MARKERS);
sci.MarkerDefine(2, ScintillaNet.Enums.MarkerSymbol.Fullrect);
sci.MarkerDefine((Int32)ScintillaNet.Enums.MarkerOutline.Folder, ScintillaNet.Enums.MarkerSymbol.BoxPlus);
sci.MarkerDefine((Int32)ScintillaNet.Enums.MarkerOutline.FolderOpen, ScintillaNet.Enums.MarkerSymbol.BoxMinus);
sci.MarkerDefine((Int32)ScintillaNet.Enums.MarkerOutline.FolderSub, ScintillaNet.Enums.MarkerSymbol.VLine);
sci.MarkerDefine((Int32)ScintillaNet.Enums.MarkerOutline.FolderTail, ScintillaNet.Enums.MarkerSymbol.LCorner);
sci.MarkerDefine((Int32)ScintillaNet.Enums.MarkerOutline.FolderEnd, ScintillaNet.Enums.MarkerSymbol.BoxPlusConnected);
sci.MarkerDefine((Int32)ScintillaNet.Enums.MarkerOutline.FolderOpenMid, ScintillaNet.Enums.MarkerSymbol.BoxMinusConnected);
sci.MarkerDefine((Int32)ScintillaNet.Enums.MarkerOutline.FolderMidTail, ScintillaNet.Enums.MarkerSymbol.TCorner);
sci.SetYCaretPolicy((Int32)(ScintillaNet.Enums.CaretPolicy.Jumps | ScintillaNet.Enums.CaretPolicy.Even), 0);
sci.SetXCaretPolicy((Int32)(ScintillaNet.Enums.CaretPolicy.Even), 0);
sci.CodePage = SelectCodePage(codepage);
sci.Encoding = Encoding.GetEncoding(codepage);
sci.SaveBOM = (sci.CodePage == 65001) && Globals.Settings.SaveUnicodeWithBOM;
sci.Text = text; sci.FileName = file; // Set text and save file name
sci.Modified += new ModifiedHandler(Globals.MainForm.OnScintillaControlModified);
sci.MarginClick += new MarginClickHandler(Globals.MainForm.OnScintillaControlMarginClick);
sci.UpdateUI += new UpdateUIHandler(Globals.MainForm.OnScintillaControlUpdateControl);
sci.URIDropped += new URIDroppedHandler(Globals.MainForm.OnScintillaControlDropFiles);
sci.ModifyAttemptRO += new ModifyAttemptROHandler(Globals.MainForm.OnScintillaControlModifyRO);
String untitledFileStart = TextHelper.GetString("Info.UntitledFileStart");
if (!file.StartsWith(untitledFileStart)) sci.IsReadOnly = FileHelper.FileIsReadOnly(file);
sci.SetFoldFlags((Int32)Globals.Settings.FoldFlags);
sci.EmptyUndoBuffer(); ApplySciSettings(sci);
UITools.Manager.ListenTo(sci);
return sci;
}