FTP 服务器的安装和配置方法FTP 客户端的开发方法
源程序
using System;
using System.Collections.Generic; using http://www.77cn.com.cnponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text;
using System.Threading.Tasks; using System.IO; using http://www.77cn.com.cn;
using System.Windows.Forms;
namespace FTP_Client {
public partial class Form1 : Form {
private const int ftpport = 21; private string ftpUristring = null;
private NetworkCredential networkCredential; private string currentDir = "/"; public Form1() {
InitializeComponent();
IPAddress[] ips = Dns.GetHostAddresses(""); tbxServerIp.Text = ips[0].ToString(); tbxServerIp.SelectAll(); btnlogout.Enabled = false; lstbxFtpResources.Enabled = false; lstbxFtpState.Enabled = false; btnUpload.Enabled = false; btndownload.Enabled = false; btnDelete.Enabled = false; }
#region 键盘按下事件
private void tbxServerIp_KeyPress(object sender, KeyPressEventArgs e) {
// 输入用户名回车后,焦点直接转到密码文本框 if (e.KeyChar == (char)13) {