예제 #1
0
 private void toolBar_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
 {
     if (e.Button == tbLogout)
     {
         new frmLogin().Show();
         this.Close();
     }
     else if (e.Button == tbMuon)
     {
         frmMuonSach frmmuon = new frmMuonSach();
         frmmuon.MdiParent = this;
         frmmuon.Show();
     }
     else if (e.Button == tbTra)
     {
         frmTraSach fTra = new frmTraSach();
         fTra.MdiParent = this;
         fTra.Show();
     }
     else if (e.Button == tbThoat)
     {
         DialogResult rs = MessageBox.Show(this, "Bạn có chắc thoát chương trình chưa", "Thong bao", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
         if (rs == DialogResult.Yes)
         {
             Application.Exit();
         }
     }
 }
예제 #2
0
        private void menuItem15_Click(object sender, System.EventArgs e)
        {
            frmTraSach frmtra = new frmTraSach();

            frmtra.MdiParent = this;
            frmtra.Show();
        }