亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

基于C#實(shí)現(xiàn)FTP下載文件

 更新時(shí)間:2022年12月26日 09:48:07   作者:芝麻粒兒  
這篇文章主要為大家詳細(xì)介紹了如何利用C#實(shí)現(xiàn)FTP下載文件,文中的示例代碼講解詳細(xì),對(duì)我們學(xué)習(xí)C#有一定的幫助,感興趣的小伙伴可以跟隨小編一起了解一下

實(shí)踐過(guò)程

效果

代碼

public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            FtpWebRequest ftpRequest = (FtpWebRequest)WebRequest.Create(textBox1.Text);
            ftpRequest.Credentials = new NetworkCredential(textBox2.Text,textBox3.Text);
            FtpWebResponse ftpResponse = (FtpWebResponse)ftpRequest.GetResponse();
            Stream data = ftpResponse.GetResponseStream();
            string str = textBox1.Text.Substring(textBox1.Text.LastIndexOf("/"), textBox1.Text.Length - textBox1.Text.LastIndexOf("/"));
            string SavePath = str;
            if (File.Exists(SavePath))
            {
                File.Delete(str);
            }
            byte[] buffer = new byte[4096];
            FileStream stream  =new FileStream(SavePath,FileMode.Create);
            int count = 0;
            do
            {
                count = data.Read(buffer, 0, buffer.Length);
                if (count > 0)
                {
                    stream.Write(buffer, 0, count);
                }
            }
            while (count > 0);
            ftpResponse.Close();
            stream.Close();
        }
    }
partial class Form1
{
    /// <summary>
    /// 必需的設(shè)計(jì)器變量。
    /// </summary>
    private System.ComponentModel.IContainer components = null;

    /// <summary>
    /// 清理所有正在使用的資源。
    /// </summary>
    /// <param name="disposing">如果應(yīng)釋放托管資源,為 true;否則為 false。</param>
    protected override void Dispose(bool disposing)
    {
        if (disposing && (components != null))
        {
            components.Dispose();
        }
        base.Dispose(disposing);
    }

    #region Windows 窗體設(shè)計(jì)器生成的代碼

    /// <summary>
    /// 設(shè)計(jì)器支持所需的方法 - 不要
    /// 使用代碼編輯器修改此方法的內(nèi)容。
    /// </summary>
    private void InitializeComponent()
    {
        System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
        this.button1 = new System.Windows.Forms.Button();
        this.textBox1 = new System.Windows.Forms.TextBox();
        this.label1 = new System.Windows.Forms.Label();
        this.label2 = new System.Windows.Forms.Label();
        this.textBox2 = new System.Windows.Forms.TextBox();
        this.label3 = new System.Windows.Forms.Label();
        this.textBox3 = new System.Windows.Forms.TextBox();
        this.toolStrip1 = new System.Windows.Forms.ToolStrip();
        this.新建NToolStripButton = new System.Windows.Forms.ToolStripButton();
        this.打開(kāi)OToolStripButton = new System.Windows.Forms.ToolStripButton();
        this.保存SToolStripButton = new System.Windows.Forms.ToolStripButton();
        this.打印PToolStripButton = new System.Windows.Forms.ToolStripButton();
        this.toolStripSeparator = new System.Windows.Forms.ToolStripSeparator();
        this.剪切UToolStripButton = new System.Windows.Forms.ToolStripButton();
        this.復(fù)制CToolStripButton = new System.Windows.Forms.ToolStripButton();
        this.粘貼PToolStripButton = new System.Windows.Forms.ToolStripButton();
        this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
        this.幫助LToolStripButton = new System.Windows.Forms.ToolStripButton();
        this.menuStrip1 = new System.Windows.Forms.MenuStrip();
        this.文件FToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.新建NToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.打開(kāi)OToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
        this.保存SToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.另存為AToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
        this.打印PToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.打印預(yù)覽VToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
        this.退出XToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.編輯EToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.撤消UToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.重復(fù)RToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
        this.剪切TToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.復(fù)制CToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.粘貼PToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();
        this.全選AToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.工具TToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.自定義CToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.選項(xiàng)OToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.幫助HToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.內(nèi)容CToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.索引IToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.搜索SToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator();
        this.關(guān)于AToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.toolStrip1.SuspendLayout();
        this.menuStrip1.SuspendLayout();
        this.SuspendLayout();
        // 
        // button1
        // 
        this.button1.Location = new System.Drawing.Point(178, 162);
        this.button1.Name = "button1";
        this.button1.Size = new System.Drawing.Size(75, 23);
        this.button1.TabIndex = 0;
        this.button1.Text = "下載";
        this.button1.UseVisualStyleBackColor = true;
        this.button1.Click += new System.EventHandler(this.button1_Click);
        // 
        // textBox1
        // 
        this.textBox1.Location = new System.Drawing.Point(108, 76);
        this.textBox1.Name = "textBox1";
        this.textBox1.Size = new System.Drawing.Size(145, 21);
        this.textBox1.TabIndex = 1;
        // 
        // label1
        // 
        this.label1.AutoSize = true;
        this.label1.Location = new System.Drawing.Point(21, 79);
        this.label1.Name = "label1";
        this.label1.Size = new System.Drawing.Size(83, 12);
        this.label1.TabIndex = 2;
        this.label1.Text = "FTP服務(wù)器路徑";
        // 
        // label2
        // 
        this.label2.AutoSize = true;
        this.label2.Location = new System.Drawing.Point(7, 106);
        this.label2.Name = "label2";
        this.label2.Size = new System.Drawing.Size(95, 12);
        this.label2.TabIndex = 4;
        this.label2.Text = "FTP服務(wù)器用戶名";
        // 
        // textBox2
        // 
        this.textBox2.Location = new System.Drawing.Point(108, 103);
        this.textBox2.Name = "textBox2";
        this.textBox2.Size = new System.Drawing.Size(145, 21);
        this.textBox2.TabIndex = 3;
        // 
        // label3
        // 
        this.label3.AutoSize = true;
        this.label3.Location = new System.Drawing.Point(21, 133);
        this.label3.Name = "label3";
        this.label3.Size = new System.Drawing.Size(83, 12);
        this.label3.TabIndex = 6;
        this.label3.Text = "FTP服務(wù)器密碼";
        // 
        // textBox3
        // 
        this.textBox3.Location = new System.Drawing.Point(108, 130);
        this.textBox3.Name = "textBox3";
        this.textBox3.Size = new System.Drawing.Size(145, 21);
        this.textBox3.TabIndex = 5;
        // 
        // toolStrip1
        // 
        this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
        this.新建NToolStripButton,
        this.打開(kāi)OToolStripButton,
        this.保存SToolStripButton,
        this.打印PToolStripButton,
        this.toolStripSeparator,
        this.剪切UToolStripButton,
        this.復(fù)制CToolStripButton,
        this.粘貼PToolStripButton,
        this.toolStripSeparator1,
        this.幫助LToolStripButton});
        this.toolStrip1.Location = new System.Drawing.Point(0, 24);
        this.toolStrip1.Name = "toolStrip1";
        this.toolStrip1.Size = new System.Drawing.Size(276, 25);
        this.toolStrip1.TabIndex = 7;
        this.toolStrip1.Text = "toolStrip1";
        // 
        // 新建NToolStripButton
        // 
        this.新建NToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
        this.新建NToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("新建NToolStripButton.Image")));
        this.新建NToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.新建NToolStripButton.Name = "新建NToolStripButton";
        this.新建NToolStripButton.Size = new System.Drawing.Size(23, 22);
        this.新建NToolStripButton.Text = "新建(&N)";
        // 
        // 打開(kāi)OToolStripButton
        // 
        this.打開(kāi)OToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
        this.打開(kāi)OToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("打開(kāi)OToolStripButton.Image")));
        this.打開(kāi)OToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.打開(kāi)OToolStripButton.Name = "打開(kāi)OToolStripButton";
        this.打開(kāi)OToolStripButton.Size = new System.Drawing.Size(23, 22);
        this.打開(kāi)OToolStripButton.Text = "打開(kāi)(&O)";
        // 
        // 保存SToolStripButton
        // 
        this.保存SToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
        this.保存SToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("保存SToolStripButton.Image")));
        this.保存SToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.保存SToolStripButton.Name = "保存SToolStripButton";
        this.保存SToolStripButton.Size = new System.Drawing.Size(23, 22);
        this.保存SToolStripButton.Text = "保存(&S)";
        // 
        // 打印PToolStripButton
        // 
        this.打印PToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
        this.打印PToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("打印PToolStripButton.Image")));
        this.打印PToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.打印PToolStripButton.Name = "打印PToolStripButton";
        this.打印PToolStripButton.Size = new System.Drawing.Size(23, 22);
        this.打印PToolStripButton.Text = "打印(&P)";
        // 
        // toolStripSeparator
        // 
        this.toolStripSeparator.Name = "toolStripSeparator";
        this.toolStripSeparator.Size = new System.Drawing.Size(6, 25);
        // 
        // 剪切UToolStripButton
        // 
        this.剪切UToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
        this.剪切UToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("剪切UToolStripButton.Image")));
        this.剪切UToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.剪切UToolStripButton.Name = "剪切UToolStripButton";
        this.剪切UToolStripButton.Size = new System.Drawing.Size(23, 22);
        this.剪切UToolStripButton.Text = "剪切(&U)";
        // 
        // 復(fù)制CToolStripButton
        // 
        this.復(fù)制CToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
        this.復(fù)制CToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("復(fù)制CToolStripButton.Image")));
        this.復(fù)制CToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.復(fù)制CToolStripButton.Name = "復(fù)制CToolStripButton";
        this.復(fù)制CToolStripButton.Size = new System.Drawing.Size(23, 22);
        this.復(fù)制CToolStripButton.Text = "復(fù)制(&C)";
        // 
        // 粘貼PToolStripButton
        // 
        this.粘貼PToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
        this.粘貼PToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("粘貼PToolStripButton.Image")));
        this.粘貼PToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.粘貼PToolStripButton.Name = "粘貼PToolStripButton";
        this.粘貼PToolStripButton.Size = new System.Drawing.Size(23, 22);
        this.粘貼PToolStripButton.Text = "粘貼(&P)";
        // 
        // toolStripSeparator1
        // 
        this.toolStripSeparator1.Name = "toolStripSeparator1";
        this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
        // 
        // 幫助LToolStripButton
        // 
        this.幫助LToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
        this.幫助LToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("幫助LToolStripButton.Image")));
        this.幫助LToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.幫助LToolStripButton.Name = "幫助LToolStripButton";
        this.幫助LToolStripButton.Size = new System.Drawing.Size(23, 22);
        this.幫助LToolStripButton.Text = "幫助(&L)";
        // 
        // menuStrip1
        // 
        this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
        this.文件FToolStripMenuItem,
        this.編輯EToolStripMenuItem,
        this.工具TToolStripMenuItem,
        this.幫助HToolStripMenuItem});
        this.menuStrip1.Location = new System.Drawing.Point(0, 0);
        this.menuStrip1.Name = "menuStrip1";
        this.menuStrip1.Size = new System.Drawing.Size(276, 24);
        this.menuStrip1.TabIndex = 8;
        this.menuStrip1.Text = "menuStrip1";
        // 
        // 文件FToolStripMenuItem
        // 
        this.文件FToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
        this.新建NToolStripMenuItem,
        this.打開(kāi)OToolStripMenuItem,
        this.toolStripSeparator2,
        this.保存SToolStripMenuItem,
        this.另存為AToolStripMenuItem,
        this.toolStripSeparator3,
        this.打印PToolStripMenuItem,
        this.打印預(yù)覽VToolStripMenuItem,
        this.toolStripSeparator4,
        this.退出XToolStripMenuItem});
        this.文件FToolStripMenuItem.Name = "文件FToolStripMenuItem";
        this.文件FToolStripMenuItem.Size = new System.Drawing.Size(59, 20);
        this.文件FToolStripMenuItem.Text = "文件(&F)";
        // 
        // 新建NToolStripMenuItem
        // 
        this.新建NToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("新建NToolStripMenuItem.Image")));
        this.新建NToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.新建NToolStripMenuItem.Name = "新建NToolStripMenuItem";
        this.新建NToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
        this.新建NToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
        this.新建NToolStripMenuItem.Text = "新建(&N)";
        // 
        // 打開(kāi)OToolStripMenuItem
        // 
        this.打開(kāi)OToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("打開(kāi)OToolStripMenuItem.Image")));
        this.打開(kāi)OToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.打開(kāi)OToolStripMenuItem.Name = "打開(kāi)OToolStripMenuItem";
        this.打開(kāi)OToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
        this.打開(kāi)OToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
        this.打開(kāi)OToolStripMenuItem.Text = "打開(kāi)(&O)";
        // 
        // toolStripSeparator2
        // 
        this.toolStripSeparator2.Name = "toolStripSeparator2";
        this.toolStripSeparator2.Size = new System.Drawing.Size(150, 6);
        // 
        // 保存SToolStripMenuItem
        // 
        this.保存SToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("保存SToolStripMenuItem.Image")));
        this.保存SToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.保存SToolStripMenuItem.Name = "保存SToolStripMenuItem";
        this.保存SToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
        this.保存SToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
        this.保存SToolStripMenuItem.Text = "保存(&S)";
        // 
        // 另存為AToolStripMenuItem
        // 
        this.另存為AToolStripMenuItem.Name = "另存為AToolStripMenuItem";
        this.另存為AToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
        this.另存為AToolStripMenuItem.Text = "另存為(&A)";
        // 
        // toolStripSeparator3
        // 
        this.toolStripSeparator3.Name = "toolStripSeparator3";
        this.toolStripSeparator3.Size = new System.Drawing.Size(150, 6);
        // 
        // 打印PToolStripMenuItem
        // 
        this.打印PToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("打印PToolStripMenuItem.Image")));
        this.打印PToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.打印PToolStripMenuItem.Name = "打印PToolStripMenuItem";
        this.打印PToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.P)));
        this.打印PToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
        this.打印PToolStripMenuItem.Text = "打印(&P)";
        // 
        // 打印預(yù)覽VToolStripMenuItem
        // 
        this.打印預(yù)覽VToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("打印預(yù)覽VToolStripMenuItem.Image")));
        this.打印預(yù)覽VToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.打印預(yù)覽VToolStripMenuItem.Name = "打印預(yù)覽VToolStripMenuItem";
        this.打印預(yù)覽VToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
        this.打印預(yù)覽VToolStripMenuItem.Text = "打印預(yù)覽(&V)";
        // 
        // toolStripSeparator4
        // 
        this.toolStripSeparator4.Name = "toolStripSeparator4";
        this.toolStripSeparator4.Size = new System.Drawing.Size(150, 6);
        // 
        // 退出XToolStripMenuItem
        // 
        this.退出XToolStripMenuItem.Name = "退出XToolStripMenuItem";
        this.退出XToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
        this.退出XToolStripMenuItem.Text = "退出(&X)";
        // 
        // 編輯EToolStripMenuItem
        // 
        this.編輯EToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
        this.撤消UToolStripMenuItem,
        this.重復(fù)RToolStripMenuItem,
        this.toolStripSeparator5,
        this.剪切TToolStripMenuItem,
        this.復(fù)制CToolStripMenuItem,
        this.粘貼PToolStripMenuItem,
        this.toolStripSeparator6,
        this.全選AToolStripMenuItem});
        this.編輯EToolStripMenuItem.Name = "編輯EToolStripMenuItem";
        this.編輯EToolStripMenuItem.Size = new System.Drawing.Size(59, 20);
        this.編輯EToolStripMenuItem.Text = "編輯(&E)";
        // 
        // 撤消UToolStripMenuItem
        // 
        this.撤消UToolStripMenuItem.Name = "撤消UToolStripMenuItem";
        this.撤消UToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z)));
        this.撤消UToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
        this.撤消UToolStripMenuItem.Text = "撤消(&U)";
        // 
        // 重復(fù)RToolStripMenuItem
        // 
        this.重復(fù)RToolStripMenuItem.Name = "重復(fù)RToolStripMenuItem";
        this.重復(fù)RToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y)));
        this.重復(fù)RToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
        this.重復(fù)RToolStripMenuItem.Text = "重復(fù)(&R)";
        // 
        // toolStripSeparator5
        // 
        this.toolStripSeparator5.Name = "toolStripSeparator5";
        this.toolStripSeparator5.Size = new System.Drawing.Size(150, 6);
        // 
        // 剪切TToolStripMenuItem
        // 
        this.剪切TToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("剪切TToolStripMenuItem.Image")));
        this.剪切TToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.剪切TToolStripMenuItem.Name = "剪切TToolStripMenuItem";
        this.剪切TToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X)));
        this.剪切TToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
        this.剪切TToolStripMenuItem.Text = "剪切(&T)";
        // 
        // 復(fù)制CToolStripMenuItem
        // 
        this.復(fù)制CToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("復(fù)制CToolStripMenuItem.Image")));
        this.復(fù)制CToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.復(fù)制CToolStripMenuItem.Name = "復(fù)制CToolStripMenuItem";
        this.復(fù)制CToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C)));
        this.復(fù)制CToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
        this.復(fù)制CToolStripMenuItem.Text = "復(fù)制(&C)";
        // 
        // 粘貼PToolStripMenuItem
        // 
        this.粘貼PToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("粘貼PToolStripMenuItem.Image")));
        this.粘貼PToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.粘貼PToolStripMenuItem.Name = "粘貼PToolStripMenuItem";
        this.粘貼PToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V)));
        this.粘貼PToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
        this.粘貼PToolStripMenuItem.Text = "粘貼(&P)";
        // 
        // toolStripSeparator6
        // 
        this.toolStripSeparator6.Name = "toolStripSeparator6";
        this.toolStripSeparator6.Size = new System.Drawing.Size(150, 6);
        // 
        // 全選AToolStripMenuItem
        // 
        this.全選AToolStripMenuItem.Name = "全選AToolStripMenuItem";
        this.全選AToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
        this.全選AToolStripMenuItem.Text = "全選(&A)";
        // 
        // 工具TToolStripMenuItem
        // 
        this.工具TToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
        this.自定義CToolStripMenuItem,
        this.選項(xiàng)OToolStripMenuItem});
        this.工具TToolStripMenuItem.Name = "工具TToolStripMenuItem";
        this.工具TToolStripMenuItem.Size = new System.Drawing.Size(59, 20);
        this.工具TToolStripMenuItem.Text = "工具(&T)";
        // 
        // 自定義CToolStripMenuItem
        // 
        this.自定義CToolStripMenuItem.Name = "自定義CToolStripMenuItem";
        this.自定義CToolStripMenuItem.Size = new System.Drawing.Size(124, 22);
        this.自定義CToolStripMenuItem.Text = "自定義(&C)";
        // 
        // 選項(xiàng)OToolStripMenuItem
        // 
        this.選項(xiàng)OToolStripMenuItem.Name = "選項(xiàng)OToolStripMenuItem";
        this.選項(xiàng)OToolStripMenuItem.Size = new System.Drawing.Size(124, 22);
        this.選項(xiàng)OToolStripMenuItem.Text = "選項(xiàng)(&O)";
        // 
        // 幫助HToolStripMenuItem
        // 
        this.幫助HToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
        this.內(nèi)容CToolStripMenuItem,
        this.索引IToolStripMenuItem,
        this.搜索SToolStripMenuItem,
        this.toolStripSeparator7,
        this.關(guān)于AToolStripMenuItem});
        this.幫助HToolStripMenuItem.Name = "幫助HToolStripMenuItem";
        this.幫助HToolStripMenuItem.Size = new System.Drawing.Size(59, 20);
        this.幫助HToolStripMenuItem.Text = "幫助(&H)";
        // 
        // 內(nèi)容CToolStripMenuItem
        // 
        this.內(nèi)容CToolStripMenuItem.Name = "內(nèi)容CToolStripMenuItem";
        this.內(nèi)容CToolStripMenuItem.Size = new System.Drawing.Size(130, 22);
        this.內(nèi)容CToolStripMenuItem.Text = "內(nèi)容(&C)";
        // 
        // 索引IToolStripMenuItem
        // 
        this.索引IToolStripMenuItem.Name = "索引IToolStripMenuItem";
        this.索引IToolStripMenuItem.Size = new System.Drawing.Size(130, 22);
        this.索引IToolStripMenuItem.Text = "索引(&I)";
        // 
        // 搜索SToolStripMenuItem
        // 
        this.搜索SToolStripMenuItem.Name = "搜索SToolStripMenuItem";
        this.搜索SToolStripMenuItem.Size = new System.Drawing.Size(130, 22);
        this.搜索SToolStripMenuItem.Text = "搜索(&S)";
        // 
        // toolStripSeparator7
        // 
        this.toolStripSeparator7.Name = "toolStripSeparator7";
        this.toolStripSeparator7.Size = new System.Drawing.Size(127, 6);
        // 
        // 關(guān)于AToolStripMenuItem
        // 
        this.關(guān)于AToolStripMenuItem.Name = "關(guān)于AToolStripMenuItem";
        this.關(guān)于AToolStripMenuItem.Size = new System.Drawing.Size(130, 22);
        this.關(guān)于AToolStripMenuItem.Text = "關(guān)于(&A)...";
        // 
        // Form1
        // 
        this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
        this.ClientSize = new System.Drawing.Size(276, 197);
        this.Controls.Add(this.toolStrip1);
        this.Controls.Add(this.menuStrip1);
        this.Controls.Add(this.label3);
        this.Controls.Add(this.textBox3);
        this.Controls.Add(this.label2);
        this.Controls.Add(this.textBox2);
        this.Controls.Add(this.label1);
        this.Controls.Add(this.textBox1);
        this.Controls.Add(this.button1);
        this.MainMenuStrip = this.menuStrip1;
        this.Name = "Form1";
        this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
        this.Text = "從FTP下載文件";
        this.toolStrip1.ResumeLayout(false);
        this.toolStrip1.PerformLayout();
        this.menuStrip1.ResumeLayout(false);
        this.menuStrip1.PerformLayout();
        this.ResumeLayout(false);
        this.PerformLayout();

    }

    #endregion

    private System.Windows.Forms.Button button1;
    private System.Windows.Forms.TextBox textBox1;
    private System.Windows.Forms.Label label1;
    private System.Windows.Forms.Label label2;
    private System.Windows.Forms.TextBox textBox2;
    private System.Windows.Forms.Label label3;
    private System.Windows.Forms.TextBox textBox3;
    private System.Windows.Forms.ToolStrip toolStrip1;
    private System.Windows.Forms.ToolStripButton 新建NToolStripButton;
    private System.Windows.Forms.ToolStripButton 打開(kāi)OToolStripButton;
    private System.Windows.Forms.ToolStripButton 保存SToolStripButton;
    private System.Windows.Forms.ToolStripButton 打印PToolStripButton;
    private System.Windows.Forms.ToolStripSeparator toolStripSeparator;
    private System.Windows.Forms.ToolStripButton 剪切UToolStripButton;
    private System.Windows.Forms.ToolStripButton 復(fù)制CToolStripButton;
    private System.Windows.Forms.ToolStripButton 粘貼PToolStripButton;
    private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
    private System.Windows.Forms.ToolStripButton 幫助LToolStripButton;
    private System.Windows.Forms.MenuStrip menuStrip1;
    private System.Windows.Forms.ToolStripMenuItem 文件FToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 新建NToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 打開(kāi)OToolStripMenuItem;
    private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
    private System.Windows.Forms.ToolStripMenuItem 保存SToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 另存為AToolStripMenuItem;
    private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
    private System.Windows.Forms.ToolStripMenuItem 打印PToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 打印預(yù)覽VToolStripMenuItem;
    private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
    private System.Windows.Forms.ToolStripMenuItem 退出XToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 編輯EToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 撤消UToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 重復(fù)RToolStripMenuItem;
    private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
    private System.Windows.Forms.ToolStripMenuItem 剪切TToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 復(fù)制CToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 粘貼PToolStripMenuItem;
    private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
    private System.Windows.Forms.ToolStripMenuItem 全選AToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 工具TToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 自定義CToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 選項(xiàng)OToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 幫助HToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 內(nèi)容CToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 索引IToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 搜索SToolStripMenuItem;
    private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
    private System.Windows.Forms.ToolStripMenuItem 關(guān)于AToolStripMenuItem;
}

