www.pudn.com > stu_rag.rar > MDIfrmMain.frm, change:2003-03-16,size:5255b


VERSION 5.00 
Begin VB.MDIForm MDIfrmMain  
   BackColor       =   &H8000000C& 
   Caption         =   "考试系统" 
   ClientHeight    =   5328 
   ClientLeft      =   168 
   ClientTop       =   432 
   ClientWidth     =   8280 
   LinkTopic       =   "MDIForm1" 
   StartUpPosition =   2  'CenterScreen 
   WindowState     =   2  'Maximized 
   Begin VB.Menu mTest  
      Caption         =   "人员" 
      Begin VB.Menu mtLogin  
         Caption         =   "人员登录" 
      End 
      Begin VB.Menu mtLogout  
         Caption         =   "注销登录" 
         Enabled         =   0   'False 
      End 
      Begin VB.Menu mtBar  
         Caption         =   "-" 
      End 
      Begin VB.Menu mtExit  
         Caption         =   "退出系统" 
      End 
   End 
   Begin VB.Menu mStudent  
      Caption         =   "学生" 
      Visible         =   0   'False 
      Begin VB.Menu msBeginTest  
         Caption         =   "开始测试" 
      End 
      Begin VB.Menu msQuery  
         Caption         =   "信息查询" 
      End 
   End 
   Begin VB.Menu mTeacher  
      Caption         =   "教师" 
      Visible         =   0   'False 
      Begin VB.Menu mcPaper  
         Caption         =   "生成试卷" 
      End 
      Begin VB.Menu mcLookThrough  
         Caption         =   "浏览试卷" 
      End 
      Begin VB.Menu mcModify  
         Caption         =   "修改考卷" 
      End 
      Begin VB.Menu mcBar1  
         Caption         =   "-" 
      End 
      Begin VB.Menu mcRefresh  
         Caption         =   "试题管理" 
      End 
      Begin VB.Menu mcBar2  
         Caption         =   "-" 
      End 
      Begin VB.Menu mcCheck  
         Caption         =   "评判试卷" 
      End 
      Begin VB.Menu mcQuery  
         Caption         =   "查询结果" 
      End 
   End 
   Begin VB.Menu MAdmin  
      Caption         =   "管理员" 
      Visible         =   0   'False 
      Begin VB.Menu MAMng  
         Caption         =   "信息管理" 
      End 
   End 
   Begin VB.Menu mHelp  
      Caption         =   "帮助" 
      Begin VB.Menu mhReadme  
         Caption         =   "使用手册" 
      End 
      Begin VB.Menu mhAbout  
         Caption         =   "关于" 
      End 
   End 
End 
Attribute VB_Name = "MDIfrmMain" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Private Sub MAMng_Click() 
    frmAdmin.Show vbModal 
End Sub 
 
Private Sub mcCheck_Click() 
    If QPaper.Answered Then 
        frmCheck.Show vbModal 
    Else 
        MsgBox "考试尚未进行", vbCritical, "操作失败" 
    End If 
End Sub 
 
Private Sub mcLookThrough_Click() 
    If QPaper.Created Then 
      QPaper.ReportToFile "varFile.tmp" 
      frmReport.FileName = "varFile.tmp" 
      frmReport.Show vbModal 
      Kill "varFile.tmp" 
    Else 
      MsgBox "试卷还未创建", vbCritical, "错误" 
    End If 
End Sub 
 
Private Sub mcModify_Click() 
    If Not QPaper.Created Then 
        MsgBox "试卷还没有创建", vbCritical, "错误" 
        Exit Sub 
    End If 
    frmModifyPaper.Show vbModal 
End Sub 
 
Private Sub mcPaper_Click() 
    If QPaper.Created Then 
        MsgBox "试卷已经创建,请选择修改试卷", vbExclamation, "警告" 
        Exit Sub 
    End If 
    frmCreatePaper.Left = Me.Width / 2 - frmCreatePaper.Width / 2 
    frmCreatePaper.Top = Me.Height / 2 - frmCreatePaper.Height / 2 
    frmCreatePaper.Show 
End Sub 
 
Private Sub mcQuery_Click() 
    If Not QPaper.Checked Then 
        MsgBox "试卷还未评阅", vbCritical, "操作失败" 
    Else 
        frmResult.Show vbModal 
    End If 
End Sub 
 
Private Sub mcRefresh_Click() 
    frmTestLib.Show vbModal 
End Sub 
 
Private Sub mhAbout_Click() 
    frmSplash.Left = Me.Width / 2 - frmSplash.Width / 2 
    frmSplash.Top = Me.Height / 2 - frmSplash.Height / 2 
    frmSplash.Show vbModal 
End Sub 
 
Private Sub mhReadme_Click() 
    frmReport.CmdPrint.Visible = False 
    frmReport.FileName = "Readme.txt" 
    frmReport.Show vbModal 
End Sub 
 
Private Sub msBeginTest_Click() 
    If Not QPaper.Created Then 
        MsgBox "试卷还没有创建", vbExclamation, "操作无法完成" 
        Exit Sub 
    End If 
    If QPaper.Answered Then 
        MsgBox "试卷已经提交,请选择查询成绩", vbExclamation, "操作无法完成" 
        Exit Sub 
    End If 
    frmAnswer.Show 
End Sub 
 
Private Sub msQuery_Click() 
    If Not QPaper.Checked Then 
        MsgBox "试卷还未评阅", vbCritical, "操作失败" 
    Else 
        frmResult.Show vbModal 
    End If 
End Sub 
 
Private Sub mtExit_Click() 
    End 
End Sub 
 
Private Sub mtLogin_Click() 
    frmLogin.Show 1 
    If Not TestUser.LogFail Then 
        Me.Caption = "考试系统" 
        Me.mtLogin.Enabled = False 
        Me.mtLogout.Enabled = True 
        If TestUser.UserType = student Then 
        Me.mStudent.Visible = True 
        ElseIf TestUser.UserType = teacher Then 
        Me.mTeacher.Visible = True 
        ElseIf TestUser.UserType = administrator Then 
        Me.MAdmin.Visible = True 
        End If 
    End If 
End Sub 
 
Private Sub mtLogout_Click() 
    Me.mtLogin.Enabled = True 
    Me.mtLogout.Enabled = False 
    Me.mStudent.Visible = False 
    Me.mTeacher.Visible = False 
    TestUser.LogFail = True 
End Sub