private void buttonX2_Click(object sender, EventArgs e) { this.SaveConfig("sqlServerIPAddress", ip_serverip.Text); this.SaveConfig("sqlServerPort", int_port.Text); this.SaveConfig("dbUsername", tb_username.Text.Trim()); this.SaveConfig("dbPassword", SysUtil.EncryptDES(tb_password.Text, "quality")); ConfigurationManager.RefreshSection("appSettings"); frm_login login = new frm_login(); login.Show(); this.Close(); }