private void sheet_KeyUp(object sender, KeyEventArgs e) { if (e.Control) { if (e.KeyCode == Keys.O) { BtnOpen.PerformClick(); } else if (e.KeyCode == Keys.E) { BtnSave.PerformClick(); } else if (e.KeyCode == Keys.T) { BtnConvert.PerformClick(); } else if (e.KeyCode == Keys.S) { BtnSynth.PerformClick(); } else if (e.KeyCode == Keys.Add || e.KeyCode == Keys.Oemplus) { sheet.NoteWidth *= 1.1F; sheet.Redraw(); } else if (e.KeyCode == Keys.Subtract || e.KeyCode == Keys.OemMinus) { sheet.NoteWidth *= 1 / 1.1F; sheet.Redraw(); } } else if (e.KeyCode == Keys.Space) { if (_file == null) { return; } BtnPlay.PerformClick(); } else if (e.KeyCode == Keys.Left) { if (_file == null) { return; } _file.CurrentTime = _file.CurrentTime.Subtract(TimeSpan.FromSeconds(0.25)); sheet.Time = _file.CurrentTime; sheet.Redraw(); } else if (e.KeyCode == Keys.Right) { if (_file == null) { return; } _file.CurrentTime = _file.CurrentTime.Add(TimeSpan.FromSeconds(0.25)); sheet.Time = _file.CurrentTime; sheet.Redraw(); } }
private void btnSaveForm_Click(object sender, EventArgs e) { if (BtnSave != null && BtnSave.Enabled) { BtnSave.PerformClick(); } else if (BtnSaveDelNNew != null && BtnSaveDelNNew.Enabled) { BtnSaveDelNNew.SaveClickEvent(); } }
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { switch (keyData) { case (Keys.Control | Keys.N): { BtnAddNew.PerformClick(); break; } case (Keys.Control | Keys.E): { BtnEdit.PerformClick(); break; } case (Keys.Control | Keys.D): { BtnDelete.PerformClick(); break; } case (Keys.Control | Keys.S): { BtnSave.PerformClick(); break; } case (Keys.Control | Keys.U): { BtnUndo.PerformClick(); break; } case (Keys.Control | Keys.F): { BtnFind.PerformClick(); break; } case (Keys.Control | Keys.R): { BtnReload.PerformClick(); break; } case (Keys.Control | Keys.P): { BtnPrint.PerformClick(); break; } } return(base.ProcessCmdKey(ref msg, keyData)); }
protected override bool ProcessDialogKey(Keys keyData) { switch (Form.ModifierKeys) { case Keys.None when keyData == Keys.Escape: if (ArsMessage.Question("Onay", Text + " Ekranı Kapatılacak.\nEmin Misiniz?") == DialogResult.Yes) { this.Close(); } return(true); case Keys.None when keyData == Keys.F10 && (BtnSave != null || btnSaveDelNew != null): if (BtnSave != null && BtnSave.Enabled) { BtnSave.PerformClick(); } else if (BtnSaveDelNNew != null && BtnSaveDelNNew.Enabled) { BtnSaveDelNNew.SaveClickEvent(); } break; case Keys.None when keyData == Keys.F11 && (BtnDel != null || btnSaveDelNew != null): if (BtnDel != null && BtnDel.Enabled) { BtnDel.PerformClick(); } else if (BtnSaveDelNNew != null && BtnSaveDelNNew.Enabled) { BtnSaveDelNNew.DelClickEvent(); } break; case Keys.None when keyData == Keys.F12 && (BtnClear != null || btnSaveDelNew != null): if (BtnClear != null && BtnClear.Enabled) { BtnClear.PerformClick(); } else if (BtnSaveDelNNew != null && BtnSaveDelNNew.Enabled) { BtnSaveDelNNew.NewClickEvent(); } break; } return(base.ProcessDialogKey(keyData)); }
private void BtnCerrar_Click(object sender, EventArgs e) { if (changeState) { DialogResult resul = MessageBox.Show("Desea Guardar los cambios realizados?", "Advertencia", MessageBoxButtons.YesNo); if (resul == DialogResult.Yes) { BtnSave.PerformClick(); } else { CargarDatosEnDGVTar(); } changeState = false; } ModeEditar(false); }