Example #1
0
 /// <summary>
 /// Selects the text specified in the action point
 /// </summary>
 public static void ExecuteActionPoint(ActionPoint point, ScintillaControl sci)
 {
     if (point.EntryPosition != -1 && point.ExitPosition != -1)
     {
         Int32 start = sci.MBSafePosition(point.EntryPosition);
         Int32 end   = sci.MBSafePosition(point.ExitPosition);
         sci.SetSel(start, end);
     }
     else if (point.EntryPosition != -1 && point.ExitPosition == -1)
     {
         Int32 start = sci.MBSafePosition(point.EntryPosition);
         sci.SetSel(start, start);
     }
 }
Example #2
0
 /// <summary>
 /// Selects the text specified in the action point
 /// </summary>
 public static void ExecuteActionPoint(ActionPoint point, ScintillaControl sci)
 {
     if (point.EntryPosition != -1 && point.ExitPosition != -1)
     {
         Int32 start = sci.MBSafePosition(point.EntryPosition);
         Int32 end = sci.MBSafePosition(point.ExitPosition);
         sci.SetSel(start, end);
     }
     else if (point.EntryPosition != -1 && point.ExitPosition == -1)
     {
         Int32 start = sci.MBSafePosition(point.EntryPosition);
         sci.SetSel(start, start);
     }
 }
 /// <summary>
 /// Selects the text specified in the action point
 /// </summary>
 public static void ExecuteActionPoint(ActionPoint point, ScintillaNet.ScintillaControl sci)
 {
     while (sci.SelectText(BOUNDARY, 0) != -1)
     {
         sci.ReplaceSel("");
     }
     if (point.EntryPosition != -1 && point.ExitPosition != -1)
     {
         Int32 start = sci.MBSafePosition(point.EntryPosition);
         Int32 end   = sci.MBSafePosition(point.ExitPosition);
         sci.SetSel(start, end);
     }
     else if (point.EntryPosition != -1 && point.ExitPosition == -1)
     {
         Int32 start = sci.MBSafePosition(point.EntryPosition);
         sci.SetSel(start, start);
     }
 }