private void frm_login_Load(object sender, EventArgs e) { if (System.Environment.MachineName == "CMSISERVER") { ClassSql.ConnectSqlInstance(Properties.Settings.Default.InstanceName); } }
private void cmd_ok_Click(object sender, EventArgs e) { this.Close(); Properties.Settings.Default.InstanceName = txt_Instance.Text; Properties.Settings.Default.Save(); ClassSql.ConnectSqlInstance(Properties.Settings.Default.InstanceName); }