void keybHandler_KeyDown(object sender, Keys e) { trainKey = e; if (ActionArrived != null) { NBResult result = new NBResult(); result.Description = "Key: " + e; result.Action = actions.ContainsKey(e) ? actions[e] : NBAction.Unknown; ActionArrived(this, result); } }
void device_ActionArrived(object sender, NBResult e) { txtBox.Text += e.ToString() + Environment.NewLine; txtBox.ScrollToEnd(); }