public PasteCommand(TextEditorFactory editor, CommandFactory factory) : base(editor, factory) { _selStart = editor.SelectionStart; _selText = editor.SelectedText; _pasteLen = Clipboard.GetText().Length; }
public MainWindow() { InitializeComponent(); _strat = new HTMLHighlightingStrategy(this.richTextBox); _editor = new CommandLibrary.TextEditorFactory(this._textBox, _strat); _factory = new CommandFactory(_editor); _editor.Strategy.DoHighlight(); }
public CopyCommand(TextEditorFactory editor, CommandFactory factory) : base(editor, factory) { }
public OpenFileCommand(TextEditorFactory editor, CommandFactory factory) : base(editor, factory) { }
public UndoableCommand(TextEditorFactory editor, CommandFactory factory) : base(editor, factory) { }
public UndoCommand(TextEditorFactory editor, CommandFactory factory) : base(editor, factory) { _commandStack = new Stack<UndoableCommand>(); }
public BaseCommand(TextEditorFactory editor, CommandFactory factory) { _editor = editor; _factory = factory; }
public CommandFactory(TextEditorFactory editor) { _textEditor = editor; _textEditor.CommandFactory = this; }