Example #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();
     }
 }
Example #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();
     }
 }