当前位置: 首页>>代码示例>>C#>>正文


C# ScintillaControl.EnsureVisibleEnforcePolicy方法代码示例

本文整理汇总了C#中ScintillaNet.ScintillaControl.EnsureVisibleEnforcePolicy方法的典型用法代码示例。如果您正苦于以下问题:C# ScintillaControl.EnsureVisibleEnforcePolicy方法的具体用法?C# ScintillaControl.EnsureVisibleEnforcePolicy怎么用?C# ScintillaControl.EnsureVisibleEnforcePolicy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ScintillaNet.ScintillaControl的用法示例。


在下文中一共展示了ScintillaControl.EnsureVisibleEnforcePolicy方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: NextMarker

        /// <summary>
        /// Moves the cursor to the next marker
        /// </summary>
        public static void NextMarker(ScintillaControl sci, Int32 marker, Int32 line)
        {
            Int32 next = 0;
            Int32 lineMask = sci.MarkerGet(line);
            if ((lineMask & GetMarkerMask(marker)) != 0)
            {
                next = sci.MarkerNext(line + 1, GetMarkerMask(marker));
                if (next != -1)
                {
                    sci.EnsureVisibleEnforcePolicy(next);
                    sci.GotoLineIndent(next);
                }
                else
                {
                    next = sci.MarkerNext(0, GetMarkerMask(marker));
                    if (next != -1)
                    {

                        sci.EnsureVisibleEnforcePolicy(next);
                        sci.GotoLineIndent(next);
                    }
                }
            }
            else
            {
                next = sci.MarkerNext(line, GetMarkerMask(marker));
                if (next != -1)
                {
                    sci.EnsureVisibleEnforcePolicy(next);
                    sci.GotoLineIndent(next);
                }
                else
                {
                    next = sci.MarkerNext(0, GetMarkerMask(marker));
                    if (next != -1)
                    {
                        sci.EnsureVisibleEnforcePolicy(next);
                        sci.GotoLineIndent(next);
                    }
                }
            }
        }
开发者ID:xeronith,项目名称:flashdevelop,代码行数:45,代码来源:MarkerManager.cs

示例2: MoveToPosition

 /// <summary>
 /// Move the document position
 /// </summary>
 private void MoveToPosition(ScintillaControl sci, Int32 position)
 {
     try
     {
         position = sci.MBSafePosition(position); // scintilla indexes are in 8bits
         Int32 line = sci.LineFromPosition(position);
         sci.EnsureVisibleEnforcePolicy(line);
         sci.GotoPos(position);
         sci.SetSel(position, sci.LineEndPosition(line));
         sci.Focus();
     }
     catch
     {
         String message = TextHelper.GetString("Info.InvalidItem");
         ErrorManager.ShowInfo(message);
         this.RemoveInvalidItems();
         this.RefreshProject();
     }
 }
开发者ID:xeronith,项目名称:flashdevelop,代码行数:22,代码来源:PluginUI.cs

示例3: PreviousMarker

 /// <summary>
 /// Moves the cursor to the previous marker
 /// </summary>
 public static void PreviousMarker(ScintillaControl sci, Int32 marker, Int32 line)
 {
     Int32 prev = 0; Int32 count = 0;
     Int32 lineMask = sci.MarkerGet(line);
     if ((lineMask & GetMarkerMask(marker)) != 0)
     {
         prev = sci.MarkerPrevious(line - 1, GetMarkerMask(marker));
         if (prev != -1)
         {
             sci.EnsureVisibleEnforcePolicy(prev);
             sci.GotoLineIndent(prev);
         }
         else
         {
             count = sci.LineCount;
             prev = sci.MarkerPrevious(count, GetMarkerMask(marker));
             if (prev != -1)
             {
                 sci.EnsureVisibleEnforcePolicy(prev);
                 sci.GotoLineIndent(prev);
             }
         }
     }
     else
     {
         prev = sci.MarkerPrevious(line, GetMarkerMask(marker));
         if (prev != -1)
         {
             sci.EnsureVisibleEnforcePolicy(prev);
             sci.GotoLineIndent(prev);
         }
         else
         {
             count = sci.LineCount;
             prev = sci.MarkerPrevious(count, GetMarkerMask(marker));
             if (prev != -1)
             {
                 sci.EnsureVisibleEnforcePolicy(prev);
                 sci.GotoLineIndent(prev);
             }
         }
     }
 }
开发者ID:xeronith,项目名称:flashdevelop,代码行数:46,代码来源:MarkerManager.cs

示例4: SelectMatch

 /// <summary>
 /// Selects a search match
 /// </summary>
 public static void SelectMatch(ScintillaControl sci, SearchMatch match)
 {
     Int32 start = sci.MBSafePosition(match.Index); // wchar to byte position
     Int32 end = start + sci.MBSafeTextLength(match.Value); // wchar to byte text length
     Int32 line = sci.LineFromPosition(start);
     sci.EnsureVisibleEnforcePolicy(line);
     sci.SetSel(start, end);
 }
开发者ID:xeronith,项目名称:flashdevelop,代码行数:11,代码来源:FRDialogGenerics.cs

示例5: SetSelAndFocus

 /// <summary>
 /// Goes to the match and ensures that correct fold is opened
 /// </summary>
 private void SetSelAndFocus(ScintillaControl sci, Int32 line, Int32 startPosition, Int32 endPosition)
 {
     sci.SetSel(startPosition, endPosition);
     sci.EnsureVisibleEnforcePolicy(line);
 }
开发者ID:xeronith,项目名称:flashdevelop,代码行数:8,代码来源:PluginUI.cs


注:本文中的ScintillaNet.ScintillaControl.EnsureVisibleEnforcePolicy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。