以上就是基于C#實(shí)現(xiàn)FTP下載文件的詳細(xì)內(nèi)容,更多關(guān)于C# FTP下載文件的資料請(qǐng)關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

  • C#實(shí)現(xiàn)洗牌算法

    C#實(shí)現(xiàn)洗牌算法

    洗牌算法的要求是這樣的:將N個(gè)數(shù)亂序后輸出.由于和撲克牌的洗牌過(guò)程比較相似所以我也就稱(chēng)為洗牌算法了.很多地方都不自覺(jué)的需要這個(gè)算法的支持.也可以將這個(gè)算法擴(kuò)展為從N個(gè)數(shù)中取出M個(gè)不重復(fù)的數(shù)(0<M<=N).今天我們看下如何用C#來(lái)實(shí)現(xiàn)
    2015-03-03
  • C#中Ilist與list的區(qū)別小結(jié)

    C#中Ilist與list的區(qū)別小結(jié)

    本篇文章主要是對(duì)C#中Ilist與list的區(qū)別進(jìn)行了詳細(xì)的總結(jié)介紹,需要的朋友可以過(guò)來(lái)參考下,希望對(duì)大家有所幫助
    2014-01-01
  • 淺析WPF中控件拖拽與拖動(dòng)的實(shí)現(xiàn)

    淺析WPF中控件拖拽與拖動(dòng)的實(shí)現(xiàn)

    這篇文章主要為大家詳細(xì)介紹了如何在WPF中實(shí)現(xiàn)控件拖拽與拖動(dòng)的功能,文中的示例代碼講解詳細(xì),感興趣的小伙伴可以跟隨小編一起學(xué)習(xí)一下
    2023-12-12
  • 使用C# 的webBrowser寫(xiě)模擬器時(shí)的javascript腳本調(diào)用問(wèn)題

    使用C# 的webBrowser寫(xiě)模擬器時(shí)的javascript腳本調(diào)用問(wèn)題

    這篇文章主要介紹了C# 的webBrowser寫(xiě)模擬器時(shí)的javascript腳本調(diào)用問(wèn)題,需要的朋友可以參考下
    2017-07-07
  • C#讀取數(shù)據(jù)庫(kù)返回泛型集合詳解(DataSetToList)

    C#讀取數(shù)據(jù)庫(kù)返回泛型集合詳解(DataSetToList)

    本篇文章主要是對(duì)C#讀取數(shù)據(jù)庫(kù)返回泛型集合(DataSetToList)進(jìn)行了介紹,需要的朋友可以過(guò)來(lái)參考下,希望對(duì)大家有所幫助
    2014-01-01
  • C# 實(shí)現(xiàn)Eval(字符串表達(dá)式)的三種方法

    C# 實(shí)現(xiàn)Eval(字符串表達(dá)式)的三種方法

    這篇文章主要介紹了C# 實(shí)現(xiàn)Eval(字符串表達(dá)式)的三種方法,幫助大家更好的理解和學(xué)習(xí)使用c#,感興趣的朋友可以了解下
    2021-04-04
  • C#通過(guò)指針讀取文件的方法

    C#通過(guò)指針讀取文件的方法

    這篇文章主要介紹了C#通過(guò)指針讀取文件的方法,涉及C#針對(duì)文件的相關(guān)操作技巧,需要的朋友可以參考下
    2015-06-06
  • C#生成比較短的Token字符串

    C#生成比較短的Token字符串

    這篇文章介紹了C#生成Token字符串的方法,文中通過(guò)示例代碼介紹的非常詳細(xì)。對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2022-06-06
  • 史上最簡(jiǎn)潔C# 生成條形碼圖片思路及示例分享

    史上最簡(jiǎn)潔C# 生成條形碼圖片思路及示例分享

    這篇文章主要介紹了史上最簡(jiǎn)潔C# 生成條形碼圖片思路及示例分享,需要的朋友可以參考下
    2015-01-01
  • C#怎么實(shí)現(xiàn)手機(jī)短信發(fā)送功能

    C#怎么實(shí)現(xiàn)手機(jī)短信發(fā)送功能

    為了個(gè)人信息的安全,很多網(wǎng)站都有短信發(fā)送的功能,究竟是怎么實(shí)現(xiàn)的呢?對(duì)于個(gè)人站長(zhǎng)來(lái)說(shuō)的話,通過(guò)使用sms短信通知api接口相對(duì)比較簡(jiǎn)單,下面小編給大家介紹具體實(shí)現(xiàn)過(guò)程,對(duì)c#怎么實(shí)現(xiàn)手機(jī)短信發(fā)送功能感興趣的朋友一起學(xué)習(xí)吧
    2015-12-12

最新評(píng)論