Beispiel #1
0
 private void TextArea_MarginClick(object sender, ScintillaNET.MarginClickEventArgs e)
 {
     if (e.Margin == BOOKMARK_MARGIN)
     {
         // Do we have a marker for this line?
         const uint mask = (1 << BOOKMARK_MARKER);
         var        line = TextArea.Lines[TextArea.LineFromPosition(e.Position)];
         if ((line.MarkerGet() & mask) > 0)
         {
             // Remove existing bookmark
             line.MarkerDelete(BOOKMARK_MARKER);
         }
         else
         {
             // Add bookmark
             line.MarkerAdd(BOOKMARK_MARKER);
         }
     }
 }