예제 #1
0
 private void frmConfig_Load(object sender, EventArgs e)
 {
     DBUtility.ConfigHelper.DBConn dc = DBUtility.ConfigHelper.GetDBConfig(Application.StartupPath + "\\Config.xml");
     txtServer.Text    = dc.Server;
     txtPort.Text      = dc.Port;
     txtUID.Text       = dc.UID;
     txtPWD.Text       = dc.PWD;
     cbbDatabases.Text = dc.Database;
 }
예제 #2
0
 private void btnOK_Click(object sender, EventArgs e)
 {
     DBUtility.ConfigHelper.DBConn dc = new DBUtility.ConfigHelper.DBConn();
     dc.Server   = txtServer.Text;
     dc.Port     = txtPort.Text;
     dc.Database = cbbDatabases.Text;
     dc.UID      = txtUID.Text;
     dc.PWD      = txtPWD.Text;
     DBUtility.ConfigHelper.WriteDBConfig(Application.StartupPath + "\\Config.xml", dc);
     DialogResult = DialogResult.OK;
     Close();
 }