⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 loginbegin2.cs

📁 一个用vs2003编写的客户工资管理系统客户端程序/一个用vs2003编写的客户工资管理系统客户端程序
💻 CS
📖 第 1 页 / 共 2 页
字号:
using System;
using System.Data;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Threading;
using System.IO;

using Jinrm.Data;
using Jinrm.FileSystem;
using GzglClient.BLL;
using GzglClient.Froms;
using MSjogren.Samples.ShellLink;

namespace GzglClient
{
	/// <summary>
	/// LoginBegin2 的摘要说明。
	/// </summary>
	public class LoginBegin2 : System.Windows.Forms.Form
	{
		#region 系统代码
		private PinkieControls.ButtonXP btnLogin;
		private System.Windows.Forms.TextBox txtPwd;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.ComboBox cbName;
		private PinkieControls.ButtonXP btnCanel;
		private System.Windows.Forms.PictureBox pictureBox1;
		private System.Windows.Forms.Label labShowState;
		private System.Windows.Forms.Label labServerState;
		private PinkieControls.ButtonXP btnSetting;
		private System.Windows.Forms.LinkLabel LLBToUrl;
		private string ServerState = "";//服务器状态
		private string ShowState = "";//当前操作状态
		private DoAccess conn = new DoAccess("Data\\DataAcc.mdb");

		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		/// <summary>
		/// 
		/// </summary>
		public LoginBegin2()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();

			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}
		
		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>
		[STAThread]
		static void Main(string[] args) 
		{
			//农业局  1479994
			if(args.Length == 0)
			{
				MessageBox.Show("没有权限!");
			}
			else
			{
				AllStr.Key = args[0];
				Application.Run(new LoginBegin2());
			}

//			AllStr.Key = "1480210";//1480210
//			Application.Run(new LoginBegin2());
		}
		#endregion

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(LoginBegin2));
			this.btnLogin = new PinkieControls.ButtonXP();
			this.txtPwd = new System.Windows.Forms.TextBox();
			this.label2 = new System.Windows.Forms.Label();
			this.label1 = new System.Windows.Forms.Label();
			this.cbName = new System.Windows.Forms.ComboBox();
			this.btnCanel = new PinkieControls.ButtonXP();
			this.pictureBox1 = new System.Windows.Forms.PictureBox();
			this.labShowState = new System.Windows.Forms.Label();
			this.labServerState = new System.Windows.Forms.Label();
			this.btnSetting = new PinkieControls.ButtonXP();
			this.LLBToUrl = new System.Windows.Forms.LinkLabel();
			this.SuspendLayout();
			// 
			// btnLogin
			// 
			this.btnLogin.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(236)), ((System.Byte)(233)), ((System.Byte)(216)));
			this.btnLogin.DefaultScheme = true;
			this.btnLogin.DialogResult = System.Windows.Forms.DialogResult.None;
			this.btnLogin.Hint = "";
			this.btnLogin.Location = new System.Drawing.Point(384, 296);
			this.btnLogin.Name = "btnLogin";
			this.btnLogin.Scheme = PinkieControls.ButtonXP.Schemes.Blue;
			this.btnLogin.Size = new System.Drawing.Size(75, 26);
			this.btnLogin.TabIndex = 1;
			this.btnLogin.Text = "登录";
			this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click);
			// 
			// txtPwd
			// 
			this.txtPwd.Location = new System.Drawing.Point(384, 256);
			this.txtPwd.Name = "txtPwd";
			this.txtPwd.PasswordChar = '*';
			this.txtPwd.Size = new System.Drawing.Size(232, 21);
			this.txtPwd.TabIndex = 3;
			this.txtPwd.Text = "lyg";
			// 
			// label2
			// 
			this.label2.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(79)), ((System.Byte)(138)), ((System.Byte)(198)));
			this.label2.Location = new System.Drawing.Point(336, 264);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(48, 16);
			this.label2.TabIndex = 5;
			this.label2.Text = "密 码";
			// 
			// label1
			// 
			this.label1.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(82)), ((System.Byte)(142)), ((System.Byte)(204)));
			this.label1.Location = new System.Drawing.Point(336, 240);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(48, 16);
			this.label1.TabIndex = 4;
			this.label1.Text = "用户名";
			// 
			// cbName
			// 
			this.cbName.Items.AddRange(new object[] {
														"管理员"});
			this.cbName.Location = new System.Drawing.Point(384, 232);
			this.cbName.Name = "cbName";
			this.cbName.Size = new System.Drawing.Size(232, 20);
			this.cbName.TabIndex = 4;
			this.cbName.Tag = "";
			this.cbName.Text = "管理员";
			// 
			// btnCanel
			// 
			this.btnCanel.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(236)), ((System.Byte)(233)), ((System.Byte)(216)));
			this.btnCanel.DefaultScheme = true;
			this.btnCanel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.btnCanel.Hint = "";
			this.btnCanel.Location = new System.Drawing.Point(464, 296);
			this.btnCanel.Name = "btnCanel";
			this.btnCanel.Scheme = PinkieControls.ButtonXP.Schemes.Blue;
			this.btnCanel.Size = new System.Drawing.Size(75, 26);
			this.btnCanel.TabIndex = 2;
			this.btnCanel.Text = "取消";
			this.btnCanel.Click += new System.EventHandler(this.btnCanel_Click);
			// 
			// pictureBox1
			// 
			this.pictureBox1.BackColor = System.Drawing.Color.White;
			this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left;
			this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
			this.pictureBox1.Location = new System.Drawing.Point(0, 0);
			this.pictureBox1.Name = "pictureBox1";
			this.pictureBox1.Size = new System.Drawing.Size(655, 415);
			this.pictureBox1.TabIndex = 0;
			this.pictureBox1.TabStop = false;
			// 
			// labShowState
			// 
			this.labShowState.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(93)), ((System.Byte)(154)), ((System.Byte)(219)));
			this.labShowState.Location = new System.Drawing.Point(384, 336);
			this.labShowState.Name = "labShowState";
			this.labShowState.Size = new System.Drawing.Size(256, 23);
			this.labShowState.TabIndex = 8;
			// 
			// labServerState
			// 
			this.labServerState.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(93)), ((System.Byte)(154)), ((System.Byte)(219)));
			this.labServerState.Location = new System.Drawing.Point(384, 368);
			this.labServerState.Name = "labServerState";
			this.labServerState.Size = new System.Drawing.Size(256, 23);
			this.labServerState.TabIndex = 9;
			// 
			// btnSetting
			// 
			this.btnSetting.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(236)), ((System.Byte)(233)), ((System.Byte)(216)));
			this.btnSetting.DefaultScheme = true;
			this.btnSetting.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.btnSetting.Hint = "";
			this.btnSetting.Location = new System.Drawing.Point(544, 296);
			this.btnSetting.Name = "btnSetting";
			this.btnSetting.Scheme = PinkieControls.ButtonXP.Schemes.Blue;
			this.btnSetting.Size = new System.Drawing.Size(75, 26);
			this.btnSetting.TabIndex = 11;
			this.btnSetting.Text = "选择区划";
			this.btnSetting.Click += new System.EventHandler(this.btnSetting_Click);
			// 
			// LLBToUrl
			// 
			this.LLBToUrl.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(77)), ((System.Byte)(136)), ((System.Byte)(192)));
			this.LLBToUrl.Enabled = false;
			this.LLBToUrl.LinkColor = System.Drawing.Color.Gold;
			this.LLBToUrl.Location = new System.Drawing.Point(384, 192);
			this.LLBToUrl.Name = "LLBToUrl";
			this.LLBToUrl.Size = new System.Drawing.Size(232, 23);
			this.LLBToUrl.TabIndex = 12;
			this.LLBToUrl.TabStop = true;
			this.LLBToUrl.Text = "在线支持:使用中有问题请点击查看";
			this.LLBToUrl.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.LLBToUrl_LinkClicked_1);
			// 
			// LoginBegin2
			// 
			this.AcceptButton = this.btnLogin;
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.CancelButton = this.btnCanel;
			this.ClientSize = new System.Drawing.Size(656, 415);
			this.Controls.Add(this.LLBToUrl);
			this.Controls.Add(this.btnSetting);
			this.Controls.Add(this.txtPwd);
			this.Controls.Add(this.btnLogin);
			this.Controls.Add(this.btnCanel);
			this.Controls.Add(this.labServerState);
			this.Controls.Add(this.labShowState);
			this.Controls.Add(this.label1);
			this.Controls.Add(this.label2);
			this.Controls.Add(this.cbName);
			this.Controls.Add(this.pictureBox1);
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.MaximizeBox = false;
			this.MaximumSize = new System.Drawing.Size(664, 449);
			this.MinimizeBox = false;
			this.MinimumSize = new System.Drawing.Size(664, 449);
			this.Name = "LoginBegin2";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "连云港市人事局综合管理信息系统";
			this.Load += new System.EventHandler(this.LoginBegin2_Load);
			this.ResumeLayout(false);

		}
		#endregion

		private void btnLogin_Click(object sender, System.EventArgs e)
		{
			#region 创建快捷方式
			try
			{
				string path = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
				ShellShortcut m_Shortcut = new ShellShortcut(path + "\\工资软件更新.lnk");
				m_Shortcut.Path = Application.StartupPath + "\\GzglClientUpdate.exe";
				m_Shortcut.WorkingDirectory = Application.StartupPath;
				m_Shortcut.Arguments = "";
				m_Shortcut.Description = "";
				m_Shortcut.IconPath = Application.StartupPath + "\\MainIco.ico";
				m_Shortcut.IconIndex = Convert.ToInt32(0);
				//m_Shortcut.WindowStyle = (ProcessWindowStyle) cboWinStyle.SelectedItem;
				m_Shortcut.Save();

//				ShellShortcut m_Shortcut1 = new ShellShortcut(path + "\\连云港市工资管理信息系统.lnk");
//				m_Shortcut1.Path = Application.StartupPath + "\\打开程序.exe";
//				m_Shortcut1.WorkingDirectory = Application.StartupPath;
//				m_Shortcut1.Arguments = "";
//				m_Shortcut1.Description = "";
//				m_Shortcut1.IconPath = Application.StartupPath + "\\AppICO.ico";
//				m_Shortcut1.IconIndex = Convert.ToInt32(0);
//				//m_Shortcut1.WindowStyle = (ProcessWindowStyle) cboWinStyle.SelectedItem;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -