using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using LYFZ.OtherExpansion.SkinControl;
using LYFZ.Model;
namespace LYFZ.Software.UI
{
public partial class frmLogin : LYFZ.ComponentLibrary.BaseForm360
{
protected Model_ErpUser loginUserModel = new Model_ErpUser();
public frmLogin()
{
InitializeComponent();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.stxtPwd.BaseText.PasswordChar = '*';
this.stxtPwd.BaseText.UseSystemPasswordChar = true;
// this.IsCloseForm = false;
//this.btnAppFormExit.Click += new EventHandler(OverridebtnAppFormExit_Click);
}
///
///
///
///
///
protected virtual void sBtnLogin_Click(object sender, EventArgs e)
{
}
///
///
///
///
///
protected virtual void stxtPwd_IconClick(object sender, EventArgs e)
{
PassKey pass = new PassKey(this.Left + stxtPwd.Left - 100, this.Top + stxtPwd.Bottom, this.textBoxPwd);
pass.Show(this);
}
protected virtual void sMenuStripId_Closing(object sender, ToolStripDropDownClosingEventArgs e)
{
this.stxtUserName.Icon =LYFZ.Software.UI.Properties.Resources.login_inputbtn_normal;
}
protected virtual void stxtUserName_IconClick(object sender, EventArgs e)
{
if (this.sMenuStripId.Items.Count > 0)
{
stxtUserName.Icon = LYFZ.Software.UI.Properties.Resources.login_inputbtn_down;
}
this.sMenuStripId.Show(this.stxtUserName, 1, this.stxtUserName.Height + 1);
}
// private static string[] NickNameArray = { "刘超", "王剑峰", "湖海峰", "滕召禄", "张三", "李四", "王五", "小张", "王二小" };
protected virtual void frmLogin_Load(object sender, EventArgs e)
{
this.stxtPwd.BaseText.PasswordChar = '*';
this.stxtPwd.BaseText.UseSystemPasswordChar = true;
//this.sMenuStripId.Height += 220;
//for (int i = 0; i < 9; i++)
//{
// string testUserName = "Account00"+(1+i).ToString();
// string nickName =frmLogin.NickNameArray[i];
// ToolStripMenuItem item = new ToolStripMenuItem();
// item.AutoSize = false;
// item.Size = new System.Drawing.Size(182, 40);
// item.Text = nickName + "\r\n" + testUserName;
// item.Tag = new string[] { testUserName, nickName }; //Tag用于存储UserID 和 NickName
// item.Image = LYFZ.WinAPI.CustomPublicMethod.GetMenuItemImage("/Avatar/Tx" + (i+1).ToString() + ".png"); //根据ID获取头像
// item.Click += new EventHandler(toolStripMenuItemID_Click);
// ToolStripSeparator spItem = new ToolStripSeparator();
// this.sMenuStripId.Items.Add(item);
// this.sMenuStripId.Items.Add(spItem);
//}
}
#region toolStripMenuItemID_Click
//从帐号下拉列表中 选中某个登录帐号
protected virtual void toolStripMenuItemID_Click(object sender, EventArgs e)
{
// ToolStripMenuItem item = (ToolStripMenuItem)sender;
// string[] tag = (string[])item.Tag;
// stxtUserName.Text = tag[0];
//spalHead.BackgroundImage = item.Image;
}
#endregion
}
}