Пример #1
0
        void btn_Click(object sender, EventArgs e)
        {
            FrmDictionary frm = Application.OpenForms.OfType <FrmDictionary>().FirstOrDefault();

            if (frm != null)
            {
                frm.Close();
            }
            SimpleButton simpleButton = sender as SimpleButton;

            if (simpleButton != null)
            {
                DanhMucCon nguphap = (simpleButton.Tag as DanhMucCon);
                FrmGrammar f       = new FrmGrammar(nguphap.ID);
                f.Text = "Học ngữ pháp";
                f.ShowDialog();
            }
        }
Пример #2
0
        void btn_Click(object sender, EventArgs e)
        {
            FrmDictionary frm = Application.OpenForms.OfType <FrmDictionary>().FirstOrDefault();

            if (frm != null)
            {
                frm.Close();
            }
            SimpleButton simpleButton = sender as SimpleButton;

            if (simpleButton != null)
            {
                BaiHoc           baiHoc = (simpleButton.Tag as BaiHoc);
                FrmBaiHocChiTiet f      = new FrmBaiHocChiTiet(baiHoc.ID);
                f.Text = f.Text + " số " + baiHoc.ID;
                //f. = this;
                f.Text = "Bài học";
                f.ShowDialog();
            }
        }