void winCanvas_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { GUIKeyEventArgs args = e.Translate(); foreach (var item in this.Children) { item.InvokeEvent(EventType.KeyDown, args); } }
/// <summary> /// /// </summary> /// <param name="e"></param> /// <returns></returns> public static GUIKeyEventArgs Translate(this System.Windows.Forms.KeyEventArgs e) { var args = new GUIKeyEventArgs((GUIKeys)e.KeyData); return(args); }