📄 mainframe.cs
字号:
#region 引用类库调用...
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.IO;
using System.Security.Cryptography;
using System.Security;
using WindowsApplication.EmployeeLeaveManager;
using WindowsApplication.BrushKaID;
using WindowsApplication.dealTime;
using WindowsApplication.ConnectionDB;
using WindowsApplication.SearchUserPeodom;
using WindowsApplication.History;
using WindowsApplication.UserHistoryFrame;
#endregion
namespace WindowsApplication
{
public class mainFrame : System.Windows.Forms.Form
{
#region 定义变量...
public static bool blT=false;
public static bool blF=false;
public static bool blQuanXian=false;
public static bool blEnable=false;
private string path=System.Environment.CurrentDirectory+"//login.dll";
private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter;
private System.Data.SqlClient.SqlCommand sqlSelectCommand1;
private System.Data.SqlClient.SqlCommand sqlInsertCommand1;
private System.Data.SqlClient.SqlCommand sqlUpdateCommand1;
private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;
private System.Data.SqlClient.SqlConnection sqlConnection;
private String str="";
#endregion
#region 控件声明
private System.Windows.Forms.MenuItem menuClear;
private System.Windows.Forms.MenuItem menuPeodom;
private System.Windows.Forms.MenuItem menuItem10;
private System.Windows.Forms.MenuItem menuConnectionDB;
protected System.Windows.Forms.MainMenu mainMenu;
private System.Windows.Forms.MenuItem menuBasic;
private System.Windows.Forms.MenuItem MenuSystem;
private System.Windows.Forms.MenuItem MenuReport;
private System.Windows.Forms.MenuItem menuWindow;
private System.Windows.Forms.MenuItem menuHelp;
private System.Windows.Forms.StatusBar statusPanel;
private System.Windows.Forms.StatusBarPanel stautsBar;
private System.Windows.Forms.StatusBarPanel stautsUser;
private System.Windows.Forms.StatusBarPanel statusTime;
private System.Windows.Forms.StatusBarPanel stautsOther;
protected System.Windows.Forms.MenuItem menuNavigation;
private System.Windows.Forms.ImageList toolBarImageList;
protected System.Windows.Forms.ToolBar tool;
private System.Windows.Forms.MenuItem menuBasicDesign;
private System.Windows.Forms.Timer CurrentTime;
private System.Windows.Forms.ImageList imageList;
protected System.Windows.Forms.ToolBarButton toolInput;
private System.Windows.Forms.ToolBarButton toolRead;
private System.Windows.Forms.MenuItem menuItem3;
private System.Windows.Forms.MenuItem menuUserManager;
private System.Windows.Forms.MenuItem menuPopedomManager;
private System.Windows.Forms.MenuItem menuItem6;
private System.Windows.Forms.MenuItem menuBack;
private System.Windows.Forms.MenuItem menuRestore;
private System.Windows.Forms.MenuItem menuItem4;
private System.Windows.Forms.MenuItem menuModifyPassword;
private System.Windows.Forms.MenuItem menuLeave;
private System.Windows.Forms.MenuItem menuMonth;
private System.Windows.Forms.MenuItem menuDay;
private System.Windows.Forms.MenuItem menuYear;
private System.Windows.Forms.MenuItem menuItem11;
private System.Windows.Forms.MenuItem menuTool;
private System.Windows.Forms.MenuItem menuStatus;
private System.Windows.Forms.MenuItem menulevel;
private System.Windows.Forms.MenuItem menuApeak;
private System.Windows.Forms.MenuItem menuLayer;
private System.Windows.Forms.MenuItem menuHormal;
private System.Windows.Forms.MenuItem menuCopyright;
private System.Windows.Forms.MenuItem menuSoftWareEnrol;
private System.Windows.Forms.MenuItem menuSoftUsed;
private System.Windows.Forms.MenuItem menuAbout;
private System.Windows.Forms.MenuItem menuItem5;
private System.Windows.Forms.MenuItem menuExit;
private System.Windows.Forms.MenuItem menuKaoQin;
private System.Windows.Forms.MenuItem menuQingJia;
private System.Windows.Forms.MenuItem menuLateSearch;
private System.Windows.Forms.MenuItem menuZhaoTui;
private System.Windows.Forms.MenuItem menuWeiDao;
private System.Windows.Forms.MenuItem menuItem7;
private System.Windows.Forms.MenuItem menuHistory;
private System.Windows.Forms.MenuItem menuKaWuManager;
private System.Windows.Forms.MenuItem menuFaKaZhaoZuo;
private System.Windows.Forms.MenuItem menuBuKaCaoZuo;
private System.Windows.Forms.MenuItem menuHistoryKa;
private System.Windows.Forms.Timer PopedomTimer;
private System.Windows.Forms.Timer ModifyPopedomTimer;
private System.Windows.Forms.MenuItem menuEmp_ID;
private System.Windows.Forms.MenuItem menuEmp_Manager;
private System.Windows.Forms.MenuItem menuDepartMent;
private System.Windows.Forms.MenuItem menuKaoQinManager;
private System.Windows.Forms.MenuItem menuKQM;
private System.Windows.Forms.MenuItem menuReadKaHao;
private System.Windows.Forms.ToolBarButton toolUserManager;
private System.Windows.Forms.ToolBarButton toolQuanXian;
private System.Windows.Forms.ToolBarButton toolBasicDesign;
private System.Windows.Forms.ToolBarButton toolSearch;
private System.Windows.Forms.ContextMenu contextMenuSearch;
private System.Windows.Forms.ContextMenu contextMenuFrameDesign;
private System.Windows.Forms.MenuItem menuLateMenu;
private System.Windows.Forms.MenuItem menuEarlyMenu;
private System.Windows.Forms.MenuItem menuLeaveMenu;
private System.Windows.Forms.MenuItem menuWeiLMenu;
private System.Windows.Forms.MenuItem menuHorizontal;
private System.Windows.Forms.MenuItem menuVertical;
private System.Windows.Forms.MenuItem menuLayter;
private System.Windows.Forms.MenuItem menuItem1;
private System.Windows.Forms.MenuItem menuSystemInit;
private WindowsApplication.navigationFrame log=new navigationFrame();
private System.Windows.Forms.MenuItem menuItem2;
private System.Windows.Forms.MenuItem menuLookBrush;
private System.Windows.Forms.MenuItem menuItem8;
private System.Windows.Forms.MenuItem menuLeaveManager;
private System.Windows.Forms.MenuItem menuLateManager;
private System.Windows.Forms.MenuItem menuComeManager;
private System.Windows.Forms.MenuItem menuSearchLeave;
private System.Windows.Forms.MenuItem menuDesignTime;
private System.Windows.Forms.MenuItem menuItem9;
private System.Windows.Forms.MenuItem menuKaoQinTimeDesign;
private System.Windows.Forms.ContextMenu contextMenu;
private System.Windows.Forms.MenuItem menucontextTitle;
private System.Windows.Forms.MenuItem menucontextShowTileBar;
private System.Windows.Forms.ToolTip toolTip;
private System.Windows.Forms.MenuItem MenuZhaoTuiItem;
private System.Windows.Forms.MenuItem menuHistoryMenu;
private System.Windows.Forms.MenuItem userOperatorHistory;
private System.Windows.Forms.MenuItem menuEmployeeHistory;
private System.Windows.Forms.MenuItem menuDataHistory;
private System.Windows.Forms.MenuItem menuDengLuHistory;
private System.Windows.Forms.MenuItem menuZhuCheHistory;
private System.Windows.Forms.MenuItem menuUserManagerHistory;
private System.Windows.Forms.MenuItem menuFaKaHistory;
private System.ComponentModel.IContainer components;
#endregion
#region 移动变量...
private static bool blMove=false;
private int MouseX=0,MouseY=0;
#endregion
#region 构造函数...
public mainFrame()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
//
}
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#endregion
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要使用代码编辑器修改
/// 此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(mainFrame));
this.mainMenu = new System.Windows.Forms.MainMenu();
this.menuBasic = new System.Windows.Forms.MenuItem();
this.menuEmp_ID = new System.Windows.Forms.MenuItem();
this.menuEmp_Manager = new System.Windows.Forms.MenuItem();
this.menuDepartMent = new System.Windows.Forms.MenuItem();
this.menuItem8 = new System.Windows.Forms.MenuItem();
this.menuLeaveManager = new System.Windows.Forms.MenuItem();
this.menuLateManager = new System.Windows.Forms.MenuItem();
this.menuComeManager = new System.Windows.Forms.MenuItem();
this.MenuZhaoTuiItem = new System.Windows.Forms.MenuItem();
this.menuItem10 = new System.Windows.Forms.MenuItem();
this.menuConnectionDB = new System.Windows.Forms.MenuItem();
this.menuKaoQinManager = new System.Windows.Forms.MenuItem();
this.menuKaoQin = new System.Windows.Forms.MenuItem();
this.menuQingJia = new System.Windows.Forms.MenuItem();
this.menuLateSearch = new System.Windows.Forms.MenuItem();
this.menuZhaoTui = new System.Windows.Forms.MenuItem();
this.menuWeiDao = new System.Windows.Forms.MenuItem();
this.menuKQM = new System.Windows.Forms.MenuItem();
this.menuReadKaHao = new System.Windows.Forms.MenuItem();
this.menuDesignTime = new System.Windows.Forms.MenuItem();
this.MenuSystem = new System.Windows.Forms.MenuItem();
this.menuNavigation = new System.Windows.Forms.MenuItem();
this.menuBasicDesign = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.menuUserManager = new System.Windows.Forms.MenuItem();
this.menuPopedomManager = new System.Windows.Forms.MenuItem();
this.menuItem6 = new System.Windows.Forms.MenuItem();
this.menuBack = new System.Windows.Forms.MenuItem();
this.menuRestore = new System.Windows.Forms.MenuItem();
this.menuItem4 = new System.Windows.Forms.MenuItem();
this.menuModifyPassword = new System.Windows.Forms.MenuItem();
this.menuLeave = new System.Windows.Forms.MenuItem();
this.menuPeodom = new System.Windows.Forms.MenuItem();
this.menuKaWuManager = new System.Windows.Forms.MenuItem();
this.menuFaKaZhaoZuo = new System.Windows.Forms.MenuItem();
this.menuBuKaCaoZuo = new System.Windows.Forms.MenuItem();
this.menuHistoryKa = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuLookBrush = new System.Windows.Forms.MenuItem();
this.menuSearchLeave = new System.Windows.Forms.MenuItem();
this.MenuReport = new System.Windows.Forms.MenuItem();
this.menuYear = new System.Windows.Forms.MenuItem();
this.menuMonth = new System.Windows.Forms.MenuItem();
this.menuDay = new System.Windows.Forms.MenuItem();
this.menuItem7 = new System.Windows.Forms.MenuItem();
this.menuHistory = new System.Windows.Forms.MenuItem();
this.menuHistoryMenu = new System.Windows.Forms.MenuItem();
this.userOperatorHistory = new System.Windows.Forms.MenuItem();
this.menuEmployeeHistory = new System.Windows.Forms.MenuItem();
this.menuDataHistory = new System.Windows.Forms.MenuItem();
this.menuDengLuHistory = new System.Windows.Forms.MenuItem();
this.menuZhuCheHistory = new System.Windows.Forms.MenuItem();
this.menuUserManagerHistory = new System.Windows.Forms.MenuItem();
this.menuFaKaHistory = new System.Windows.Forms.MenuItem();
this.menuClear = new System.Windows.Forms.MenuItem();
this.menuWindow = new System.Windows.Forms.MenuItem();
this.menulevel = new System.Windows.Forms.MenuItem();
this.menuApeak = new System.Windows.Forms.MenuItem();
this.menuLayer = new System.Windows.Forms.MenuItem();
this.menuHormal = new System.Windows.Forms.MenuItem();
this.menuItem11 = new System.Windows.Forms.MenuItem();
this.menuTool = new System.Windows.Forms.MenuItem();
this.menuStatus = new System.Windows.Forms.MenuItem();
this.menuItem5 = new System.Windows.Forms.MenuItem();
this.menuExit = new System.Windows.Forms.MenuItem();
this.menuHelp = new System.Windows.Forms.MenuItem();
this.menuCopyright = new System.Windows.Forms.MenuItem();
this.menuSoftWareEnrol = new System.Windows.Forms.MenuItem();
this.menuSoftUsed = new System.Windows.Forms.MenuItem();
this.menuAbout = new System.Windows.Forms.MenuItem();
this.tool = new System.Windows.Forms.ToolBar();
this.toolInput = new System.Windows.Forms.ToolBarButton();
this.toolRead = new System.Windows.Forms.ToolBarButton();
this.toolSearch = new System.Windows.Forms.ToolBarButton();
this.contextMenuSearch = new System.Windows.Forms.ContextMenu();
this.menuLateMenu = new System.Windows.Forms.MenuItem();
this.menuEarlyMenu = new System.Windows.Forms.MenuItem();
this.menuLeaveMenu = new System.Windows.Forms.MenuItem();
this.menuWeiLMenu = new System.Windows.Forms.MenuItem();
this.menuItem9 = new System.Windows.Forms.MenuItem();
this.menuKaoQinTimeDesign = new System.Windows.Forms.MenuItem();
this.toolUserManager = new System.Windows.Forms.ToolBarButton();
this.toolQuanXian = new System.Windows.Forms.ToolBarButton();
this.toolBasicDesign = new System.Windows.Forms.ToolBarButton();
this.contextMenuFrameDesign = new System.Windows.Forms.ContextMenu();
this.menuHorizontal = new System.Windows.Forms.MenuItem();
this.menuVertical = new System.Windows.Forms.MenuItem();
this.menuLayter = new System.Windows.Forms.MenuItem();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuSystemInit = new System.Windows.Forms.MenuItem();
this.imageList = new System.Windows.Forms.ImageList(this.components);
this.statusPanel = new System.Windows.Forms.StatusBar();
this.stautsBar = new System.Windows.Forms.StatusBarPanel();
this.stautsUser = new System.Windows.Forms.StatusBarPanel();
this.statusTime = new System.Windows.Forms.StatusBarPanel();
this.stautsOther = new System.Windows.Forms.StatusBarPanel();
this.toolBarImageList = new System.Windows.Forms.ImageList(this.components);
this.CurrentTime = new System.Windows.Forms.Timer(this.components);
this.PopedomTimer = new System.Windows.Forms.Timer(this.components);
this.ModifyPopedomTimer = new System.Windows.Forms.Timer(this.components);
this.contextMenu = new System.Windows.Forms.ContextMenu();
this.menucontextShowTileBar = new System.Windows.Forms.MenuItem();
this.menucontextTitle = new System.Windows.Forms.MenuItem();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
this.sqlDataAdapter = new System.Data.SqlClient.SqlDataAdapter();
this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlConnection = new System.Data.SqlClient.SqlConnection();
this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand();
this.sqlUpdateCommand1 = new System.Data.SqlClient.SqlCommand();
((System.ComponentModel.ISupportInitialize)(this.stautsBar)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.stautsUser)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.statusTime)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.stautsOther)).BeginInit();
this.SuspendLayout();
//
// mainMenu
//
this.mainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuBasic,
this.menuKaoQinManager,
this.MenuSystem,
this.menuKaWuManager,
this.MenuReport,
this.menuHistoryMenu,
this.menuWindow,
this.menuHelp});
//
// menuBasic
//
this.menuBasic.Index = 0;
this.menuBasic.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuEmp_ID,
this.menuEmp_Manager,
this.menuDepartMent,
this.menuItem8,
this.menuLeaveManager,
this.menuLateManager,
this.menuComeManager,
this.MenuZhaoTuiItem,
this.menuItem10,
this.menuConnectionDB});
this.menuBasic.Text = "数据基础(&D)";
//
// menuEmp_ID
//
this.menuEmp_ID.Enabled = false;
this.menuEmp_ID.Index = 0;
this.menuEmp_ID.Text = "职工编号输入(&R)";
this.menuEmp_ID.Click += new System.EventHandler(this.menuEmp_ID_Click);
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -