Beispiel #1
0
        private void ByByWindows(object sender, FormClosedEventArgs e)
        {
            Form frm;

            if (sender is Form)
            {
                frm = (Form)sender;
                if (frm == frmLietKeTinhGia)
                {
                    frmLietKeTinhGia = null;
                }
                if (frm == frmBangGiaGiay)
                {
                    frmBangGiaGiay = null;
                }
                if (frm == frmBangGiaThanhPham)
                {
                    frmBangGiaThanhPham = null;
                }
                if (frm == frmBangGiaInNhanh)
                {
                    frmBangGiaInNhanh = null;
                }
                if (frm == frmBangGiaInNhanhMay)
                {
                    frmBangGiaInNhanhMay = null;
                }
                if (frm == frmTinhThu)
                {
                    frmTinhThu = null;
                }
            }
        }
Beispiel #2
0
 private void btnBangGiaThanhPham_Click(object sender, EventArgs e)
 {
     if (frmBangGiaThanhPham == null)
     {
         frmBangGiaThanhPham             = new BangGiaThanhPhamForm();
         frmBangGiaThanhPham.MinimizeBox = false;
         frmBangGiaThanhPham.MaximizeBox = false;
         frmBangGiaThanhPham.FormClosed += new FormClosedEventHandler(ByByWindows);
         frmBangGiaThanhPham.Show();
     }
     else
     {
         frmBangGiaThanhPham.Focus();
     }
 }