📄 frmrules.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace OES
{
/// <summary>
/// Summary description for frmRules.
/// </summary>
public class frmRules : System.Windows.Forms.Form
{
private System.Windows.Forms.RichTextBox rtbRules;
private System.Windows.Forms.Label lblHeading;
private System.Windows.Forms.Button btnAccept;
private System.Windows.Forms.Button btnDecline;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
private string strStudentName;
public frmRules()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
public frmRules(string strStuName)
{
this.strStudentName =strStuName;
//
// 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(frmRules));
this.rtbRules = new System.Windows.Forms.RichTextBox();
this.btnAccept = new System.Windows.Forms.Button();
this.lblHeading = new System.Windows.Forms.Label();
this.btnDecline = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// rtbRules
//
this.rtbRules.AutoSize = true;
this.rtbRules.BackColor = System.Drawing.SystemColors.Info;
this.rtbRules.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.rtbRules.Font = new System.Drawing.Font("Century Gothic", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.rtbRules.ForeColor = System.Drawing.Color.Brown;
this.rtbRules.Location = new System.Drawing.Point(96, 103);
this.rtbRules.Name = "rtbRules";
this.rtbRules.ReadOnly = true;
this.rtbRules.ScrollBars = System.Windows.Forms.RichTextBoxScrollBars.ForcedBoth;
this.rtbRules.Size = new System.Drawing.Size(634, 207);
this.rtbRules.TabIndex = 11;
this.rtbRules.Text = "1.\t制度 1\n2.\t制度 2\n3. \t制度 3\n\t...................\n\n\t...................\n\n\t..........." +
"........";
this.rtbRules.WordWrap = false;
//
// btnAccept
//
this.btnAccept.BackColor = System.Drawing.Color.Transparent;
this.btnAccept.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnAccept.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnAccept.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.btnAccept.Location = new System.Drawing.Point(288, 353);
this.btnAccept.Name = "btnAccept";
this.btnAccept.Size = new System.Drawing.Size(96, 26);
this.btnAccept.TabIndex = 1;
this.btnAccept.Text = "接受(&A)";
this.btnAccept.Click += new System.EventHandler(this.btnAccept_Click);
//
// lblHeading
//
this.lblHeading.AutoSize = true;
this.lblHeading.BackColor = System.Drawing.Color.Transparent;
this.lblHeading.Font = new System.Drawing.Font("Century Gothic", 21.75F);
this.lblHeading.ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(192)), ((System.Byte)(192)), ((System.Byte)(255)));
this.lblHeading.Location = new System.Drawing.Point(296, 24);
this.lblHeading.Name = "lblHeading";
this.lblHeading.Size = new System.Drawing.Size(191, 39);
this.lblHeading.TabIndex = 14;
this.lblHeading.Text = "规 章 制 度";
//
// btnDecline
//
this.btnDecline.BackColor = System.Drawing.Color.Transparent;
this.btnDecline.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.btnDecline.Font = new System.Drawing.Font("Verdana", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.btnDecline.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.btnDecline.Location = new System.Drawing.Point(442, 353);
this.btnDecline.Name = "btnDecline";
this.btnDecline.Size = new System.Drawing.Size(96, 26);
this.btnDecline.TabIndex = 15;
this.btnDecline.Text = "拒绝(&D)";
this.btnDecline.Click += new System.EventHandler(this.btnDecline_Click);
//
// frmRules
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.ClientSize = new System.Drawing.Size(783, 520);
this.ControlBox = false;
this.Controls.Add(this.btnDecline);
this.Controls.Add(this.lblHeading);
this.Controls.Add(this.btnAccept);
this.Controls.Add(this.rtbRules);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Location = new System.Drawing.Point(146, 115);
this.Name = "frmRules";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "frmRules";
this.TopMost = true;
this.Load += new System.EventHandler(this.frmRules_Load);
this.ResumeLayout(false);
}
#endregion
private void btnAccept_Click(object sender, System.EventArgs e)
{
frmExamScreen examScreen = new frmExamScreen();//this.strStudentName);
//close this exam rule form
this.Close();//modify by dong ping 2004-12-26
examScreen.ShowDialog();
}
private void btnDecline_Click(object sender, System.EventArgs e)
{
frmExamSchedule.declinedflag = true;
this.Close();
}
private void frmRules_Load(object sender, System.EventArgs e)
{
//
string str= " 1. 所有试题都带等号。";
str += " \n 2. 没有负分模式。";
str +=" \n 3. 右上角的计时器显示完成考试的剩余时间。";
str +=" \n 4. “上一个”按钮有助于转至上一道试题。";
str +="\n 5. “下一个”按钮有助于转至下一道试题。";
str +="\n 6. “提交”按钮将完成测试并显示结果。";
str +="\n 7. “重设”按钮有助于重设所有答案,但计时器保持不变。";
str +="\n 8. “选择试题”有助于定位至选定试题。";
str +="\n 9. “帮助”按钮显示帮助。";
str +="\n 10. 如果发现误操作,将执行相应操作。";
this.rtbRules.Text=str;
this.btnAccept.Focus();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -