资源预览内容
第1页 / 共47页
第2页 / 共47页
第3页 / 共47页
第4页 / 共47页
第5页 / 共47页
第6页 / 共47页
第7页 / 共47页
第8页 / 共47页
第9页 / 共47页
第10页 / 共47页
亲,该文档总共47页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述
精品文档登陆界面using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace Labrary public partial class FormLogin : Form public FormLogin() InitializeComponent(); / / 验证控?件t / / private bool ValidControl() if (this.tbID.Text = ) MessageBox.Show(请填写用户名!?); this.tbID.Focus(); return false; if (this.tbID.Text != admin) if (!UserManage.ObjUser.IsHasID(All.dbo, this.tbID.Text) MessageBox.Show(不存在此用户!?); this.tbID.Text = ; this.tbID.Focus(); return false; if (this.tbID.Text != admin) UserManage.ObjUser user= new UserManage.ObjUser(this.tbID.Text, All.dbo); if (user.PWD != this.tbPWD.Text) MessageBox.Show(密码错误!?); this.tbPWD.Text = ; this.tbPWD.Focus(); return false; else if (this.tbPWD.Text != 123456) MessageBox.Show(密码错误! ); this.tbPWD.Text = ; this.tbPWD.Focus(); return false; return true; private void gbtnCancel_Click(object sender, EventArgs e) this.Close(); private void gbtnOK_Click(object sender, EventArgs e) /如?果?验证控?件t通过y if (ValidControl() if (this.tbID.Text != admin) All.userLogin = new UserManage.ObjUser(this.tbID.Text, All.dbo); else All.userLogin = new UserManage.ObjUser(All.dbo); All.userLogin.ID = admin; All.userLogin.Name = 管理员; this.DialogResult = DialogResult.OK; this.Close(); 主界面using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace Labrary public partial class FormMain : Form public const int WM_USER = 0x0400; public const int WM_GETBUFFER_LOOP = WM_USER + 2; private RFID_dll.Reader rdr; private RFID_dll.RFID rfid; List rfids = new List(); int directionFlag = 0;/1进;出? FormInAndOut fiao = new FormInAndOut(); public FormMain() InitializeComponent(); this.rdr = new RFID_dll.Reader(); /this.rfid = new RFID_dll.RFID(rdr); private void FormMain_Load(object sender, EventArgs e) Init(); / / 初始化 / private void Init() fiao.StartPosition = FormStartPosition.Manual; /多窗体在不同时间显示 Screen screens = Screen.AllScreens; if (screens.Length = 2) List listScreen = new List(); foreach (Screen screen in Screen.AllScreens) if (screen.Primary = false) listScreen.Add(screen); fiao.Location = listScreen0.WorkingArea.Location; SetMenJin(PicIn); fiao.Show(); /toolStripStatusLabel2显示登陆用户名? toolStripStatusLabel2.Text = All.userLogin.Name; this.panel1.BackgroundImage = null; /菜单栏全部显示? this.用?户管理ToolStripMenuItem.Visible = true; this.系统3初?始?化CToolStripMenuItem.Visible = true; this.应|用?模式?ToolStripMenuItem.Visible = true; this.图?书管理ToolStripMenuItem.Visible = true; this.退?办卡ToolStripMenuItem.Visible = true; this.借阅?ToolStripMenuItem.Visible = true; this.门?禁?ToolStripMenuItem.Visible = true; SetPurview(); this.toolStrip1.Visible = false; this.toolStrip2.Visible = false;
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号