Beispiel #1
0
        private void OnBtnSinhVienTTClick(object sender, EventArgs e)
        {
            GuiResInfoMng.ChangeScreen(GuiResInfoMng.ScreenID.SinhVienThucTapScreen);

            this._panelMain.Controls.Clear();
            SinhVienThucTap sv = new SinhVienThucTap();

            this._panelMain.Controls.Add(sv);
            sv.Show();
        }
        /// <summary>
        /// Hàm lấy ra handle của screen
        /// </summary>
        /// <param name="screenID">ScreenID tương ứng</param>
        /// <returns>Handle của screenID</returns>
        private static UserControl GetIntanceScreen(ScreenID screenID)
        {
            UserControl intance = null;

            switch (screenID)
            {
            case ScreenID.SinhVienThucTapScreen:
                intance = new SinhVienThucTap();
                break;

            case ScreenID.GiaoVienHuongDanScreen:
                intance = new GiaoVienHuongDan();
                break;

            case ScreenID.DeTaiThucTapScreen:
                intance = new DeTaiThucTap();
                break;

            case ScreenID.DangKyDeTaiScreen:
                intance = new DangKyDeTai();
                break;

            case ScreenID.HuyDeTaiDangKyScreen:
                intance = new HuyDeTaiDangKy();
                break;

            case ScreenID.BangDiemScreen:
                intance = new BangDiem();
                break;

            case ScreenID.BaoCaoThongKeScreen:
                intance = new BaoCaoThongKe();
                break;

            case ScreenID.TroGiupScreen:
                intance = new TroGiup();
                break;

            default:
                throw new ArgumentOutOfRangeException(_SCREEN_ID_NOT_FOUND);
            }
            return(intance);
        }