コード例 #1
0
 public InsertIndexedBlockCommand(
     int blockIndex,
     Block block)
 {
     BlockIndex         = blockIndex;
     Block              = block;
     UpdateTextPosition = DoTypes.All;
 }
コード例 #2
0
        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>();
        }
コード例 #3
0
 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;
 }