private void _Paste() { var command = new MapCommand(CurrentMap, PalletViewModelManager.Clipboard); CurrentMap.AddHistory(command); PalletViewModelManager.Clipboard.Paste(CurrentMap); CommandCanExecuteChanged(); }
private void _Cut() { var command = new MapCommand(CurrentMap, MapSelect); CurrentMap.AddHistory(command); PalletViewModelManager.Clipboard.Cut(CurrentMap); CommandCanExecuteChanged(); }
/// <summary> /// ���N���b�N�ƃ}�E�X�ړ� /// </summary> /// <param name="position"></param> public void MouseMoveWithLeftButtonDown(MousePosition position) { var p = position.GridPoint; if (PalletViewModelManager.CanDraw(CurrentMap, p)) { var command = new MapCommand(p, CurrentMap, MapSelect); _commandPool.Add(command); //Draw����Model��X�V PalletViewModelManager.Draw(CurrentMap, p, MapSelect); //MapControl.Rendering(); } }
/// <summary> /// ���N���b�N�A�b�v /// </summary> /// <param name="position"></param> public void MouseLeftButtonUp(MousePosition position) { if (_commandPool.FirstOrDefault() == null) return; var command = new MapCommand(_commandPool); CurrentMap.AddHistory(command); _commandPool.Clear(); CommandCanExecuteChanged(); }
/// <summary> /// ���N���b�N�_�E�� /// </summary> /// <param name="position"></param> public void MouseLeftButtonDown(MousePosition position) { var p = position.GridPoint; if (PalletViewModelManager.CanDraw(CurrentMap, p)) { //�ꎞ�R�}���h�v�[���ɃR�}���h��ۑ� var command = new MapCommand(p, CurrentMap, MapSelect); _commandPool.Add(command); //Draw����Model��X�V PalletViewModelManager.Draw(CurrentMap, p, MapSelect); CommandCanExecuteChanged(); } }
public void Delete() { if (!MapSelect.IsEmpty) { //Undo�R�}���h�̍쐬 var command = new MapCommand(CurrentMap, MapSelect); CurrentMap.AddHistory(command); PalletViewModelManager.Delete(CurrentMap, MapSelect); } }