C#语言实例源码系列-实现FTP下载文件

news2024/10/6 5:56:53
专栏分享
  • 点击跳转=>Unity3D特效百例
  • 点击跳转=>案例项目实战源码
  • 点击跳转=>游戏脚本-辅助自动化
  • 点击跳转=>Android控件全解手册

👉关于作者

众所周知,人生是一个漫长的流程,不断克服困难,不断反思前进的过程。在这个过程中会产生很多对于人生的质疑和思考,于是我决定将自己的思考,经验和故事全部分享出来,以此寻找共鸣 !!!
专注于Android/Unity和各种游戏开发技巧,以及各种资源分享(网站、工具、素材、源码、游戏等)
有什么需要欢迎私我,交流群让学习不再孤单

在这里插入图片描述

👉实践过程

😜效果

在这里插入图片描述

😜代码

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>
    /// 必需的设计器变量。
    /// </summary>
    private System.ComponentModel.IContainer components = null;

    /// <summary>
    /// 清理所有正在使用的资源。
    /// </summary>
    /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
    protected override void Dispose(bool disposing)
    {
        if (disposing && (components != null))
        {
            components.Dispose();
        }
        base.Dispose(disposing);
    }

    #region Windows 窗体设计器生成的代码

    /// <summary>
    /// 设计器支持所需的方法 - 不要
    /// 使用代码编辑器修改此方法的内容。
    /// </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.打开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.复制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.打开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.打印预览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.重复RToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
        this.剪切TToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.复制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.选项OToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.帮助HToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
        this.内容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.关于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服务器路径";
        // 
        // 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服务器用户名";
        // 
        // 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服务器密码";
        // 
        // 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.打开OToolStripButton,
        this.保存SToolStripButton,
        this.打印PToolStripButton,
        this.toolStripSeparator,
        this.剪切UToolStripButton,
        this.复制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)";
        // 
        // 打开OToolStripButton
        // 
        this.打开OToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
        this.打开OToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("打开OToolStripButton.Image")));
        this.打开OToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.打开OToolStripButton.Name = "打开OToolStripButton";
        this.打开OToolStripButton.Size = new System.Drawing.Size(23, 22);
        this.打开OToolStripButton.Text = "打开(&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)";
        // 
        // 复制CToolStripButton
        // 
        this.复制CToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
        this.复制CToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("复制CToolStripButton.Image")));
        this.复制CToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.复制CToolStripButton.Name = "复制CToolStripButton";
        this.复制CToolStripButton.Size = new System.Drawing.Size(23, 22);
        this.复制CToolStripButton.Text = "复制(&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.打开OToolStripMenuItem,
        this.toolStripSeparator2,
        this.保存SToolStripMenuItem,
        this.另存为AToolStripMenuItem,
        this.toolStripSeparator3,
        this.打印PToolStripMenuItem,
        this.打印预览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)";
        // 
        // 打开OToolStripMenuItem
        // 
        this.打开OToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("打开OToolStripMenuItem.Image")));
        this.打开OToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.打开OToolStripMenuItem.Name = "打开OToolStripMenuItem";
        this.打开OToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
        this.打开OToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
        this.打开OToolStripMenuItem.Text = "打开(&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)";
        // 
        // 打印预览VToolStripMenuItem
        // 
        this.打印预览VToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("打印预览VToolStripMenuItem.Image")));
        this.打印预览VToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.打印预览VToolStripMenuItem.Name = "打印预览VToolStripMenuItem";
        this.打印预览VToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
        this.打印预览VToolStripMenuItem.Text = "打印预览(&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.重复RToolStripMenuItem,
        this.toolStripSeparator5,
        this.剪切TToolStripMenuItem,
        this.复制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)";
        // 
        // 重复RToolStripMenuItem
        // 
        this.重复RToolStripMenuItem.Name = "重复RToolStripMenuItem";
        this.重复RToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y)));
        this.重复RToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
        this.重复RToolStripMenuItem.Text = "重复(&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)";
        // 
        // 复制CToolStripMenuItem
        // 
        this.复制CToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject("复制CToolStripMenuItem.Image")));
        this.复制CToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;
        this.复制CToolStripMenuItem.Name = "复制CToolStripMenuItem";
        this.复制CToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C)));
        this.复制CToolStripMenuItem.Size = new System.Drawing.Size(153, 22);
        this.复制CToolStripMenuItem.Text = "复制(&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.选项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)";
        // 
        // 选项OToolStripMenuItem
        // 
        this.选项OToolStripMenuItem.Name = "选项OToolStripMenuItem";
        this.选项OToolStripMenuItem.Size = new System.Drawing.Size(124, 22);
        this.选项OToolStripMenuItem.Text = "选项(&O)";
        // 
        // 帮助HToolStripMenuItem
        // 
        this.帮助HToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
        this.内容CToolStripMenuItem,
        this.索引IToolStripMenuItem,
        this.搜索SToolStripMenuItem,
        this.toolStripSeparator7,
        this.关于AToolStripMenuItem});
        this.帮助HToolStripMenuItem.Name = "帮助HToolStripMenuItem";
        this.帮助HToolStripMenuItem.Size = new System.Drawing.Size(59, 20);
        this.帮助HToolStripMenuItem.Text = "帮助(&H)";
        // 
        // 内容CToolStripMenuItem
        // 
        this.内容CToolStripMenuItem.Name = "内容CToolStripMenuItem";
        this.内容CToolStripMenuItem.Size = new System.Drawing.Size(130, 22);
        this.内容CToolStripMenuItem.Text = "内容(&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);
        // 
        // 关于AToolStripMenuItem
        // 
        this.关于AToolStripMenuItem.Name = "关于AToolStripMenuItem";
        this.关于AToolStripMenuItem.Size = new System.Drawing.Size(130, 22);
        this.关于AToolStripMenuItem.Text = "关于(&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 打开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 复制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 打开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 打印预览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 重复RToolStripMenuItem;
    private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
    private System.Windows.Forms.ToolStripMenuItem 剪切TToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 复制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 选项OToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 帮助HToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 内容CToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 索引IToolStripMenuItem;
    private System.Windows.Forms.ToolStripMenuItem 搜索SToolStripMenuItem;
    private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
    private System.Windows.Forms.ToolStripMenuItem 关于AToolStripMenuItem;
}

