Ejemplo n.º 1
0
        private void btnSelect_Click(object sender, EventArgs e)
        {
            if (lstServerName.Items.Count == 1)
            {
                this.ServerName = ((Item)this.lstServerName.Items[0]).Value.ToString();
            }
            else
            {
                if (this.lstServerName.SelectedItems.Count == 0)
                {
                    return;
                }
                if (this.lstServerName.Items.Count > 1 && this.lstServerName.SelectedItems.Count != 0)
                {
                    this.ServerName = ((Item)lstServerName.SelectedItem).Value.ToString();
                }
                else
                {
                    this.ServerName = ((Item)this.lstServerName.Items[0]).Value.ToString();
                }
            }

            //Modify By Tany 2010-01-26 选择后修改默认连接
            ApiFunction.WriteIniString("SERVER_NAME", "NAME", ServerName, Constant.ApplicationDirectory + "\\ClientConfig.ini");

            this.DialogResult = DialogResult.OK;
            this.Close();
        }
Ejemplo n.º 2
0
 public override void SaveConfig(string[] args)
 {
     ApiFunction.WriteIniString(CONST_NODENAME, CONST_SERVERNAME, args[0], ClientWindowIni);
     ApiFunction.WriteIniString(CONST_NODENAME, CONST_DBNAME, args[1], ClientWindowIni);
     ApiFunction.WriteIniString(CONST_NODENAME, CONST_USERID, args[2], ClientWindowIni);
     ApiFunction.WriteIniString(CONST_NODENAME, CONST_PASSWORD, args[3], ClientWindowIni);
 }
Ejemplo n.º 3
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            //中文
            ApiFunction.WriteIniString("INPUTLANGUAGE_CN", "N" + loginCode, cboChineseIL.Text, Constant.ApplicationDirectory + "//UserCustomSetting.ini");
            //英文
            ApiFunction.WriteIniString("INPUTLANGUAGE_EN", "N" + loginCode, cboEnglishIL.Text, Constant.ApplicationDirectory + "//UserCustomSetting.ini");

            this.Close( );
        }
Ejemplo n.º 4
0
        private void rdomh_CheckedChanged(object sender, EventArgs e)
        {
            string cxfs = "前导查询";

            if (rdomh.Checked == true)
            {
                cxfs = "模糊查询";
            }
            ApiFunction.WriteIniString(TrasenFrame.Forms.FrmMdiMain.CurrentUser.EmployeeId.ToString(), "输入框查询方式", cxfs, Constant.ApplicationDirectory + "\\ClientWindow.ini");
        }
Ejemplo n.º 5
0
 /// <summary>
 /// 写配置值 jianqg 2012-8-8 增加 处理 非外部设备等
 /// </summary>
 /// <param name="lpKeyName"></param>
 /// <param name="lpString"></param>
 /// <returns></returns>
 public static void SetClientConfig(string lpKeyName, string lpString)
 {
     ApiFunction.WriteIniString("CUSTOMSETTING" + CurrentUserId, lpKeyName, Crypto.Instance().Encrypto(lpString), CustomDirectory + "\\ClientConfig.ini");
 }