public InsertIndexedBlockCommand( int blockIndex, Block block) { BlockIndex = blockIndex; Block = block; UpdateTextPosition = DoTypes.All; }
public InsertMultilineTextCommand( BlockPosition position, string text) { // Make sure we have a sane state. if (text.Contains("\r")) { throw new ArgumentException( "text cannot have a return (\\r) character in it.", "text"); } // Save the text for the changes. BlockPosition = position; Text = text; UpdateTextPosition = DoTypes.All; // Set up our collection. addedBlocks = new List <Block>(); }
public DeleteBlockCommand(BlockKey blockKey) { this.blockKey = blockKey; UpdateTextPosition = DoTypes.All; }
public ChangeMultipleBlockTypesCommand() { Changes = new Dictionary <BlockKey, BlockType>(); previousBlockTypes = new Dictionary <BlockKey, BlockType>(); UpdateTextPosition = DoTypes.All; }