📄 frmexamresult.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing.Printing ;
using System.Data;
using System.Data.OleDb;
namespace OES
{
/// <summary>
/// Summary description for frmResult.
/// </summary>
public class frmExamResult : System.Windows.Forms.Form
{
private System.Windows.Forms.Label lblName;
private System.Windows.Forms.Label lblExamName;
private System.Windows.Forms.Button btnPrint;
private System.Windows.Forms.Button btnExit;
private System.Windows.Forms.Label lblExamResult;
private System.Windows.Forms.Label lblPassingScore;
private System.Windows.Forms.Label lblScoreSecured;
private System.Windows.Forms.Label lblNameVal;
private System.Windows.Forms.Label lblExamNameVal;
private System.Windows.Forms.Label lblPassingScoreVal;
private System.Windows.Forms.Label lblScoreSecuredVal;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private static DataTable dtUserId;
private static DataTable dtExamTable;
private static User objUser;
private System.Drawing.Printing.PrintDocument pdocPrint;
private System.Windows.Forms.PrintDialog pdlgPrint;
private static Exam objExam;
private System.Windows.Forms.Label lblScore;
private System.Windows.Forms.Label lblPass;
private int score,intResult;
private System.Windows.Forms.Label lblResult;
public frmExamResult(int score,int intResult)
{
this.score=score;
this.intResult=intResult;
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmExamResult));
this.lblName = new System.Windows.Forms.Label();
this.lblExamResult = new System.Windows.Forms.Label();
this.lblExamName = new System.Windows.Forms.Label();
this.lblPassingScore = new System.Windows.Forms.Label();
this.lblScoreSecured = new System.Windows.Forms.Label();
this.btnPrint = new System.Windows.Forms.Button();
this.btnExit = new System.Windows.Forms.Button();
this.lblNameVal = new System.Windows.Forms.Label();
this.lblExamNameVal = new System.Windows.Forms.Label();
this.lblPassingScoreVal = new System.Windows.Forms.Label();
this.lblScoreSecuredVal = new System.Windows.Forms.Label();
this.pdocPrint = new System.Drawing.Printing.PrintDocument();
this.pdlgPrint = new System.Windows.Forms.PrintDialog();
this.lblResult = new System.Windows.Forms.Label();
this.lblScore = new System.Windows.Forms.Label();
this.lblPass = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// lblName
//
this.lblName.AutoSize = true;
this.lblName.BackColor = System.Drawing.Color.Transparent;
this.lblName.Font = new System.Drawing.Font("Century Gothic", 9F);
this.lblName.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.lblName.Location = new System.Drawing.Point(240, 128);
this.lblName.Name = "lblName";
this.lblName.Size = new System.Drawing.Size(59, 18);
this.lblName.TabIndex = 0;
this.lblName.Text = "学生姓名";
//
// lblExamResult
//
this.lblExamResult.AutoSize = true;
this.lblExamResult.BackColor = System.Drawing.Color.Transparent;
this.lblExamResult.Font = new System.Drawing.Font("Century Gothic", 21.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.lblExamResult.ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(255)));
this.lblExamResult.Location = new System.Drawing.Point(231, 32);
this.lblExamResult.Name = "lblExamResult";
this.lblExamResult.Size = new System.Drawing.Size(191, 39);
this.lblExamResult.TabIndex = 22;
this.lblExamResult.Text = "考 试 结 果";
//
// lblExamName
//
this.lblExamName.AutoSize = true;
this.lblExamName.BackColor = System.Drawing.Color.Transparent;
this.lblExamName.Font = new System.Drawing.Font("Century Gothic", 9F);
this.lblExamName.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.lblExamName.Location = new System.Drawing.Point(240, 168);
this.lblExamName.Name = "lblExamName";
this.lblExamName.Size = new System.Drawing.Size(59, 18);
this.lblExamName.TabIndex = 23;
this.lblExamName.Text = "考试名称";
//
// lblPassingScore
//
this.lblPassingScore.AutoSize = true;
this.lblPassingScore.BackColor = System.Drawing.Color.Transparent;
this.lblPassingScore.Font = new System.Drawing.Font("Century Gothic", 9F);
this.lblPassingScore.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.lblPassingScore.Location = new System.Drawing.Point(240, 208);
this.lblPassingScore.Name = "lblPassingScore";
this.lblPassingScore.Size = new System.Drawing.Size(59, 18);
this.lblPassingScore.TabIndex = 24;
this.lblPassingScore.Text = "及格分数";
//
// lblScoreSecured
//
this.lblScoreSecured.AutoSize = true;
this.lblScoreSecured.BackColor = System.Drawing.Color.Transparent;
this.lblScoreSecured.Font = new System.Drawing.Font("Century Gothic", 9F);
this.lblScoreSecured.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.lblScoreSecured.Location = new System.Drawing.Point(240, 248);
this.lblScoreSecured.Name = "lblScoreSecured";
this.lblScoreSecured.Size = new System.Drawing.Size(72, 18);
this.lblScoreSecured.TabIndex = 25;
this.lblScoreSecured.Text = "正确答题数";
this.lblScoreSecured.Click += new System.EventHandler(this.lblScoreSecured_Click);
//
// btnPrint
//
this.btnPrint.BackColor = System.Drawing.Color.Transparent;
this.btnPrint.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnPrint.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnPrint.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.btnPrint.Location = new System.Drawing.Point(232, 384);
this.btnPrint.Name = "btnPrint";
this.btnPrint.Size = new System.Drawing.Size(80, 24);
this.btnPrint.TabIndex = 30;
this.btnPrint.Text = "打印(&P)";
this.btnPrint.Click += new System.EventHandler(this.btnPrint_Click);
//
// btnExit
//
this.btnExit.BackColor = System.Drawing.Color.Transparent;
this.btnExit.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnExit.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnExit.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.btnExit.Location = new System.Drawing.Point(384, 384);
this.btnExit.Name = "btnExit";
this.btnExit.Size = new System.Drawing.Size(80, 24);
this.btnExit.TabIndex = 31;
this.btnExit.Text = "退出(&E)";
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
//
// lblNameVal
//
this.lblNameVal.AutoSize = true;
this.lblNameVal.BackColor = System.Drawing.Color.Transparent;
this.lblNameVal.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.lblNameVal.Font = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.lblNameVal.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.lblNameVal.Location = new System.Drawing.Point(408, 128);
this.lblNameVal.Name = "lblNameVal";
this.lblNameVal.Size = new System.Drawing.Size(74, 19);
this.lblNameVal.TabIndex = 0;
this.lblNameVal.Text = "John Smith";
//
// lblExamNameVal
//
this.lblExamNameVal.AutoSize = true;
this.lblExamNameVal.BackColor = System.Drawing.Color.Transparent;
this.lblExamNameVal.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.lblExamNameVal.Font = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.lblExamNameVal.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.lblExamNameVal.Location = new System.Drawing.Point(408, 168);
this.lblExamNameVal.Name = "lblExamNameVal";
this.lblExamNameVal.Size = new System.Drawing.Size(34, 19);
this.lblExamNameVal.TabIndex = 32;
this.lblExamNameVal.Text = "数学";
//
// lblPassingScoreVal
//
this.lblPassingScoreVal.AutoSize = true;
this.lblPassingScoreVal.BackColor = System.Drawing.Color.Transparent;
this.lblPassingScoreVal.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.lblPassingScoreVal.Font = new System.Drawing.Font("Century Gothic", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -