예제 #1
0
 /// <summary>
 /// Обработчик нажатия горячих клавиш
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void MainForm_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Control && e.KeyCode == Keys.Z)
     {
         UndoPressed?.Invoke(this, e);
     }
     if (e.Control && e.KeyCode == Keys.Y)
     {
         RedoPressed?.Invoke(this, e);
     }
     if (e.Control && e.KeyCode == Keys.C)
     {
         FigureCopied?.Invoke(this, e);
     }
     if (e.KeyCode == Keys.Delete)
     {
         FiguresDeleted?.Invoke(this, e);
     }
 }
예제 #2
0
 /// <summary>
 /// Обработчик нажатия на пункт меню "Удалить"
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void DeleteToolStripMenuItem_Click(object sender, EventArgs e)
 {
     FiguresDeleted?.Invoke(this, e);
 }