📄 f1欢迎.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace TSC
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
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.MenuItem menuItem5;
private System.Windows.Forms.MenuItem menuItem6;
private System.Windows.Forms.MenuItem menuItem7;
private System.Windows.Forms.MenuItem menuItem8;
private System.Windows.Forms.MenuItem menuItem9;
private System.Windows.Forms.MenuItem menuItem10;
private System.Windows.Forms.MenuItem menuItem11;
private System.Windows.Forms.MenuItem menuItem12;
private System.Windows.Forms.MenuItem menuItem13;
private System.Windows.Forms.MenuItem menuItem14;
private System.Windows.Forms.MenuItem menuItem15;
private System.Windows.Forms.MenuItem menuItem16;
private System.Windows.Forms.MenuItem menuItem17;
private System.Windows.Forms.MenuItem menuItem18;
private System.Windows.Forms.MenuItem menuItem19;
private System.Windows.Forms.MenuItem menuItem20;
private System.Windows.Forms.MenuItem menuItem21;
private System.Windows.Forms.MenuItem menuItem22;
private System.Windows.Forms.MenuItem menuItem23;
private System.Windows.Forms.MenuItem menuItem24;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public Form1()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItem1 = 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.menuItem5 = new System.Windows.Forms.MenuItem();
this.menuItem6 = new System.Windows.Forms.MenuItem();
this.menuItem7 = new System.Windows.Forms.MenuItem();
this.menuItem8 = new System.Windows.Forms.MenuItem();
this.menuItem9 = new System.Windows.Forms.MenuItem();
this.menuItem10 = new System.Windows.Forms.MenuItem();
this.menuItem11 = new System.Windows.Forms.MenuItem();
this.menuItem12 = new System.Windows.Forms.MenuItem();
this.menuItem13 = new System.Windows.Forms.MenuItem();
this.menuItem14 = new System.Windows.Forms.MenuItem();
this.menuItem15 = new System.Windows.Forms.MenuItem();
this.menuItem16 = new System.Windows.Forms.MenuItem();
this.menuItem17 = new System.Windows.Forms.MenuItem();
this.menuItem18 = new System.Windows.Forms.MenuItem();
this.menuItem19 = new System.Windows.Forms.MenuItem();
this.menuItem20 = new System.Windows.Forms.MenuItem();
this.menuItem21 = new System.Windows.Forms.MenuItem();
this.menuItem22 = new System.Windows.Forms.MenuItem();
this.menuItem23 = new System.Windows.Forms.MenuItem();
this.menuItem24 = new System.Windows.Forms.MenuItem();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// mainMenu1
//
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1,
this.menuItem5,
this.menuItem9,
this.menuItem14,
this.menuItem17,
this.menuItem22,
this.menuItem23,
this.menuItem24});
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem2,
this.menuItem3,
this.menuItem4});
this.menuItem1.Text = "输入";
//
// menuItem2
//
this.menuItem2.Index = 0;
this.menuItem2.Text = "教师表";
this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
//
// menuItem3
//
this.menuItem3.Index = 1;
this.menuItem3.Text = "学生表";
this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click);
//
// menuItem4
//
this.menuItem4.Index = 2;
this.menuItem4.Text = "课程表";
this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click);
//
// menuItem5
//
this.menuItem5.Index = 1;
this.menuItem5.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem6,
this.menuItem7,
this.menuItem8});
this.menuItem5.Text = "修改";
//
// menuItem6
//
this.menuItem6.Index = 0;
this.menuItem6.Text = "教师表";
this.menuItem6.Click += new System.EventHandler(this.menuItem6_Click);
//
// menuItem7
//
this.menuItem7.Index = 1;
this.menuItem7.Text = "学生表";
this.menuItem7.Click += new System.EventHandler(this.menuItem7_Click);
//
// menuItem8
//
this.menuItem8.Index = 2;
this.menuItem8.Text = "课程表";
this.menuItem8.Click += new System.EventHandler(this.menuItem8_Click);
//
// menuItem9
//
this.menuItem9.Index = 2;
this.menuItem9.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem10,
this.menuItem11,
this.menuItem12,
this.menuItem13});
this.menuItem9.Text = "查询";
//
// menuItem10
//
this.menuItem10.Index = 0;
this.menuItem10.Text = "教师信息";
this.menuItem10.Click += new System.EventHandler(this.menuItem10_Click);
//
// menuItem11
//
this.menuItem11.Index = 1;
this.menuItem11.Text = "学生信息";
this.menuItem11.Click += new System.EventHandler(this.menuItem11_Click);
//
// menuItem12
//
this.menuItem12.Index = 2;
this.menuItem12.Text = "课程信息";
this.menuItem12.Click += new System.EventHandler(this.menuItem12_Click);
//
// menuItem13
//
this.menuItem13.Index = 3;
this.menuItem13.Text = "综合信息";
this.menuItem13.Click += new System.EventHandler(this.menuItem13_Click);
//
// menuItem14
//
this.menuItem14.Index = 3;
this.menuItem14.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem15,
this.menuItem16});
this.menuItem14.Text = "计算";
//
// menuItem15
//
this.menuItem15.Index = 0;
this.menuItem15.Text = "平均年龄";
this.menuItem15.Click += new System.EventHandler(this.menuItem15_Click);
//
// menuItem16
//
this.menuItem16.Index = 1;
this.menuItem16.Text = "学生成绩";
this.menuItem16.Click += new System.EventHandler(this.menuItem16_Click);
//
// menuItem17
//
this.menuItem17.Index = 4;
this.menuItem17.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem18,
this.menuItem19,
this.menuItem20,
this.menuItem21});
this.menuItem17.Text = "输出";
//
// menuItem18
//
this.menuItem18.Index = 0;
this.menuItem18.Text = "教师表";
this.menuItem18.Click += new System.EventHandler(this.menuItem18_Click);
//
// menuItem19
//
this.menuItem19.Index = 1;
this.menuItem19.Text = "学生表";
this.menuItem19.Click += new System.EventHandler(this.menuItem19_Click);
//
// menuItem20
//
this.menuItem20.Index = 2;
this.menuItem20.Text = "课程表";
this.menuItem20.Click += new System.EventHandler(this.menuItem20_Click);
//
// menuItem21
//
this.menuItem21.Index = 3;
this.menuItem21.Text = "综合表";
this.menuItem21.Click += new System.EventHandler(this.menuItem21_Click);
//
// menuItem22
//
this.menuItem22.Index = 5;
this.menuItem22.Text = "帮助";
this.menuItem22.Click += new System.EventHandler(this.menuItem22_Click);
//
// menuItem23
//
this.menuItem23.Index = 6;
this.menuItem23.Text = "版本信息";
this.menuItem23.Click += new System.EventHandler(this.menuItem23_Click);
//
// menuItem24
//
this.menuItem24.Index = 7;
this.menuItem24.Text = "退出";
this.menuItem24.Click += new System.EventHandler(this.menuItem24_Click);
//
// label1
//
this.label1.Font = new System.Drawing.Font("宋体", 26.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label1.Location = new System.Drawing.Point(16, 48);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(160, 40);
this.label1.TabIndex = 1;
this.label1.Text = "欢迎使用";
//
// label2
//
this.label2.Font = new System.Drawing.Font("幼圆", 42F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label2.Location = new System.Drawing.Point(160, 136);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(368, 64);
this.label2.TabIndex = 2;
this.label2.Text = "教学管理系统";
//
// label3
//
this.label3.Font = new System.Drawing.Font("宋体", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label3.Location = new System.Drawing.Point(368, 304);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(304, 32);
this.label3.TabIndex = 3;
this.label3.Text = "----请选择菜单栏做相应的操作";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(742, 473);
this.Controls.AddRange(new System.Windows.Forms.Control[] {
this.label3,
this.label2,
this.label1});
this.MaximizeBox = false;
this.Menu = this.mainMenu1;
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "欢迎";
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new Form1());
}
private void menuItem24_Click(object sender, System.EventArgs e)
{
Application.Exit();
}
private void menuItem23_Click(object sender, System.EventArgs e)
{
MessageBox.Show(" 数据库课程设计\r -------教学管理系统\r\r小组成员:金铎,汪欣,齐肖西,李莎,王丽芳");
}
private void menuItem22_Click(object sender, System.EventArgs e)
{
MessageBox.Show("暂无帮助信息!");
}
private void menuItem2_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form2=new Form2();
form2.ShowDialog ();
}
private void menuItem3_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form3=new Form3();
form3.ShowDialog ();
}
private void menuItem4_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form4=new Form4();
form4.ShowDialog ();
}
private void menuItem6_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form5=new Form5();
form5.ShowDialog ();
}
private void menuItem7_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form6=new Form6();
form6.ShowDialog ();
}
private void menuItem8_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form7=new Form7();
form7.ShowDialog ();
}
private void menuItem10_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form8=new Form8();
form8.ShowDialog ();
}
private void menuItem11_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form9=new Form9();
form9.ShowDialog ();
}
private void menuItem12_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form10=new Form10();
form10.ShowDialog ();
}
private void menuItem13_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form11=new Form11();
form11.ShowDialog ();
}
private void menuItem15_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form12=new Form12();
form12.ShowDialog ();
}
private void menuItem16_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form13=new Form13();
form13.ShowDialog ();
}
private void menuItem18_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form14=new Form14();
form14.ShowDialog ();
}
private void menuItem19_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form15=new Form15();
form15.ShowDialog ();
}
private void menuItem20_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form16=new Form16();
form16.ShowDialog ();
}
private void menuItem21_Click(object sender, System.EventArgs e)
{
this.Hide();
Form form17=new Form17();
form17.ShowDialog ();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -