示例#1
0
        private void OnBtnDeTaiTTClick(object sender, EventArgs e)
        {
            GuiResInfoMng.ChangeScreen(GuiResInfoMng.ScreenID.DeTaiThucTapScreen);

            this._panelMain.Controls.Clear();
            DeTaiThucTap dt = new DeTaiThucTap();

            this._panelMain.Controls.Add(dt);
            dt.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);
        }