private void Onchange(object sender, EventArgs e) { txtDatabase.Items.Clear(); string servername = txtServer.Text; string username = txtUserName.Text; string password = txtPassWord.Text; if ((servername == "") || (username == "")) { return; } string[] database = sysprocess.Listdb(servername, username, password); if (database == null) { return; } txtDatabase.Items.Clear(); foreach (string str in database) { txtDatabase.Items.Add(str); } }