예제 #1
0
 protected void OnCopy(object target, ExecutedRoutedEventArgs args)
 {
     if (target != textEditor.textArea)
     {
         return;
     }
     if (textEditor.SelectionLength == 0 && executing)
     {
         // Send the 'Ctrl-C' abort
         //if (!IsInReadOnlyRegion)
         //{
         MoveToHomePosition();
         //textEditor.Column = GetLastTextEditorLine().Length + 1;
         //textEditor.Write(Environment.NewLine);
         //}
         dispatcherThread.Abort(new Microsoft.Scripting.KeyboardInterruptException(""));
         args.Handled = true;
     }
     else
     {
         PythonEditingCommandHandler.OnCopy(target, args);
     }
 }
예제 #2
0
 private void OnCopy(object target, ExecutedRoutedEventArgs args)
 {
     if (target != _textEditor.TextArea)
     {
         return;
     }
     if (_textEditor.SelectionLength == 0 && Executing)
     {
         // Send the 'Ctrl-C' abort
         //if (!IsInReadOnlyRegion)
         //{
         MoveToHomePosition();
         //textEditor.Column = GetLastTextEditorLine().Length + 1;
         //textEditor.Write(Environment.NewLine);
         //}
         AbortRunningScript();
         args.Handled = true;
     }
     else
     {
         PythonEditingCommandHandler.OnCopy(target, args);
     }
 }