Exemplo n.º 1
0
 private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
 {
     if (e.Node.Text.Trim() == "图书添加")
     {
         FrmTianJia frmTianJia = new FrmTianJia();
         frmTianJia.ShowDialog();
         frmTianJia.Dispose();
     }
     else if (e.Node.Text.Trim() == "图书修改")
     {
         FrmXiuGai frmXiuGai = new FrmXiuGai();
         frmXiuGai.ShowDialog();
         frmXiuGai.Dispose();
     }
     else if (e.Node.Text.Trim() == "图书删除")
     {
         FrmShanChu frmShanChu = new FrmShanChu();
         frmShanChu.ShowDialog();
         frmShanChu.Dispose();
     }
     else if (e.Node.Text.Trim() == "图书查询")
     {
         BookManagermentFrom from = new BookManagermentFrom();
         from.ShowDialog();
         from.Dispose();
     }
     else if (e.Node.Text.Trim() == "用户借书")
     {
         FrmBooksBorrow frmBooksBorrow = new FrmBooksBorrow();
         frmBooksBorrow.ShowDialog();
         frmBooksBorrow.Dispose();
     }
     else if (e.Node.Text.Trim() == "用户还书")
     {
         FrmBooksReturn frmBookReturn = new FrmBooksReturn();
         frmBookReturn.ShowDialog();
         frmBookReturn.Dispose();
     }
     else if (e.Node.Text.Trim() == "重新登录")
     {
         DialogResult dr = MessageBox.Show("是否注销用户", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
         if (dr == DialogResult.Yes)
         {
             FrmLogin frmLogin = new FrmLogin();
             frmLogin.Show();
             this.Hide();
         }
         else
         {
         }
     }
     else if (e.Node.Text.Trim() == "用户管理")
     {
         FrmYongHu frmYongHu = new FrmYongHu();
         frmYongHu.ShowDialog();
         frmYongHu.Dispose();
     }
     else if (e.Node.Text.Trim() == "退出系统")
     {
         Application.Exit();    //退出系统
     }
     else if (e.Node.Text.Trim() == "计算器")
     {
         System.Diagnostics.Process.Start("calc.exe");
     }
     else if (e.Node.Text.Trim() == "记事本")
     {
         System.Diagnostics.Process.Start("notepad.exe");
     }
     else if (e.Node.Text.Trim() == "帮助")
     {
         MessageBox.Show("欢迎使用该图书管理!!!");
     }
 }
Exemplo n.º 2
0
        private void 图书修改ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmXiuGai frmXiuGai = new FrmXiuGai();

            frmXiuGai.Show();
        }