private void ShowTestResult(bool flag) { FormLoading.EndLoading(); if (flag) { string _connString = Secret.Encrypt3DES(connString, LocalVariable.Key); if (ConfigManager.SaveConnString(ConfigConst.ConnectionManageString, _connString, ConfigConst.ConfigPath) && ConfigManager.SaveConnString(ConfigConst.ConnectionStringWrite, _connString, ConfigConst.ConfigPath) && ConfigManager.SaveConnString(ConfigConst.ConnectionStringReadonly, _connString, ConfigConst.ConfigPath) && ConfigManager.SaveConnString(ConfigConst.ConStrManageSql, _connString, ConfigConst.ConfigPath)) { LocalVariable.SetConnStringValue(ConfigConst.ConnectionManageString, connString); LocalVariable.SetConnStringValue(ConfigConst.ConnectionStringWrite, connString); LocalVariable.SetConnStringValue(ConfigConst.ConnectionStringReadonly, connString); LocalVariable.SetConnStringValue(ConfigConst.ConStrManageSql, connString); FormMessgeBox.ShowMsg(this, "测试成功,并保存!", this.panelTop.BackColor); this.myLock = true; this.Close(); } else { FormMessgeBox.ShowMsg(this, "测试成功,但保存失败!", this.panelTop.BackColor); } } else { FormMessgeBox.ShowMsg(this, "测试失败!", this.panelTop.BackColor); } this.myLock = true; }