📄 frmexamtype.cs
字号:
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(42, 16);
this.label12.TabIndex = 41;
this.label12.Text = "时间";
//
// nupTime
//
this.nupTime.Location = new System.Drawing.Point(252, 30);
this.nupTime.Maximum = new System.Decimal(new int[] {
300,
0,
0,
0});
this.nupTime.Minimum = new System.Decimal(new int[] {
30,
0,
0,
0});
this.nupTime.Name = "nupTime";
this.nupTime.Size = new System.Drawing.Size(50, 21);
this.nupTime.TabIndex = 42;
this.nupTime.Value = new System.Decimal(new int[] {
30,
0,
0,
0});
//
// groupBox1
//
this.groupBox1.Controls.Add(this.labHardLevel);
this.groupBox1.Controls.Add(this.nupLevel5);
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.nupLevel4);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.nupLevel3);
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.nupLevel2);
this.groupBox1.Controls.Add(this.label10);
this.groupBox1.Controls.Add(this.nupLevel1);
this.groupBox1.Controls.Add(this.label11);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.groupBox1.Location = new System.Drawing.Point(3, 81);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(376, 160);
this.groupBox1.TabIndex = 44;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "题目数";
//
// labHardLevel
//
this.labHardLevel.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.labHardLevel.Location = new System.Drawing.Point(128, 24);
this.labHardLevel.Name = "labHardLevel";
this.labHardLevel.Size = new System.Drawing.Size(194, 122);
this.labHardLevel.TabIndex = 10;
this.labHardLevel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// nupLevel5
//
this.nupLevel5.Location = new System.Drawing.Point(60, 126);
this.nupLevel5.Name = "nupLevel5";
this.nupLevel5.Size = new System.Drawing.Size(42, 21);
this.nupLevel5.TabIndex = 9;
//
// label8
//
this.label8.Location = new System.Drawing.Point(16, 130);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(44, 16);
this.label8.TabIndex = 8;
this.label8.Text = "难度5:";
//
// nupLevel4
//
this.nupLevel4.Location = new System.Drawing.Point(60, 98);
this.nupLevel4.Name = "nupLevel4";
this.nupLevel4.Size = new System.Drawing.Size(42, 21);
this.nupLevel4.TabIndex = 7;
//
// label6
//
this.label6.Location = new System.Drawing.Point(18, 102);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(44, 16);
this.label6.TabIndex = 6;
this.label6.Text = "难度4:";
//
// nupLevel3
//
this.nupLevel3.Location = new System.Drawing.Point(60, 74);
this.nupLevel3.Name = "nupLevel3";
this.nupLevel3.Size = new System.Drawing.Size(42, 21);
this.nupLevel3.TabIndex = 5;
//
// label7
//
this.label7.Location = new System.Drawing.Point(18, 78);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(44, 16);
this.label7.TabIndex = 4;
this.label7.Text = "难度3:";
//
// nupLevel2
//
this.nupLevel2.Location = new System.Drawing.Point(60, 48);
this.nupLevel2.Name = "nupLevel2";
this.nupLevel2.Size = new System.Drawing.Size(42, 21);
this.nupLevel2.TabIndex = 3;
//
// label10
//
this.label10.Location = new System.Drawing.Point(18, 52);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(44, 16);
this.label10.TabIndex = 2;
this.label10.Text = "难度2:";
//
// nupLevel1
//
this.nupLevel1.Location = new System.Drawing.Point(60, 24);
this.nupLevel1.Name = "nupLevel1";
this.nupLevel1.Size = new System.Drawing.Size(42, 21);
this.nupLevel1.TabIndex = 1;
//
// label11
//
this.label11.Location = new System.Drawing.Point(18, 28);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(44, 16);
this.label11.TabIndex = 0;
this.label11.Text = "难度1:";
//
// cmbName
//
this.cmbName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbName.ItemHeight = 12;
this.cmbName.Location = new System.Drawing.Point(162, 10);
this.cmbName.Name = "cmbName";
this.cmbName.Size = new System.Drawing.Size(114, 20);
this.cmbName.TabIndex = 39;
this.cmbName.SelectedIndexChanged += new System.EventHandler(this.cmbName_SelectedIndexChanged);
//
// label1
//
this.label1.Location = new System.Drawing.Point(106, 14);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 16);
this.label1.TabIndex = 38;
this.label1.Text = "考试名:";
//
// cmbCate
//
this.cmbCate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCate.Location = new System.Drawing.Point(76, 34);
this.cmbCate.Name = "cmbCate";
this.cmbCate.Size = new System.Drawing.Size(114, 20);
this.cmbCate.TabIndex = 46;
//
// label3
//
this.label3.Location = new System.Drawing.Point(14, 36);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(60, 16);
this.label3.TabIndex = 45;
this.label3.Text = "考试科目";
//
// FrmExamType
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(382, 345);
this.Controls.Add(this.gpExam);
this.Controls.Add(this.panel1);
this.Controls.Add(this.btnStart);
this.Controls.Add(this.btnCancel);
this.Name = "FrmExamType";
this.Text = "选择考试类型";
this.Load += new System.EventHandler(this.FrmExamType_Load);
this.panel1.ResumeLayout(false);
this.gpExam.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.nupTime)).EndInit();
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.nupLevel5)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nupLevel4)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nupLevel3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nupLevel2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nupLevel1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private void FrmExamType_Load(object sender, System.EventArgs e)
{
fillCate();
fillExam();
fillArr();
}
private void cmbName_SelectedIndexChanged(object sender, System.EventArgs e)
{
if(cmbName.SelectedIndex>0)
{
gpExam.Enabled=false;
DataRow dr=dsExam.Tables[0].Rows[cmbName.SelectedIndex];
//cmbCate.SelectedItem=int.Parse(dr["ExamCate"].ToString());
cmbCate.SelectedValue=dr["ExamCate"];
nupTime.Value=Convert.ToDecimal(dr["ExamTime"]);
string[] levels=dr["ExamTitles"].ToString().Split(new char[]{','});
for(int i=0;i<nums.Length;i++)
{
nums[i].Value=Convert.ToDecimal(levels[i]);
}
displayExamInfo();
}
else
{
gpExam.Enabled=true;
}
}
private void btnStart_Click(object sender, System.EventArgs e)
{
curExam=new Exam();
curExam.ExamID=(int)cmbName.SelectedValue;
curExam.ExamName=cmbName.Text;
curExam.ExamTitles=this.getTitles();
curExam.ExamTime=(int)nupTime.Value;
curExam.ExamClass=CommVal.CurrentStu.StuClass;
curExam.ExamCate=(int)cmbCate.SelectedValue;
this.DialogResult=DialogResult.OK;
}
private void nupLevel1_ValueChanged(object sender, System.EventArgs e)
{
displayExamInfo();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -