Пример #1
0
 public static void Delete(HexEditorData data)
 {
     if (data.IsSomethingSelected)
     {
         data.DeleteSelection();
         return;
     }
     if (data.Caret.Offset >= data.Length)
     {
         return;
     }
     data.Remove(data.Caret.Offset, 1);
     data.UpdateLine(data.Caret.Line);
 }
Пример #2
0
 public static void Backspace(HexEditorData data)
 {
     if (data.IsSomethingSelected)
     {
         data.DeleteSelection();
         return;
     }
     if (data.Caret.Offset == 0)
     {
         return;
     }
     data.Remove(data.Caret.Offset - 1, 1);
     data.Caret.Offset--;
 }