Esempio n. 1
0
        /// <summary>
        /// 按下按键(不包括 UP DOWN RIGHT LEFT  需要在窗口行为中重写的系统键行为中处理)
        /// </summary>
        private void itemBox_KeyDown(object sender, KeyEventArgs e)
        {
            ItemBox ib = sender as ItemBox;

            switch (e.KeyCode)
            {
            case Keys.Enter:
                ib.Execute();
                break;

            case Keys.Alt:
            case Keys.Menu:
                break;

            case Keys.Apps:
                break;

            case Keys.Space:
                #region 空格
                if (isItemMode(nowSeMode))
                {
                    // this.done = false;
                    Hide();
                    Item.Item.Edit(ib.Tag.ToString());
                    setDone();
                }
                else if (nowSeMode is XiaoChaoMode)
                {
                    //  this.done = false;
                    Hide();
                    Item.XiaoChao.editXC(ib.Tag.ToString());
                    setDone();
                }
                break;

                #endregion
            default:
                SeBox.Focus();
                break;
            }
        }