Beispiel #1
0
        private void saveInstallConfigToConfigXML()
        {
            // 设置修改 绝对路径的保存设置。
            string dataFolder = "";

            try
            {
                setDB db = new setDB("system", startconfig.DB_Password, startconfig.DB_Datasource);
                dataFolder = db.getDataFolder();
            }
            catch (Exception eg)
            {
                MessageBox.Show("链接不上数据库,请检查参数和配置!", "错误");
            }

            set.setInstallSet(startconfig.APP_IP, startconfig.MainFolder, startconfig.DB_IP, startconfig.DB_Datasource, startconfig.DB_Password, dataFolder);
            saveConfigXML();
            laodConfigXML();
        }
Beispiel #2
0
 private void checkDefault_CheckedChanged(object sender, EventArgs e)
 {
     if (this.checkDefault.Checked == true)
     {
         try
         {
             setDB db = new setDB(dbsystemuserset.User, dbsystemuserset.Password, this.datasource.Text);
             this.datafolder.Text = db.getDataFolder();
         }
         catch (Exception eg)
         {
             setMessage.MessageShow("", "链接不上数据库,请检查参数和配置!", this.checkDefault);
             this.checkDefault.Checked = false;
             return;
         }
     }
     else
     {
         this.datafolder.Text = "";
     }
 }