需要的再直接Call我,直接发。

👉其他

📢作者:小空和小芝中的小空
📢转载说明-务必注明来源:https://zhima.blog.csdn.net/
📢这位道友请留步☁️,我观你气度不凡,谈吐间隐隐有王者霸气💚,日后定有一番大作为📝!!!旁边有点赞👍收藏🌟今日传你,点了吧,未来你成功☀️,我分文不取,若不成功⚡️,也好回来找我。

温馨提示点击下方卡片获取更多意想不到的资源。
空名先生

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/115046.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

SpringSecurity(十)【CSRF 漏洞保护】

十、CSRF 漏洞保护 简介 CSRF&#xff08;Cross-Site Request Forgery 跨站请求伪造&#xff09;&#xff0c;也可称为一键式攻击&#xff08;one-click-attack&#xff09;通常缩写为 CSRF 或者 XSRF。CSRF 攻击是一种挟持用户在当前已登录的浏览器上&#xff0c;发送恶意请求…

Python绘制地磁场

文章目录简介磁场绘制简介 为国际参考磁场对Python的封装&#xff0c;可通过经纬高度以及时间来计算地磁场强度&#xff0c;使用方法简单粗暴&#xff0c;如下 import pyIGRF pyIGRF.igrf_value(lat, lon, alt, date)参数含义为 lat 纬度lon 经度alt 海拔date 日期&#xff…

vuejs中组件的两种不同的编写风格-选项式API及组合式API

前言随着vue3的逐渐稳定,以及周边生态的完善,现在vue3已经成为默认的使用方式了的所以,对于一个前端开发者,Vue2与Vue3都得要会,在vue3中新增很多东西,比如:Fragment,Teleport,Suspense,也去掉了vue2中一些特性,比如:移除keyCode支持作为v-on的修饰符等在编程风格上也有一些区别…

Java项目:springBoot+Vue汽车销售管理系统

作者主页&#xff1a;源码空间站2022 简介&#xff1a;Java领域优质创作者、Java项目、学习资料、技术互助 文末获取源码 项目介绍 本项目基于spring boot以及Vue开发&#xff0c;为前后端分离的项目。针对汽车销售提供客户信息、车辆信息、订单信息、销售人员管理、财务报表等…

【Python百日进阶-数据分析】Day138 - plotly甘特图:px.timeline()

文章目录一、语法二、参数三、返回值四、实例4.1 带有 plotly.express 的甘特图和时间表4.1.1 普通甘特图4.1.2 px.timeline 的离散颜色4.1.3 px.timeline 的连续颜色4.1.4 同一水平线上有多个条4.1.5 Dash中使用甘特图一、语法 甘特图是一种条形图&#xff0c;用于说明项目进…

【C++高阶数据结构】并查集

&#x1f3c6;个人主页&#xff1a;企鹅不叫的博客 ​ &#x1f308;专栏 C语言初阶和进阶C项目Leetcode刷题初阶数据结构与算法C初阶和进阶《深入理解计算机操作系统》《高质量C/C编程》Linux ⭐️ 博主码云gitee链接&#xff1a;代码仓库地址 ⚡若有帮助可以【关注点赞收藏】…

Linux之top命令详解

Linux之top命令详解 一、简单介绍 top是Linux性能分析工具&#xff0c;显示系统占用资源情况&#xff0c;和windows的任务管理器一样。top动态显示进程暂用资源情况&#xff0c;top对系统处理器的状态监视&#xff0c;它将显示CPU任务列表&#xff0c;按照CPU使用、内存使用和…

You are not allowed to create a user with GRANT

