/// <summary>
        /// 当对房屋按钮按下键盘时
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void HouseChange(object sender, KeyPressEventArgs e)
        {
            if (!canReadLog())
            {
                return;
            }
            if (e.KeyChar == 120 || e.KeyChar == 88)//如果按下的是X,将房屋转到虚拟幢上
            {
                MHouse h = ((Button)sender).Tag as MHouse;
                //FRMSampleArea sa = new FRMSampleArea(oa.getDataTable("select name from DIC_SAMPLEAREA"));//获取样本区域
                //if (sa.ShowDialog() == DialogResult.OK)
                //{
                try
                {
                    //string value = sa.Value;//获得样本区域
                    //sa.Dispose();
                    oa.Update("update EM_HOUSE_T set FLOOR_ID=(select a.floor_id from EM_FLOORS_T a,EM_BUILDING_T b where a.building_id=b.building_id and  b.isVirtual=1 and rownum=1) ,note='虚' where house_id=" + h.Houseid);//将房屋更新到指定虚拟幢上
                    bool isNew = true;
                    //sl.saveLog("将ID为" + h.Houseid + ",层ID为" + h.Floor.Floorid + "的" + (h.Note == "虚" ? "虚" : "") + "房屋更新到" + value + "的虚拟幢上");                    PublicMethod.SaveStringToFile(logpath, uname + "\t" + DateTime.Now.ToLocalTime() + "\t" + "将ID为" + h.Houseid + ",层ID为" + h.Floor.Floorid + "的房屋更新到虚拟幢上\r\n", true);//将更新记录保存到LOG文件                    MessageBox.Show("更新成功");                    h.Floor.Houses.Remove(h);//删除层里房屋                    addLouPan();//重新加载楼盘
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
                //}
                //else
                //{
                //    sa.Dispose();
                //}            }        
            else if (e.KeyChar == 69 || e.KeyChar == 101)//如果按下的是E,修改室号
            {
                FRMEditHouse eh = new FRMEditHouse("新室号", "修改室号", false, "");
                if (eh.ShowDialog() == DialogResult.OK)
                {
                    try
                    {
                        MHouse h = ((Button)sender).Tag as MHouse;
                        string newroomnum = eh.Value;
                        List<OracleParameter> pars = new List<OracleParameter>();
                        pars.Add(new OracleParameter(":room", newroomnum));
                        oa.Update("update EM_HOUSE_T set ROOM_NUMBER=:room where house_id=" + h.Houseid, pars);                        PublicMethod.SaveStringToFile(logpath, uname + "\t" + DateTime.Now.ToLocalTime() + "\t" + "将ID为" + h.Houseid + "的房屋室号由" + h.Roomnumber + "更新" + newroomnum + "\r\n", true);
                        h.Roomnumber = newroomnum;
                        sortHouse(h.Floor.Houses);
                        addLouPan();
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message);
                    }
                }
                eh.Dispose();
            }            else if (e.KeyChar == 67 || e.KeyChar == 99)//如果按下的是c,将修改id
            {
                MHouse h = ((Button)sender).Tag as MHouse;                if (MessageBox.Show("确定更新这个房屋的系统id更新为?" + item.Text + "吗?", "", MessageBoxButtons.OKCancel) == DialogResult.OK)
                {
                    if (MessageBox.Show("确定吗??", "", MessageBoxButtons.OKCancel) == DialogResult.OK)
                    {                        //MessageBox.Show("请按下H键");
                        //if (e.KeyChar == 72 || e.KeyChar == 104)
                        {
                            oa.Update("update EM_HOUSE_T set sysid =" + item.Text + " where house_id=" + h.Houseid);
                            oa.Update("update EM_flat_plan_T set sysid =" + item.Text + " where plan_id in (select plan_id from em_house_t where house_id =" + h.Houseid + ")");
                        }
                        PublicMethod.SaveStringToFile(logpath, uname + "\t" + DateTime.Now.ToLocalTime() + "\t" + "将ID为" + h.Houseid + "的房屋 的系统id 更新为" + item.Text + "\r\n", true);
                        string cmdtxt = String.Format("update zengliangloupan set status = {0} where sysid ={1} ", "5", int.Parse(item.Text));//表示此楼盘是转移登记的
                        ora.RunOracle(cmdtxt);
                    }
                }
            }
          
            else if (e.KeyChar == 68 || e.KeyChar == 100)//如果按下的是d,将删除指定房屋
            {                MHouse h = ((Button)sender).Tag as MHouse;
                string id = h.Houseid.ToString();
                AppDomain.CurrentDomain.SetData("aa ", id);                //MessageBox.Show(id);
                Form2 fs = new Form2();
                fs.Show();            }            else if (e.KeyChar == 87 || e.KeyChar == 111)  //  如果按下的是W键,就跳转到form2窗口
            {
                Form2 fs = new Form2();
                fs.Show();
            }

           }所有的键盘时间都可以    就只有这个W没反应  为什么?请教高手···谢谢···