protected virtual void OnActionRecorded(KeyEvent e) { var handler = ActionRecorded; if (handler != null) { handler(this, e); } }
private void KeyRecorder_ActionRecorded(object sender, KeyEvent e) { AddEvent(e); OnLogAction(string.Format("Value: {7} Key: {0} Data: {1} Code: {2} Modifiers: {3} Shift: {4} Control: {5} Alt: {6}", e.Key, e.Data, e.Code, e.Modifiers, e.Shift, e.Control, e.Alt, e.Value.ToString())); }
protected virtual void PersistKey() { Keys.Add(_keyEvent); OnActionRecorded(_keyEvent); _keyEvent = null; }
private void KeyDown(object sender, KeyEventArgs e) { _keyEvent = KeyEvent.FromEvent(e); }