Ejemplo n.º 1
0
 private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Delete)
     {
         DeleteButton.PerformClick();
     }
 }
Ejemplo n.º 2
0
 public void SenseExistsAndButtonIsInActive_SenseDeleteClicked_SenseIsNotRemovedFromEntry()
 {
     using (EntryViewControl entryViewControl = CreateForm(apple, false))
     {
         entryViewControl.SenseDeletionEnabled = true;
         Assert.AreEqual(1, apple.Senses.Count);
         DeleteButton deleteButton = GetDeletebutton(entryViewControl.ControlEntryDetail, "Meaning 1");
         deleteButton.PerformClick();
         Assert.AreEqual(1, apple.Senses.Count);
     }
 }
Ejemplo n.º 3
0
 public void SenseExistsAndButtonIsInActive_SenseDeleteClicked_FieldNumberIsSame()
 {
     using (EntryViewControl entryViewControl = CreateForm(apple, false))
     {
         entryViewControl.SenseDeletionEnabled = true;
         Assert.AreEqual(6, entryViewControl.ControlEntryDetail.RowCount);
         DeleteButton deleteButton = GetDeletebutton(entryViewControl.ControlEntryDetail, "Meaning 1");
         deleteButton.PerformClick();
         Assert.AreEqual(6, entryViewControl.ControlEntryDetail.RowCount);
     }
 }
Ejemplo n.º 4
0
        private void HookKeyPressed(object sender, KeyPressedEventArgs e)
        {
            switch (e.Key)
            {
            case Keys.F5:
                BackupSave();
                break;

            case Keys.F8:
                LoadSave();
                break;

            case Keys.Delete:
                DeleteButton.PerformClick();
                break;
            }
        }
Ejemplo n.º 5
0
 private void удалитьToolStripMenuItem_Click(object sender, EventArgs e)
 {
     DeleteButton.PerformClick();
 }
Ejemplo n.º 6
0
        private void DoorForm_updated_KeyDown(object sender, KeyEventArgs e)
        {
            //one
            if (e.KeyCode.Equals(Keys.NumPad1))
            {
                oneButton.PerformClick();
            }

            //two
            if (e.KeyCode.Equals(Keys.NumPad2))
            {
                twoButton.PerformClick();
            }

            if (e.KeyCode.Equals(Keys.NumPad3))
            {
                threeButton.PerformClick();
            }

            if (e.KeyCode.Equals(Keys.NumPad4))
            {
                fourButton.PerformClick();
            }

            if (e.KeyCode.Equals(Keys.NumPad5))
            {
                fiveButton.PerformClick();
            }

            if (e.KeyCode.Equals(Keys.NumPad6))
            {
                sixButton.PerformClick();
            }

            if (e.KeyCode.Equals(Keys.NumPad7))
            {
                sevenButton.PerformClick();
            }

            if (e.KeyCode.Equals(Keys.NumPad8))
            {
                eightButton.PerformClick();
            }

            if (e.KeyCode.Equals(Keys.NumPad9))
            {
                nineButton.PerformClick();
            }

            if (e.KeyCode.Equals(Keys.NumPad0))
            {
                ZeroButton.PerformClick();
            }

            if (e.KeyCode.Equals(Keys.Multiply))
            {
                ScreenLabel.Enabled = true;
                starButton.PerformClick();
            }

            if (e.KeyCode.Equals(Keys.Back))
            {
                DeleteButton.PerformClick();
            }
            if (e.KeyCode.Equals(Keys.Delete))
            {
                ClearAllButton.PerformClick();
            }
        }
Ejemplo n.º 7
0
 //Caputure KeyStrokes
 private void MainForm_KeyDown(object sender, KeyEventArgs e)
 {
     if (MainScore != null)
     {
         //Escape
         if (!e.Control && e.KeyCode == Keys.Escape)
         {
             MainScore.ClearSelectedNoteArrays();
         }
         //Copy
         if (e.Control && e.KeyCode == Keys.C)
         {
             Copy();
         }
         //Cut
         if (e.Control && e.KeyCode == Keys.X)
         {
             Cut();
         }
         //Paste
         if (e.Control && e.KeyCode == Keys.V)
         {
             Paste();
         }
         //Delete
         if (!e.Control && e.KeyCode == Keys.Delete)
         {
             Delete();
         }
         if (e.Control && e.KeyCode == Keys.A)
         {
             SelectAll();
         }
         //Delete Tool Shortcut
         if (!e.Control && e.KeyCode == Keys.D)
         {
             DeleteButton.PerformClick();
         }
         //Select Tool Shortcut
         if (!e.Control && e.KeyCode == Keys.S)
         {
             SelectButton.PerformClick();
         }
         //Note Tool Shortcut
         if (!e.Control && e.KeyCode == Keys.N)
         {
             NoteLengthComboBox.Focus();
         }
         //Tempo Tool Shortcut
         if (!e.Control && e.KeyCode == Keys.T)
         {
             TempoButton.PerformClick();
         }
         //Instrument Tool Shortcut
         if (!e.Control && e.KeyCode == Keys.I)
         {
             InstrumentButton.PerformClick();
         }
         //Snapper Tool Shortcut
         if (e.Control && e.KeyCode == Keys.S)
         {
             SnapButton.PerformClick();
         }
         //Zoom Tool Shortcut : Out
         if (e.Control && e.KeyCode == Keys.OemMinus)
         {//http://stackoverflow.com/questions/3968423/what-is-the-enum-for-minus-underscore-and-equal-plus-key-in-keys-enumera
             ZoomMinusButton.PerformClick();
         }
         //Zoom Tool Shortcut : In
         if (e.Control && e.KeyCode == Keys.Oemplus)
         {
             ZoomPlusButton.PerformClick();
         }
         //Play Shortcut
         if (!e.Control && e.KeyCode == Keys.Space)
         {
             PlayButton.PerformClick();
         }
         MainScore.ScorePictureBox.Refresh();
     }
 }