private void frmLogin_Load(object sender, EventArgs e) { se = new Sunisoft.IrisSkin.SkinEngine(); se.SkinFile = Application.StartupPath + @"\Skin\MP10.ssk"; //读取上次登录名 INIService ini = new INIService(); string _userName = ini.IniReadValue("LoginUser", "UserName", Application.StartupPath + "\\LastLogin.ini"); txt_UserName.Text = _userName; txt_UserName.Focus(); }
private void frmLogin_Load(object sender, EventArgs e) { // 设置皮肤 //se = new Sunisoft.IrisSkin.SkinEngine(); //se.SkinFile = Application.StartupPath + @"\Skin\MP10.ssk"; // 读取上次登录名 INIService ini = new INIService(); // 项目 Common 的 INIService 类(作用:用于初始化内容,例如读取上次的登录名) string _userName = ini.IniReadValue("LoginUser", "UserName", Application.StartupPath + "\\LastLogin.ini"); txt_UserName.Text = _userName; txt_UserName.Focus(); // 光标聚焦在用户名输入处 #region 测试用,跳过登录窗体 //Global.userName = "******"; //Global.IsAdmin = true; //frmIndex f = new frmIndex(); //this.Hide(); //f.ShowDialog(); #endregion }