📄 mainfrm.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace 教师签到系统
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class MainFrm : System.Windows.Forms.Form
{
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public MainFrm()
{
//
// 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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MainFrm));
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.button1 = new System.Windows.Forms.Button();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.tabPage2.SuspendLayout();
this.SuspendLayout();
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Location = new System.Drawing.Point(32, 40);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(272, 264);
this.tabControl1.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("tabPage1.BackgroundImage")));
this.tabPage1.Controls.Add(this.button1);
this.tabPage1.Location = new System.Drawing.Point(4, 21);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Size = new System.Drawing.Size(264, 239);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "教师签到签离";
//
// button1
//
this.button1.Image = ((System.Drawing.Image)(resources.GetObject("button1.Image")));
this.button1.Location = new System.Drawing.Point(8, 56);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(72, 64);
this.button1.TabIndex = 0;
this.button1.Text = "教师签到签离";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// tabPage2
//
this.tabPage2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("tabPage2.BackgroundImage")));
this.tabPage2.Controls.Add(this.button3);
this.tabPage2.Location = new System.Drawing.Point(4, 21);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(264, 239);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "教师信息管理";
//
// button3
//
this.button3.Image = ((System.Drawing.Image)(resources.GetObject("button3.Image")));
this.button3.Location = new System.Drawing.Point(24, 40);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(72, 56);
this.button3.TabIndex = 0;
this.button3.Text = "教师信息管理";
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
this.button4.Image = ((System.Drawing.Image)(resources.GetObject("button4.Image")));
this.button4.Location = new System.Drawing.Point(520, 416);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(80, 48);
this.button4.TabIndex = 1;
this.button4.Text = "退出";
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// MainFrm
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.AutoScroll = true;
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.ClientSize = new System.Drawing.Size(632, 486);
this.Controls.Add(this.button4);
this.Controls.Add(this.tabControl1);
this.HelpButton = true;
this.Name = "MainFrm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "教师签到系统";
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new MainFrm());
}
private void button1_Click(object sender, System.EventArgs e)
{
CheckInOutfrm frm1 = new CheckInOutfrm();
frm1.ShowDialog();
}
private void button4_Click(object sender, System.EventArgs e)
{
this.Close();
}
private void button3_Click(object sender, System.EventArgs e)
{
LoginFrm frm2 = new LoginFrm();
frm2.ShowDialog();
if(LoginFrm.blCanLogin == true)
{
TeacherMessageFrm frm3 = new TeacherMessageFrm();
frm3.ShowDialog();
LoginFrm.blCanLogin = false;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -