예제 #1
0
        private void CommandCopy()
        {
            if (CommandCanCopy())
            {
                TileSelectionClipboard clip = new TileSelectionClipboard(_selection.Tiles);
                clip.CopyToClipboard();

                CommandManager.Invalidate(CommandKey.Paste);
            }
        }
예제 #2
0
        private void CommandCut()
        {
            if (CommandCanCut())
            {
                TileSelectionClipboard clip = new TileSelectionClipboard(_selection.Tiles);
                clip.CopyToClipboard();

                CompoundCommand command = new CompoundCommand();
                if (!_selection.Floating)
                {
                    command.AddCommand(new FloatTileSelectionCommand(Layer as MultiTileGridLayer, this));
                }
                command.AddCommand(new DeleteTileSelectionCommand(this));

                LayerContext.History.Execute(command);

                CommandManager.Invalidate(CommandKey.Paste);
            }
        }