public KeChuyenForm(string strMaBaiHoc, ChonBaiHocForm MyParent) { InitializeComponent(); frmParent = MyParent; frmParent.Hide(); maBH = strMaBaiHoc; try { BaiHocDTO baihoc = new BaiHocDTO(); baihoc = BaiHocBUS.LayBaiHocTheoMa(strMaBaiHoc); tenCauChuyen = baihoc.Ten.ToString(); FileHinhAnh = baihoc.FileHinhAnh.ToString(); labelX4.Text = tenCauChuyen; if (FileHinhAnh != "") { Bitmap bm = new Bitmap(FileHinhAnh); bm.MakeTransparent(System.Drawing.Color.White); pictureBox1.BackgroundImage = bm; } else { pnlHinhAnh.Visible = false; pnlCauChuyenTraLoi.Visible = false; rtbNoiDung.Visible = false; } } catch (System.Exception ex) { MessageBox.Show(ex.Message.ToString()); } }
private void LuyenTuVaCau_Load(object sender, EventArgs e) { lblThongBao.Visible = false; HienThiBaiHoc(); //tltXemDapAn.SetToolTip(picCTKetQua, "Xem đáp án"); frmParent.Hide(); //this.rtfCuaSoDapAn.LoaiBai = (byte)KhungLamBaiLuyenTuVaCau.LoaiBaiTap.ThanhPhanCau; }
public OnTap(string strMaBaiHoc, ChonBaiHocForm MyParent) { InitializeComponent(); DanhSachDeBai = FileLuyenTapBUS.LayFileTheoMaBaiHoc(strMaBaiHoc); frmParent = MyParent; frmParent.Hide(); intDeBaiHienTai = 0; BaiHocDTO BaiNghe = BaiHocBUS.LayBaiHocTheoMa(strMaBaiHoc); DanhSachBaiNghe = FileAmThanhBUS.LayFileAmThanhTheoMa(BaiNghe.FileAmThanh); }
public TapLamVanForm(string strMaBaiHoc, ChonBaiHocForm frmParent) { InitializeComponent(); cauHienTai = 0; pictruocstatus = 0; pictiepstatus = 0; myParent = frmParent; myParent.Hide(); rtbGhiNho.Visible = false; picCauHoi.Visible = false; picDapAn.Visible = true; try { tableLT = TapLamVanBUS.LayDanhSachBai(strMaBaiHoc, "TLV_LT"); tableGN = TapLamVanBUS.LayDanhSachBai(strMaBaiHoc, "TLV_GN"); slRecordLT = tableLT.Rows.Count; slRecordGN = tableGN.Rows.Count; layDuongDan(); if (slRecordLT > 1) { pictiepstatus = 1; } rtbCauHoi.LoadFile(filenoidung); if (pictiepstatus == 1) { picCTCauTiepTheo.Visible = true; } if (pictruocstatus == 1) { picCTCauTruoc.Visible = true; } } catch (Exception) { if (slRecordLT == 0) { rtbCauHoi.Text = "Bài này không có bài tập!"; } else { MessageBox.Show("Không thể đọc được dữ liệu!", "Thông báo lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
public LuyenTuVaCauForm(string strMaBaiHoc, ChonBaiHocForm MyParent) { InitializeComponent(); frmParent = MyParent; frmParent.Hide(); try { DanhSachDeBai = FileLuyenTapBUS.LayFileTheoMaBaiHoc(strMaBaiHoc); if (DanhSachDeBai.Count == 0) { MessageBox.Show("Không có dữ liệu cho bài học này"); frmParent.Show(); this.Close(); } else { this.picCTCauTiepTheo.Visible = false; this.intDeBaiHienTai = 0; this.picCTCauTruoc.Visible = false; this.arrDanhSachCauDuocChon = new List <int>(); if (DanhSachDeBai.Count <= 1) { this.picCTCauTiepTheo.Visible = false; } else { this.picCTCauTiepTheo.Visible = true; } } } catch (Exception Ex) { MessageBox.Show(Ex.Message); this.Dispose(); } }
private void ChinhTaForm_Load(object sender, EventArgs e) { lblThongBao.Visible = true; frmParent.Hide(); }