Esempio n. 1
0
        private void frmView_KeyDown(object sender, KeyEventArgs e)
        {
            //注册键事件
            FormKeyEvent formKeyEvent = new FormKeyEvent();                  //创建键事件处理实例类

            formKeyEvent.KeyEscapeEvent += new FormKeyEvent.FormKey(Cancel); //取消
            formKeyEvent.Run(e);                                             //运行注册的方法
        }
Esempio n. 2
0
        private void tvClassify_KeyDown(object sender, KeyEventArgs e)
        {
            //注册键事件
            FormKeyEvent formKeyEvent = new FormKeyEvent();                  //创建键事件处理实例类

            formKeyEvent.KeyInsertEvent += new FormKeyEvent.FormKey(Add);    //增加
            formKeyEvent.KeyDeleteEvent += new FormKeyEvent.FormKey(Delete); //删除
            formKeyEvent.Run(e);                                             //运行注册的方法
        }
Esempio n. 3
0
        private void frmAbout_KeyDown(object sender, KeyEventArgs e)
        {
            //注册键事件
            FormKeyEvent formKeyEvent = new FormKeyEvent();                     //创建键事件处理实例类

            formKeyEvent.KeyEnterEvent  += new FormKeyEvent.FormKey(FromClose); //确认
            formKeyEvent.KeyEscapeEvent += new FormKeyEvent.FormKey(FromClose); //取消
            formKeyEvent.Run(e);                                                //运行注册的方法
        }
Esempio n. 4
0
        private void frmSetPassword_KeyDown(object sender, KeyEventArgs e)
        {
            //注册键事件
            FormKeyEvent formKeyEvent = new FormKeyEvent();                  //创建键事件处理实例类

            formKeyEvent.KeyEnterEvent  += new FormKeyEvent.FormKey(Save);   //确定
            formKeyEvent.KeyEscapeEvent += new FormKeyEvent.FormKey(Cancel); //取消
            formKeyEvent.KeyF1Event     += new FormKeyEvent.FormKey(Help);   //帮助
            formKeyEvent.Run(e);                                             //运行注册的方法
        }
Esempio n. 5
0
        private void frmExport_KeyDown(object sender, KeyEventArgs e)
        {
            //注册键事件
            FormKeyEvent formKeyEvent = new FormKeyEvent();                  //创建键事件处理实例类

            formKeyEvent.KeyEnterEvent  += new FormKeyEvent.FormKey(Export); //导出
            formKeyEvent.KeyEscapeEvent += new FormKeyEvent.FormKey(Cancel); //取消
            formKeyEvent.KeyF1Event     += new FormKeyEvent.FormKey(Help);   //帮助
            formKeyEvent.Run(e);                                             //运行注册的方法
        }
Esempio n. 6
0
        private void frmLogin_KeyDown(object sender, KeyEventArgs e)
        {
            Task tase = new Task(Login);
            //注册键事件
            FormKeyEvent formKeyEvent = new FormKeyEvent();                      //创建键事件处理实例类

            formKeyEvent.KeyEnterEvent  += new FormKeyEvent.FormKey(tase.Start); //保存
            formKeyEvent.KeyEscapeEvent += new FormKeyEvent.FormKey(Cancel);     //取消
            formKeyEvent.Run(e);                                                 //运行注册的方法
        }
Esempio n. 7
0
        private void frmContentEdit_KeyDown(object sender, KeyEventArgs e)
        {
            //注册键事件
            FormKeyEvent formKeyEvent = new FormKeyEvent();                    //创建键事件处理实例类

            formKeyEvent.KeyEnterEvent  += new FormKeyEvent.FormKey(Save);     //保存
            formKeyEvent.KeyEscapeEvent += new FormKeyEvent.FormKey(Cancel);   //取消
            formKeyEvent.KeyF1Event     += new FormKeyEvent.FormKey(Help);     //帮助
            formKeyEvent.KeyF8Event     += new FormKeyEvent.FormKey(Decoding); //解码
            formKeyEvent.Run(e);                                               //运行注册的方法
        }
Esempio n. 8
0
        private void frmLog_KeyDown(object sender, KeyEventArgs e)
        {
            //注册键事件
            FormKeyEvent formKeyEvent = new FormKeyEvent();//创建键事件处理实例类

            if (gbSelect.Visible)
            {
                formKeyEvent.KeyEnterEvent += new FormKeyEvent.FormKey(SelectData); //查询
            }
            formKeyEvent.KeyEscapeEvent += new FormKeyEvent.FormKey(Cancel);        //取消
            formKeyEvent.KeyF1Event     += new FormKeyEvent.FormKey(Help);          //帮助
            formKeyEvent.Run(e);                                                    //运行注册的方法
        }