コード例 #1
0
ファイル: PasteCommand.cs プロジェクト: SergeMerge/TextEditor
 public PasteCommand(TextEditorFactory editor, CommandFactory factory)
     : base(editor, factory)
 {
     _selStart = editor.SelectionStart;
     _selText = editor.SelectedText;
     _pasteLen = Clipboard.GetText().Length;
 }
コード例 #2
0
 public MainWindow()
 {
     InitializeComponent();
     _strat = new HTMLHighlightingStrategy(this.richTextBox);
     _editor = new CommandLibrary.TextEditorFactory(this._textBox, _strat);
     _factory = new CommandFactory(_editor);
     _editor.Strategy.DoHighlight();
 }
コード例 #3
0
ファイル: CopyCommand.cs プロジェクト: SergeMerge/TextEditor
 public CopyCommand(TextEditorFactory editor, CommandFactory factory)
     : base(editor, factory)
 {
 }
コード例 #4
0
 public OpenFileCommand(TextEditorFactory editor, CommandFactory factory)
     : base(editor, factory)
 {
 }
コード例 #5
0
 public UndoableCommand(TextEditorFactory editor, CommandFactory factory)
     : base(editor, factory)
 {
 }
コード例 #6
0
ファイル: UndoCommand.cs プロジェクト: SergeMerge/TextEditor
 public UndoCommand(TextEditorFactory editor, CommandFactory factory)
     : base(editor, factory)
 {
     _commandStack = new Stack<UndoableCommand>();
 }
コード例 #7
0
ファイル: BaseCommand.cs プロジェクト: SergeMerge/TextEditor
 public BaseCommand(TextEditorFactory editor, CommandFactory factory)
 {
     _editor = editor;
     _factory = factory;
 }
コード例 #8
0
 public CommandFactory(TextEditorFactory editor)
 {
     _textEditor = editor;
     _textEditor.CommandFactory = this;
 }