Ejemplo n.º 1
0
        public override void Run()
        {
            string clipboardText = ClipboardWrapper.GetText();

            if (string.IsNullOrEmpty(clipboardText))
            {
                return;
            }

            IViewContent viewContent = WorkbenchSingleton.Workbench.ActiveViewContent;

            if (viewContent == null || !(viewContent is ITextEditorProvider))
            {
                return;
            }

            ITextEditor textEditor = ((ITextEditorProvider)viewContent).TextEditor;

            if (textEditor == null)
            {
                return;
            }

            using (textEditor.Document.OpenUndoGroup())
                Run(textEditor, clipboardText);
        }
Ejemplo n.º 2
0
        public override void Run()
        {
            string clipboardText = ClipboardWrapper.GetText();

            if (string.IsNullOrEmpty(clipboardText))
            {
                return;
            }

            //IViewContent viewContent = WorkbenchSingleton.Workbench.ActiveViewContent;
            ITextEditorControlProvider viewContent = WorkbenchSingleton.ActiveControl as ITextEditorControlProvider;

            if (viewContent == null || !(viewContent is ITextEditorControlProvider))
            {
                return;
            }

            TextEditorControl textEditor = ((ITextEditorControlProvider)viewContent).TextEditorControl;

            if (textEditor == null)
            {
                return;
            }

            textEditor.BeginUpdate();
            textEditor.Document.UndoStack.StartUndoGroup();
            try {
                Run(textEditor, clipboardText);
            } finally {
                textEditor.Document.UndoStack.EndUndoGroup();
                textEditor.EndUpdate();
            }
            textEditor.Refresh();
        }
Ejemplo n.º 3
0
 public void Paste()
 {
     hexEditContainer.Paste(ClipboardWrapper.GetText());
 }
 public void Paste()
 {
     comboBox.SelectedText = ClipboardWrapper.GetText();
 }