예제 #1
0
 protected void UpdateCommandState(ViewState stateToUpdate) {
     if (caretViewReader.CaretPosition.Line >= 0) {
         stateToUpdate.LineCount = textViewReader.LinesCount;
         stateToUpdate.ActiveLineIndex = caretViewReader.CaretPosition.Line;
         stateToUpdate.ActiveColumnIndex = caretViewReader.CaretPosition.Column;
         stateToUpdate.LineStates[caretViewReader.CaretPosition.Line] = textViewReader.GetLine(caretViewReader.CaretPosition.Line);
     }
 }
예제 #2
0
 public BaseTextViewCommand(ITextViewReadonly textViewReader, ICaretViewReadonly caretViewReader) {
     this.textViewReader = textViewReader;
     this.caretViewReader = caretViewReader;
     BeforeCommandExecutedState = new ViewState();
     AfterCommandExecutedState = new ViewState();
 }