private void KeyboardHook_KeyEvented(Keys key, KeyEventType type) { if(isRecording) { KeyEvent eve = new KeyEvent(elapsed, key, type); AddEvent(eve); } }
private void btnOk_Click(object sender, EventArgs e) { if(!isCorrect()) { MessageBox.Show("잘못된 값이 있습니다.", "에러", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if(FinishedSetting != null) { KeyEvent k = new KeyEvent(0, (Keys)Enum.Parse(typeof(Keys), textBox1.Text), GetKeyEventType()); FinishedSetting(k, true); FinishedSetting = null; this.Dispose(); } }