?switch (e.KeyCode)
???{
?????///數據
????case Keys.F1://清除數據
????
?????if(File.Exists("Storage Card/CG.sdf"))
?????{
??????Mc.gConn.Close();
??????Mc.gConn.Dispose();
??????File.Delete("Storage Card/CG.sdf");
?????????
?????}
?????MessageBox.Show("全部數據清除成功,請重新啟動本程序!");
?????this.Close();
?????break;
????????case Keys.F2://導入數據
?????????????????????? ChangeTextToDb();
???????this.RecNum.Text="0";
?????????this.lbGczs.Text=Mc.InallGc();
????????this.lbGczs.Refresh();
??????this.lbGcZzs.Text=Mc.InallGcZs();
?????this.lbGcZzs.Refresh();
?????????break;
????case Keys.F3://導出數據
?????ChangeDbToText();
?????this.RecNum.Text="0";
?????break;
????case Keys.F4://清除預定庫
?????SqlCeCommand DelYdk=Mc.gConn.CreateCommand();
?????DelYdk.CommandText="Delete from Ydk";
?????DelYdk.ExecuteNonQuery();?
?????this.lbYdzs.Text = Mc.InallYd();
?????this.lbGcZzs.Text=Mc.InallYdZs();
?????this.lbGcZzs.Refresh();
?????this.lbYdzs.Refresh();
?????MessageBox.Show("預定庫清除成功");
?????break;
?????///數據
????case Keys.Right:
?????this.CaiGou.Visible = true;
?????this.ShuShangSheZhi.Visible = false;
?????this.TongJi.Visible = false;
?????break;
????case Keys.Down:
?????this.ShuShang.Focus();
?????this.CaiGou.Visible = false;
?????this.ShuShangSheZhi.Visible = true;
?????this.TongJi.Visible = false;
?????break;
????case Keys.Up:
?????//?????this.lbGczs.Text = Mc.InallGc();
?????this.lbYdzs.Text = Mc.InallYd();
?????this.lbGcZzs.Text=Mc.InallGcZs();
?????this.lbYdZzs.Text=Mc.InallYdZs();
?????this.CaiGou.Visible = false;
?????this.ShuShangSheZhi.Visible = false;
?????this.TongJi.Visible = true;
?????break;
????case Keys.Left:
?????if (this.CaiGou.Visible == false && this.ShuShangSheZhi.Visible == false && this.TongJi.Visible == false)
?????{
??????this.Close();
??????this.Dispose();
?????}
?????else
?????{
??????this.CaiGou.Visible = false;
??????this.ShuShangSheZhi.Visible = false;
??????this.TongJi.Visible = false;
?????}
?????break;
???}