8.0之后的mysql不支持授权的时候就进行用户创建&#xff0c;所以创建之后才能授权; USE mysqlSELECT USER, PASSWORD, HOST FROM USER;SELECT USER ,grant_priv FROM USERCREATE USER zjy IDENTIFIED BY 123456; #host默认是%GRANT ALL PRIVILEGES ON *.* TO zjy% MySql-Ser…

【正点原子I.MX6U-MINI移植篇】rootfs移植过程详解(三)

Linux三巨头己经完成了2个了&#xff0c;就剩最后一个rootfs&#xff08;根文件系统&#xff09;了&#xff0c;根文件系统的组成以及如何构建根文件系统是Liux移植的最后一步&#xff0c;根文件系统构建好以后就意味着我们己经拥有了一个完整的、可以运行的最小系统。以后我们…

智慧工地车辆未冲洗抓拍系统 opencv+yolo

智慧工地车辆未冲洗抓拍系统利用opencvyolo网络深度学习架构模型对现场画面中车辆的冲洗情况实现智能识别。OpenCV基于C实现&#xff0c;同时提供python, Ruby, Matlab等语言的接口。OpenCV-Python是OpenCV的Python API&#xff0c;结合了OpenCV CAPI和Python语言的最佳特性。O…

微信防撤回功能修改

今天无意之中看到了一个帖子&#xff0c;谈到了有关微信消息撤回的。突发奇想实现一下&#xff0c;以后就不怕错过朋友的消息了。 首先介绍一下基本思路&#xff0c;由于微信采用的是CS端原理&#xff0c;所有的数据请求均通过服务器&#xff0c;客户端只是响应指令而已。 A向…

实验三:自主存取控制实验

【实验目的】 掌握自主存取控制权限的定义和维护方法。掌握在ORACLE数据库中定义用户、角色&#xff0c;分配权限给用户、角色&#xff0c;回收权限&#xff0c;以相应用户登录数据库验证权限分配是否正确的方法。 【实验内容】 设有一个企业&#xff0c;由总裁负责管理采购、…

【Pandas指南】Series

Pandas数据结构简介 - Series 来源&#xff1a;Pandas官网&#xff1a;https://pandas.pydata.org/docs/getting_started/intro_tutorials/index.html 笔记托管&#xff1a;https://gitee.com/DingJiaxiong/machine-learning-study 下面将从对 pandas 中的基本数据结构进行快速…

Git Bash Here和RStudio软件的问题解决

Git Bash Here和RStudio软件的问题解决 文章目录Git Bash Here和RStudio软件的问题解决0、 写在前面1、Git软件在任务栏图标空白2、RStudio软件2.1 警告信息InormalizePath(path.expand(path),winslash,mustWork)2.2 incomplete final line found by readTableHeader on报错3、…

推荐两个go语言的websocket库

最近在写一个需要前后端保持通信的服务。前端要能及时感知后端数据的变化&#xff0c;后端要及时处理前端发过来的指令。这种服务就需要用到websocket了。 以前在写websocket相关的程序时&#xff0c;一直在用gorilla/websocket这个库&#xff0c;这个库事实上已经成为了go语言…

后端面试之系统设计 - 用户密码如何储存在DB里

原文地址&#xff1a;码农在新加坡的个人博客 背景 现在很多网站都因为爆库导致密码泄漏&#xff0c;要设计怎么样的密码储存机制&#xff0c;才能保证最大限度的不被盗取&#xff0c;即使数据泄漏&#xff0c;黑客也无法在短时间内获取对应的密码来登录用户的账号&#xff0c…

LeanCloud: 数据存储实现小程序云开发

1. LeanCloud 官网传送 2. LeanCloud选择原因 微信小程序的开发包括上线需要一个备案过的域名&#xff0c;而域名备案又需要一个服务器&#xff08;仅腾讯云而言&#xff09;。而微信云开发作为个人开发者受限于费用也不做考虑。 此时不考虑复杂的业务逻辑数据库读取是后端服…

A股、港股上市公司碳排放、碳强度和碳披露数据(2018-2021年)

随着中国碳强度减排任务的不断加重&#xff0c;当前政策的就业红利将不复存在&#xff0c;同时政策机制蕴含的资源错配、各行业边际减排成本不相等的问题则愈加严重&#xff0c;实施碳交易减排政策的时机逐渐成熟&#xff0c;政府应如何根据二氧化碳排放量、碳强度和碳披露等数…

带你走进Java字符串的小世界

目录 一. String 1. 什么是String 2. String常用构造器 3. 字符串的判断 4. 字符串的获取 5. 字符串的转换 6. 字符串比较和替换 7. 字符串的切割 二. StringBuffer与StringBuilder 2.1 关于StringBuffer 2.1.1 定义 2.1.2 构造方法 2.2 关于StringBuffer 三. StringJoiner的使…

分布式缓存的四大痛点

目前开发中经常用到的缓存&#xff0c;是我们必不可缺的&#xff0c;他大大的提高了我们整个项目的响应速度和并发量。但是带来好处的同时&#xff0c;也给我们带了了新的问题&#xff1a;缓存穿透、缓存击穿、缓存雪崩以及缓存一致性这么四个问题&#xff0c;也是分布式缓存的…