void Form1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyData == Keys.Delete) { RemoveCommand removeCommand = new RemoveCommand(_shapeList, _selected); removeCommand.Do(); _commandStack.Push(removeCommand); UpdateControls(); Invalidate(); } }
void Form1_KeyDown(object sender, KeyEventArgs e) { if (e.KeyData == Keys.Delete) { RemoveCommand removeCommand = new RemoveCommand(_shapeList,_selected); removeCommand.Do(); _commandStack.Push(removeCommand); UpdateControls(); Invalidate(); } }