private void ServerConnConfiguration_Load(object sender, EventArgs e) { string fileName = "ConnConfig.ini"; string pathStr = Application.StartupPath + "\\" + fileName; //INI文件的物理地址 if (File.Exists(pathStr)) { string[] str = IniFileConfigurer.Load(); txtBox_ServerIp.Text = str[0].Trim(); txtBox_DbName.Text = str[1].Trim(); txtBox_LoginUser.Text = str[2].Trim(); txtBox_Passwd.Text = str[3].Trim(); } else { //MessageBox.Show("配置文件不存在,请创建数据库服务器连接配置文件。", // "信息", MessageBoxButtons.OK, MessageBoxIcon.Information); this.btn_Modify.Text = "创建"; } }