public frmLogin() { InitializeComponent(); this.btnExit.Image = FWImageDic.EXIT_IMAGE16; this.btnConfig.Image = FWImageDic.CONFIG_IMAGE16; this.btnLogin.Image = FWImageDic.LOGIN_IMAGE16; this.Icon = FrameworkParams.ApplicationIcon; components = new System.ComponentModel.Container(); user = new User(); user.loadCookies(); txtUsername.EditValue = user.username; txtPassword.EditValue = user.password; if (user.savePass == "Y") chkRememberPwd.Checked = true; if (user.isAutoLogin == "Y") chkAutoLogin.Checked = true; if (chkAutoLogin.Checked) FrameworkParams.isSkipLogin = true; // init skin FrameworkParams.currentSkin = new PLSkin(this.components); FrameworkParams.option = new Option(); FrameworkParams.option.load(); Application.CurrentCulture = ApplyFormatAction.GetCultureInfo(); FrameworkParams.currentSkin.SelectSkin(HelpNumber.ParseInt32(FrameworkParams.option.Skin)); this.Shown += new EventHandler(frmLogin_Shown); }
public void initData() { user = new User(); user.loadCookies(); user.loadByUserName(); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); SplashScreen.SetCommentaryString("..Đang nạp giao diện."); this.btnExit.Image = FWImageDic.EXIT_IMAGE16; this.btnConfig.Image = FWImageDic.CONFIG_IMAGE16; this.btnLogin.Image = FWImageDic.LOGIN_IMAGE16; this.Icon = FrameworkParams.ApplicationIcon; components = new System.ComponentModel.Container(); user = new User(); user.loadCookies(); txtUsername.EditValue = user.username; txtPassword.EditValue = user.password; if (user.savePass == "Y") chkRememberPwd.Checked = true; if (user.isAutoLogin == "Y") chkAutoLogin.Checked = true; if (frmLoginInstance == null) { if (chkAutoLogin.Checked) FrameworkParams.isSkipLogin = true; frmLoginInstance = this; } // init skin if(FrameworkParams.UsingSkin == true) FrameworkParams.currentSkin = new DevExpressSkin(this.components); FrameworkParams.option = new Option(); FrameworkParams.option.load(); Application.CurrentCulture = ApplyFormatAction.GetCultureInfo(); if(FrameworkParams.currentSkin!=null) FrameworkParams.currentSkin.SelectSkin(HelpNumber.ParseInt32(FrameworkParams.option.Skin)); if (FrameworkParams.isSkipLogin==true) { SplashScreen.SetCommentaryString("..Đang xử lý đăng nhập tự động."); this.isDirect = true; this.LoginAction(); } }