private void CommandCopy() { if (CommandCanCopy()) { TileSelectionClipboard clip = new TileSelectionClipboard(_selection.Tiles); clip.CopyToClipboard(); CommandManager.Invalidate(CommandKey.Paste); } }
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); } }