Esempio n. 1
0
        /// <summary>
        /// 窗体加载事件
        /// </summary>
        private void FrmLogin_Load(object sender, EventArgs e)
        {
            try
            {
                FrmLoginBLL.InitCboLanguage(cboLanguage);
                PSAP.BLL.BSBLL.BSBLL.language(this);
                string iniPath = AppDomain.CurrentDomain.SetupInformation.ApplicationBase.TrimEnd('\\') + "\\Config.ini";
                //txtUserID.Text = new FileHandler().IniReadValue(iniPath, "System", "LastLoginID");
                txtUserID.Text = new GetLangusgeSet().IniReadValue1(iniPath, "System", "LastLoginID");

                //cboLanguage.SelectedValue = new FileHandler().IniReadValue(iniPath, "System", "LastLanguage");
                cboLanguage.SelectedValue = new GetLangusgeSet().IniReadValue1(iniPath, "System", "LastLanguage");

                if (SystemInfo.LoginSavePwd)
                {
                    //string pwdStr = new FileHandler().IniReadValue(iniPath, "System", "LastLoginPwd");
                    string pwdStr = new GetLangusgeSet().IniReadValue1(iniPath, "System", "LastLoginPwd");

                    if (pwdStr != "")
                    {
                        txtPassword.Text = pwdStr;
                    }
                }
            }
            catch (Exception ex)
            {
                ExceptionHandler.HandleException(this.Text + "--窗体加载事件错误。", ex);
            }
        }
Esempio n. 2
0
        private void FrmLogin_Load(object sender, EventArgs e)
        {
            try
            {
                FrmLoginBLL.InitCboLanguage(cboLanguage);
                PSAP.BLL.BSBLL.BSBLL.language(this);
                string iniPath = AppDomain.CurrentDomain.SetupInformation.ApplicationBase.TrimEnd('\\') + "\\Config.ini";
                //txtUserID.Text = new FileHandler().IniReadValue(iniPath, "System", "LastLoginID");
                txtUserID.Text = new GetLangusgeSet().IniReadValue1(iniPath, "System", "LastLoginID");

                //cboLanguage.SelectedValue = new FileHandler().IniReadValue(iniPath, "System", "LastLanguage");
                cboLanguage.SelectedValue = new GetLangusgeSet().IniReadValue1(iniPath, "System", "LastLanguage");

                if (SystemInfo.LoginSavePwd)
                {
                    //string pwdStr = new FileHandler().IniReadValue(iniPath, "System", "LastLoginPwd");
                    string pwdStr = new GetLangusgeSet().IniReadValue1(iniPath, "System", "LastLoginPwd");

                    if (pwdStr != "")
                    {
                        txtPassword.Text = pwdStr;
                    }
                }
            }
            catch (Exception f)
            {
                //MessageBox.Show(f.Message, "用户登录", MessageBoxButtons.OK, MessageBoxIcon.Information);
                MessageBox.Show(f.Message, tsmiYhdl.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 获得窗口语种设定数据
        /// </summary>
        /// <param name="strFormName"></param>
        /// <returns></returns>
        public static DataTable GetFormLanuageData(string strFormName)
        {
            string iniPath  = AppDomain.CurrentDomain.SetupInformation.ApplicationBase.TrimEnd('\\') + "\\Config.ini";
            string language = new GetLangusgeSet().IniReadValue1(iniPath, "System", "LastLanguage");
            string sql      =
                "select AutoId,FormName,ControlsCategory,ControlsName,ControlsProperties," + language + " as LanguageText " +
                "from BS_LanguageSetting " +
                "where FormName like '" + strFormName + "'";
            DataTable dt = BaseSQL.GetTableBySql(sql);

            return(dt);
        }