📄 frmmain.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Xml;
namespace Student
{
using Aptech.Student.DataAccess;
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class frmMain : System.Windows.Forms.Form
{
private System.Windows.Forms.Panel pnlLeft;
private System.Windows.Forms.Panel pnlMain;
private System.Windows.Forms.Label lblClass;
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.MenuItem menuItem4;
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.ListView lstClass;
private System.Windows.Forms.Label lblCourse;
private System.Windows.Forms.ListView lstCourse;
private System.Windows.Forms.MenuItem menuItem5;
private System.Windows.Forms.StatusBar statusBar1;
private System.Windows.Forms.StatusBarPanel statusBarPanel1;
private System.Windows.Forms.StatusBarPanel statusBarPanel2;
private System.Windows.Forms.MenuItem menuItem7;
private System.Windows.Forms.MenuItem menuItem8;
private System.ComponentModel.IContainer components;
private int m_iCurrentRow = -1;
private System.Drawing.Printing.PrintDocument printDocument1;
private float m_fCurrentScore = -1;
public frmMain()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// 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.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmMain));
this.pnlLeft = new System.Windows.Forms.Panel();
this.lstCourse = new System.Windows.Forms.ListView();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.lblCourse = new System.Windows.Forms.Label();
this.lstClass = new System.Windows.Forms.ListView();
this.lblClass = new System.Windows.Forms.Label();
this.pnlMain = new System.Windows.Forms.Panel();
this.statusBar1 = new System.Windows.Forms.StatusBar();
this.statusBarPanel1 = new System.Windows.Forms.StatusBarPanel();
this.statusBarPanel2 = new System.Windows.Forms.StatusBarPanel();
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem5 = new System.Windows.Forms.MenuItem();
this.menuItem7 = new System.Windows.Forms.MenuItem();
this.menuItem8 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.menuItem4 = new System.Windows.Forms.MenuItem();
this.printDocument1 = new System.Drawing.Printing.PrintDocument();
this.pnlLeft.SuspendLayout();
this.pnlMain.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).BeginInit();
this.SuspendLayout();
//
// pnlLeft
//
this.pnlLeft.BackColor = System.Drawing.SystemColors.InactiveCaptionText;
this.pnlLeft.Controls.Add(this.lstCourse);
this.pnlLeft.Controls.Add(this.lblCourse);
this.pnlLeft.Controls.Add(this.lstClass);
this.pnlLeft.Controls.Add(this.lblClass);
this.pnlLeft.Dock = System.Windows.Forms.DockStyle.Left;
this.pnlLeft.Location = new System.Drawing.Point(0, 0);
this.pnlLeft.Name = "pnlLeft";
this.pnlLeft.Size = new System.Drawing.Size(160, 446);
this.pnlLeft.TabIndex = 0;
//
// lstCourse
//
this.lstCourse.BackColor = System.Drawing.SystemColors.Control;
this.lstCourse.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lstCourse.Dock = System.Windows.Forms.DockStyle.Fill;
this.lstCourse.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.lstCourse.LargeImageList = this.imageList1;
this.lstCourse.Location = new System.Drawing.Point(0, 278);
this.lstCourse.Name = "lstCourse";
this.lstCourse.Size = new System.Drawing.Size(160, 168);
this.lstCourse.SmallImageList = this.imageList1;
this.lstCourse.TabIndex = 5;
this.lstCourse.View = System.Windows.Forms.View.List;
this.lstCourse.DoubleClick += new System.EventHandler(this.lstCourse_DoubleClick);
this.lstCourse.SelectedIndexChanged += new System.EventHandler(this.lstCourse_SelectedIndexChanged);
//
// imageList1
//
this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth24Bit;
this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
//
// lblCourse
//
this.lblCourse.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.lblCourse.Dock = System.Windows.Forms.DockStyle.Top;
this.lblCourse.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.lblCourse.ForeColor = System.Drawing.SystemColors.ControlLightLight;
this.lblCourse.Location = new System.Drawing.Point(0, 255);
this.lblCourse.Name = "lblCourse";
this.lblCourse.Size = new System.Drawing.Size(160, 23);
this.lblCourse.TabIndex = 4;
this.lblCourse.Text = "课程信息";
this.lblCourse.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// lstClass
//
this.lstClass.BackColor = System.Drawing.SystemColors.Control;
this.lstClass.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lstClass.Dock = System.Windows.Forms.DockStyle.Top;
this.lstClass.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
this.lstClass.LargeImageList = this.imageList1;
this.lstClass.Location = new System.Drawing.Point(0, 22);
this.lstClass.Name = "lstClass";
this.lstClass.Size = new System.Drawing.Size(160, 233);
this.lstClass.SmallImageList = this.imageList1;
this.lstClass.TabIndex = 2;
this.lstClass.View = System.Windows.Forms.View.Details;
this.lstClass.Click += new System.EventHandler(this.lstClass_Click);
this.lstClass.DoubleClick += new System.EventHandler(this.lstClass_DoubleClick);
//
// lblClass
//
this.lblClass.BackColor = System.Drawing.SystemColors.Highlight;
this.lblClass.Dock = System.Windows.Forms.DockStyle.Top;
this.lblClass.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.lblClass.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
this.lblClass.Location = new System.Drawing.Point(0, 0);
this.lblClass.Name = "lblClass";
this.lblClass.Size = new System.Drawing.Size(160, 22);
this.lblClass.TabIndex = 0;
this.lblClass.Text = "班列表";
this.lblClass.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// pnlMain
//
this.pnlMain.BackColor = System.Drawing.SystemColors.Menu;
this.pnlMain.Controls.Add(this.statusBar1);
this.pnlMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlMain.Location = new System.Drawing.Point(160, 0);
this.pnlMain.Name = "pnlMain";
this.pnlMain.Size = new System.Drawing.Size(472, 446);
this.pnlMain.TabIndex = 1;
//
// statusBar1
//
this.statusBar1.Location = new System.Drawing.Point(0, 424);
this.statusBar1.Name = "statusBar1";
this.statusBar1.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
this.statusBarPanel1,
this.statusBarPanel2});
this.statusBar1.Size = new System.Drawing.Size(472, 22);
this.statusBar1.TabIndex = 8;
//
// statusBarPanel1
//
this.statusBarPanel1.Text = "statusBarPanel1";
//
// statusBarPanel2
//
this.statusBarPanel2.Text = "statusBarPanel2";
//
// mainMenu1
//
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1,
this.menuItem3,
this.menuItem4});
this.mainMenu1.RightToLeft = System.Windows.Forms.RightToLeft.No;
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem5,
this.menuItem7,
this.menuItem8,
this.menuItem2});
this.menuItem1.Text = "文件";
//
// menuItem5
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -