📄 form5.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace recommendation
{
/// <summary>
/// Form5 的摘要说明。
/// </summary>
public class Form5 : System.Windows.Forms.Form
{
private System.Windows.Forms.ListView explain;
private System.Data.OleDb.OleDbConnection oleDbConnection1;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public Form5(bool ifchecked,string spxbili,string szybili)
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//初始化解释界面
this.explain.Items.Clear();
string hh0,hh1,hh2,hh3,mm,rr;
mm="一、凡是或得重大发明奖者,无论其成绩如何,均会获得推荐;";
this.explain.Items.Insert(0,mm);
hh0="二、本次规定的评选规则: ";
this.explain.Items.Insert(1,hh0);
hh1= " a.评选比例为:"+spxbili +"(有成绩相同的一并选出)";
this.explain.Items.Insert(2,hh1);
hh2= " b.专业成绩所占比例为:"+szybili+",专业成绩计算为各科成绩与权值的乘积之和除以总的权值分数";
this.explain.Items.Insert(3,hh2);
if( ifchecked )
{
hh3=" c.要求必须过六级";
}
else hh3=" c . 不要求必须过六级";
this.explain.Items.Insert(4,hh3);
rr="三、各行为积分项目加分情况如下:";
this.explain.Items.Insert(5,rr);
try
{
System.Data.OleDb.OleDbCommand exsel=new System.Data.OleDb.OleDbCommand("select actionname,actionscore from actionitem",this.oleDbConnection1);
this.oleDbConnection1.Open();
System.Data.OleDb.OleDbDataReader rd=exsel.ExecuteReader();
int i=6;
string exp="";
while(rd.Read())
{
exp=" "+rd.GetString(0)+",加分:"+rd.GetInt32(1).ToString();
this.explain.Items.Insert(i,exp);
i++;
}
this.oleDbConnection1.Close();
}
catch(Exception ee)
{
this.oleDbConnection1.Close();
MessageBox.Show(ee.Message);
return;
}
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.explain = new System.Windows.Forms.ListView();
this.oleDbConnection1 = new System.Data.OleDb.OleDbConnection();
this.SuspendLayout();
//
// explain
//
this.explain.BackColor = System.Drawing.Color.Silver;
this.explain.Dock = System.Windows.Forms.DockStyle.Fill;
this.explain.Location = new System.Drawing.Point(0, 0);
this.explain.Name = "explain";
this.explain.Size = new System.Drawing.Size(496, 205);
this.explain.TabIndex = 0;
this.explain.View = System.Windows.Forms.View.List;
this.explain.SelectedIndexChanged += new System.EventHandler(this.explain_SelectedIndexChanged);
//
// oleDbConnection1
//
this.oleDbConnection1.ConnectionString = @"Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking Mode=1;Jet OLEDB:Database Password=;Data Source=""recommendation.mdb"";Password=;Jet OLEDB:Engine Type=5;Jet OLEDB:Global Bulk Transactions=1;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet OLEDB:SFP=False;Extended Properties=;Mode=Share Deny None;Jet OLEDB:New Database Password=;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User ID=Admin;Jet OLEDB:Encrypt Database=False";
//
// Form5
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(496, 205);
this.Controls.Add(this.explain);
this.Name = "Form5";
this.Text = "本次评比规则介绍如下:";
this.Load += new System.EventHandler(this.Form5_Load);
this.ResumeLayout(false);
}
#endregion
private void explain_SelectedIndexChanged(object sender, System.EventArgs e)
{
}
private void Form5_Load(object sender, System.EventArgs e)
{
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -