예제 #1
0
 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();
     }
 }
예제 #2
0
 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();
     }
 }