📄 form1.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Diagnostics;
namespace 图书馆信息管理系统
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.ContextMenu contextMenu1;
private System.Windows.Forms.MenuItem menuItemdzcx;
private System.Windows.Forms.MenuItem menuItemdzzc;
private System.Windows.Forms.MenuItem menuItemdzzx;
private System.Windows.Forms.MenuItem menuItemsmcx;
private System.Windows.Forms.MenuItem menuItemtjts;
private System.Windows.Forms.MenuItem menuItemscts;
private System.Windows.Forms.MenuItem menuItemjsgl;
private System.Windows.Forms.MenuItem menuItemhsgl;
private System.Windows.Forms.MenuItem menuItemcxyg;
private System.Windows.Forms.MenuItem menuItemzjyg;
private System.Windows.Forms.MenuItem menuItemscyg;
private System.Windows.Forms.MenuItem menuItemsdxt;
private System.Windows.Forms.MenuItem menuItemsysm;
private System.Windows.Forms.MenuItem menuItemgyxt;
private System.Windows.Forms.MenuItem menuItemjs;
private System.Windows.Forms.MenuItem menuItemhs;
private System.Windows.Forms.MenuItem menuItemsd;
private System.Windows.Forms.MenuItem menuItemtc;
private System.Windows.Forms.MenuItem menuItemdzgl;
private System.Windows.Forms.MenuItem menuItemtsgl;
private System.Windows.Forms.MenuItem menuItemjshs;
private System.Windows.Forms.MenuItem menuItemyggl;
private System.Windows.Forms.MenuItem menuItembz;
private System.Windows.Forms.MenuItem menuItemaq;
private System.Windows.Forms.MenuItem menuItemxxxg;
private System.Windows.Forms.MenuItem menuItemjlxg;
private System.Windows.Forms.MenuItem menuItemzlxg;
private System.Windows.Forms.MenuItem menuItemmmxg;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.ToolBar toolBar1;
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.ToolBarButton toolBarButton1;
private System.Windows.Forms.ToolBarButton toolBarButton2;
private System.Windows.Forms.ToolBarButton toolBarButton3;
private System.Windows.Forms.ToolBarButton toolBarButton4;
private System.Windows.Forms.ToolBarButton toolBarButton5;
private System.Windows.Forms.ToolBarButton toolBarButton6;
private System.Windows.Forms.ToolBarButton toolBarButton7;
private System.Windows.Forms.ToolBarButton toolBarButton8;
private System.Windows.Forms.ToolBarButton toolBarButton9;
private System.Windows.Forms.ToolBarButton toolBarButton10;
private System.Windows.Forms.ToolBarButton toolBarButton11;
private System.Windows.Forms.ToolBarButton toolBarButton12;
private System.Windows.Forms.ToolBarButton toolBarButton13;
private System.Windows.Forms.ToolBarButton toolBarButton14;
private System.Windows.Forms.ToolBarButton toolBarButton15;
private System.Windows.Forms.ToolBarButton toolBarButton16;
private System.Windows.Forms.ToolBarButton toolBarButton17;
private System.Windows.Forms.ToolBarButton toolBarButton18;
private System.Windows.Forms.ToolBarButton toolBarButton19;
private System.Windows.Forms.ToolBarButton toolBarButton20;
private System.Windows.Forms.ToolBarButton toolBarButton21;
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuItem3;
private System.ComponentModel.IContainer components;
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 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItemdzgl = new System.Windows.Forms.MenuItem();
this.menuItemdzcx = new System.Windows.Forms.MenuItem();
this.menuItemdzzc = new System.Windows.Forms.MenuItem();
this.menuItemdzzx = new System.Windows.Forms.MenuItem();
this.menuItemxxxg = new System.Windows.Forms.MenuItem();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItemtsgl = new System.Windows.Forms.MenuItem();
this.menuItemsmcx = new System.Windows.Forms.MenuItem();
this.menuItemtjts = new System.Windows.Forms.MenuItem();
this.menuItemscts = new System.Windows.Forms.MenuItem();
this.menuItemjlxg = new System.Windows.Forms.MenuItem();
this.menuItemjshs = new System.Windows.Forms.MenuItem();
this.menuItemjsgl = new System.Windows.Forms.MenuItem();
this.menuItemhsgl = new System.Windows.Forms.MenuItem();
this.menuItemyggl = new System.Windows.Forms.MenuItem();
this.menuItemcxyg = new System.Windows.Forms.MenuItem();
this.menuItemzjyg = new System.Windows.Forms.MenuItem();
this.menuItemscyg = new System.Windows.Forms.MenuItem();
this.menuItemzlxg = new System.Windows.Forms.MenuItem();
this.menuItemmmxg = new System.Windows.Forms.MenuItem();
this.menuItemaq = new System.Windows.Forms.MenuItem();
this.menuItemsdxt = new System.Windows.Forms.MenuItem();
this.menuItembz = new System.Windows.Forms.MenuItem();
this.menuItemsysm = new System.Windows.Forms.MenuItem();
this.menuItemgyxt = new System.Windows.Forms.MenuItem();
this.contextMenu1 = new System.Windows.Forms.ContextMenu();
this.menuItemjs = new System.Windows.Forms.MenuItem();
this.menuItemhs = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.menuItemsd = new System.Windows.Forms.MenuItem();
this.menuItemtc = new System.Windows.Forms.MenuItem();
this.toolBar1 = new System.Windows.Forms.ToolBar();
this.toolBarButton1 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton9 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton2 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton10 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton11 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton3 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton12 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton4 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton13 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton5 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton14 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton17 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton6 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton15 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton7 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton16 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton21 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton18 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton19 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton20 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton8 = new System.Windows.Forms.ToolBarButton();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
this.SuspendLayout();
//
// mainMenu1
//
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItemdzgl,
this.menuItemtsgl,
this.menuItemjshs,
this.menuItemyggl,
this.menuItemaq,
this.menuItembz});
//
// menuItemdzgl
//
this.menuItemdzgl.Index = 0;
this.menuItemdzgl.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItemdzcx,
this.menuItemdzzc,
this.menuItemdzzx,
this.menuItemxxxg,
this.menuItem1});
this.menuItemdzgl.Text = "读者管理(&M)";
//
// menuItemdzcx
//
this.menuItemdzcx.Index = 0;
this.menuItemdzcx.Shortcut = System.Windows.Forms.Shortcut.CtrlR;
this.menuItemdzcx.Text = "读者查询";
this.menuItemdzcx.Click += new System.EventHandler(this.menuItemdzcx_Click);
//
// menuItemdzzc
//
this.menuItemdzzc.Index = 1;
this.menuItemdzzc.Shortcut = System.Windows.Forms.Shortcut.CtrlG;
this.menuItemdzzc.Text = "读者注册";
this.menuItemdzzc.Click += new System.EventHandler(this.menuItemdzzc_Click);
//
// menuItemdzzx
//
this.menuItemdzzx.Index = 2;
this.menuItemdzzx.Shortcut = System.Windows.Forms.Shortcut.CtrlD;
this.menuItemdzzx.Text = "读者注消";
this.menuItemdzzx.Click += new System.EventHandler(this.menuItemdzzx_Click);
//
// menuItemxxxg
//
this.menuItemxxxg.Index = 3;
this.menuItemxxxg.Shortcut = System.Windows.Forms.Shortcut.CtrlW;
this.menuItemxxxg.Text = "信息修改";
this.menuItemxxxg.Click += new System.EventHandler(this.menuItemxxxg_Click);
//
// menuItem1
//
this.menuItem1.Index = 4;
this.menuItem1.Text = "退出(&Q)";
this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
//
// menuItemtsgl
//
this.menuItemtsgl.Index = 1;
this.menuItemtsgl.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItemsmcx,
this.menuItemtjts,
this.menuItemscts,
this.menuItemjlxg});
this.menuItemtsgl.Text = "图书管理(&B)";
this.menuItemtsgl.Click += new System.EventHandler(this.menuItemtsgl_Click);
//
// menuItemsmcx
//
this.menuItemsmcx.Index = 0;
this.menuItemsmcx.Shortcut = System.Windows.Forms.Shortcut.CtrlB;
this.menuItemsmcx.Text = "书目查询";
this.menuItemsmcx.Click += new System.EventHandler(this.menuItemsmcx_Click);
//
// menuItemtjts
//
this.menuItemtjts.Index = 1;
this.menuItemtjts.Shortcut = System.Windows.Forms.Shortcut.CtrlK;
this.menuItemtjts.Text = "添加图书";
this.menuItemtjts.Click += new System.EventHandler(this.menuItemtjts_Click);
//
// menuItemscts
//
this.menuItemscts.Index = 2;
this.menuItemscts.Shortcut = System.Windows.Forms.Shortcut.CtrlL;
this.menuItemscts.Text = "删除图书";
this.menuItemscts.Click += new System.EventHandler(this.menuItemscts_Click);
//
// menuItemjlxg
//
this.menuItemjlxg.Index = 3;
this.menuItemjlxg.Shortcut = System.Windows.Forms.Shortcut.CtrlE;
this.menuItemjlxg.Text = "记录修改";
this.menuItemjlxg.Click += new System.EventHandler(this.menuItemjlxg_Click);
//
// menuItemjshs
//
this.menuItemjshs.Index = 2;
this.menuItemjshs.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItemjsgl,
this.menuItemhsgl});
this.menuItemjshs.Text = "借书/还书(&J)";
//
// menuItemjsgl
//
this.menuItemjsgl.Index = 0;
this.menuItemjsgl.Shortcut = System.Windows.Forms.Shortcut.CtrlJ;
this.menuItemjsgl.Text = "借书管理";
this.menuItemjsgl.Click += new System.EventHandler(this.menuItemjsgl_Click);
//
// menuItemhsgl
//
this.menuItemhsgl.Index = 1;
this.menuItemhsgl.Shortcut = System.Windows.Forms.Shortcut.CtrlM;
this.menuItemhsgl.Text = "还书管理";
this.menuItemhsgl.Click += new System.EventHandler(this.menuItemhsgl_Click);
//
// menuItemyggl
//
this.menuItemyggl.Index = 3;
this.menuItemyggl.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItemcxyg,
this.menuItemzjyg,
this.menuItemscyg,
this.menuItemzlxg,
this.menuItemmmxg});
this.menuItemyggl.Text = "员工管理(&Y)";
//
// menuItemcxyg
//
this.menuItemcxyg.Index = 0;
this.menuItemcxyg.Shortcut = System.Windows.Forms.Shortcut.CtrlF;
this.menuItemcxyg.Text = "查询员工";
this.menuItemcxyg.Click += new System.EventHandler(this.menuItemcxyg_Click);
//
// menuItemzjyg
//
this.menuItemzjyg.Index = 1;
this.menuItemzjyg.Shortcut = System.Windows.Forms.Shortcut.CtrlI;
this.menuItemzjyg.Text = "增加员工";
this.menuItemzjyg.Click += new System.EventHandler(this.menuItemzjyg_Click);
//
// menuItemscyg
//
this.menuItemscyg.Index = 2;
this.menuItemscyg.Shortcut = System.Windows.Forms.Shortcut.CtrlY;
this.menuItemscyg.Text = "删除员工";
this.menuItemscyg.Click += new System.EventHandler(this.menuItemscyg_Click);
//
// menuItemzlxg
//
this.menuItemzlxg.Index = 3;
this.menuItemzlxg.Shortcut = System.Windows.Forms.Shortcut.CtrlP;
this.menuItemzlxg.Text = "资料修改";
this.menuItemzlxg.Click += new System.EventHandler(this.menuItemzlxg_Click);
//
// menuItemmmxg
//
this.menuItemmmxg.Index = 4;
this.menuItemmmxg.Shortcut = System.Windows.Forms.Shortcut.CtrlO;
this.menuItemmmxg.Text = "修改密码";
this.menuItemmmxg.Click += new System.EventHandler(this.menuItemmmxg_Click);
//
// menuItemaq
//
this.menuItemaq.Index = 4;
this.menuItemaq.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItemsdxt});
this.menuItemaq.Text = "安全(&S)";
//
// menuItemsdxt
//
this.menuItemsdxt.Index = 0;
this.menuItemsdxt.Shortcut = System.Windows.Forms.Shortcut.CtrlT;
this.menuItemsdxt.Text = "锁定系系统";
this.menuItemsdxt.Click += new System.EventHandler(this.menuItemsdxt_Click);
//
// menuItembz
//
this.menuItembz.Index = 5;
this.menuItembz.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItemsysm,
this.menuItemgyxt});
this.menuItembz.Text = "帮助(&H)";
//
// menuItemsysm
//
this.menuItemsysm.Index = 0;
this.menuItemsysm.Shortcut = System.Windows.Forms.Shortcut.CtrlH;
this.menuItemsysm.Text = "使用说明...";
this.menuItemsysm.Click += new System.EventHandler(this.menuItemsysm_Click);
//
// menuItemgyxt
//
this.menuItemgyxt.Index = 1;
this.menuItemgyxt.Text = "关于系统...(&B)";
this.menuItemgyxt.Click += new System.EventHandler(this.menuItemgyxt_Click);
//
// contextMenu1
//
this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItemjs,
this.menuItemhs,
this.menuItem2,
this.menuItem3,
this.menuItemsd,
this.menuItemtc});
//
// menuItemjs
//
this.menuItemjs.Index = 0;
this.menuItemjs.Text = "借书(&B)";
this.menuItemjs.Click += new System.EventHandler(this.menuItemjs_Click);
//
// menuItemhs
//
this.menuItemhs.Index = 1;
this.menuItemhs.Text = "还书(&M)";
this.menuItemhs.Click += new System.EventHandler(this.menuItemhs_Click);
//
// menuItem2
//
this.menuItem2.Index = 2;
this.menuItem2.Text = "显示工具栏(&P)";
this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
//
// menuItem3
//
this.menuItem3.Index = 3;
this.menuItem3.Text = "隐藏工具栏(&O)";
this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click);
//
// menuItemsd
//
this.menuItemsd.Index = 4;
this.menuItemsd.Text = "锁定(&T)";
this.menuItemsd.Click += new System.EventHandler(this.menuItemsd_Click);
//
// menuItemtc
//
this.menuItemtc.Index = 5;
this.menuItemtc.Text = "退出(&Q)";
this.menuItemtc.Click += new System.EventHandler(this.menuItemtc_Click);
//
// toolBar1
//
this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.toolBarButton1,
this.toolBarButton9,
this.toolBarButton2,
this.toolBarButton10,
this.toolBarButton11,
this.toolBarButton3,
this.toolBarButton12,
this.toolBarButton4,
this.toolBarButton13,
this.toolBarButton5,
this.toolBarButton14,
this.toolBarButton17,
this.toolBarButton6,
this.toolBarButton15,
this.toolBarButton7,
this.toolBarButton16,
this.toolBarButton21,
this.toolBarButton18,
this.toolBarButton19,
this.toolBarButton20,
this.toolBarButton8});
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -