コード例 #1
0
        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);
            }
        }
コード例 #2
0
        /// <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);
        }