feat: 优化初始化缓存及控件功能

This commit is contained in:
cyf
2026-08-14 20:33:43 +08:00
parent 222ae3c08a
commit f665688d0b
27 changed files with 505 additions and 106 deletions
@@ -71,24 +71,24 @@ namespace NewMyFormDesigner
}
//DialogResult dr = MessageBox.Show("是否为达梦数据库?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
//if (dr == System.Windows.Forms.DialogResult.Yes)
//{
// if (!string.IsNullOrWhiteSpace(ServerName) && !string.IsNullOrWhiteSpace(DatabaseName) && !string.IsNullOrWhiteSpace(AccountNumber))
// {
// string connect = "Nzg5REZBQ0IzMjYzQkQzRTZFRTExNjY5MThCNjUwQTVFRUQyMDMxQzI5REIwODY5REIwMkVCQzQ4MTMzRDhDNEU1N0JFREI0MDM3MTQ1MDZGQzdGOEQxQTE4MkQ2QzgyNEE4RkMzRDQzQUM4MzgyOEQ2REZERTIzQzBDMjJGQUE=";
// string hostname = Environment.MachineName;
// if (!string.IsNullOrWhiteSpace(Password))
// {
// LinkString = string.Format("Server={0}; schema={1}; UserId={2}; PWD={3};host={4}", ServerName, DatabaseName, AccountNumber, Password, hostname);
// }
// else
// {
// LinkString = string.Format(Lskj.Util.AESUtil.Decrypt(connect), ServerName, DatabaseName, AccountNumber, hostname);
// }
// connectionType = ConnectionType.DmServer;
// }
//}
DialogResult dr = MessageBox.Show("是否为达梦数据库?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (dr == System.Windows.Forms.DialogResult.Yes)
{
if (!string.IsNullOrWhiteSpace(ServerName) && !string.IsNullOrWhiteSpace(DatabaseName) && !string.IsNullOrWhiteSpace(AccountNumber))
{
string connect = "Nzg5REZBQ0IzMjYzQkQzRTZFRTExNjY5MThCNjUwQTVFRUQyMDMxQzI5REIwODY5REIwMkVCQzQ4MTMzRDhDNEU1N0JFREI0MDM3MTQ1MDZGQzdGOEQxQTE4MkQ2QzgyNEE4RkMzRDQzQUM4MzgyOEQ2REZERTIzQzBDMjJGQUE=";
string hostname = Environment.MachineName;
if (!string.IsNullOrWhiteSpace(Password))
{
LinkString = string.Format("Server={0}; schema={1}; UserId={2}; PWD={3};host={4}", ServerName, DatabaseName, AccountNumber, Password, hostname);
}
else
{
LinkString = string.Format(Lskj.Util.AESUtil.Decrypt(connect), ServerName, DatabaseName, AccountNumber, hostname);
}
connectionType = ConnectionType.DmServer;
}
}
//MessageBox.Show(LinkString);