//发送命令到serv-u ftp private void btnServUSendCmd_Click(object sender, EventArgs e) { try { btnServUSendCmd.Enabled = false; Application.DoEvents(); //var connection = this.Get134Connection(); byte[] data = serv_u_ftpconnection.SendCmd(this.txtServUCmd.Text); //connection.Close(); string content = System.Text.Encoding.UTF8.GetString(data, 0, data.Length); Console.WriteLine(content); } catch (Exception ex) { Console.WriteLine(ex.Message); } finally { this.btnServUSendCmd.Enabled = true; } }