form1.cs

来自「用C#实现的FTP客户端与服务端的程序」· CS 代码 · 共 44 行

CS
44
字号
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ftpclient1;

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

        private void button3_Click(object sender, EventArgs e)
        {
            if (this.openFileDialog1.ShowDialog() == DialogResult.OK)
            {
                this.textBox1.Text = this.openFileDialog1.FileName;
            } 

        }

        private void button1_Click(object sender, EventArgs e)
        {

        }

        private void button4_Click(object sender, EventArgs e)
        {
            FTPClient fc = new FTPClient(this.TB_ServerIP.Text,
                                        "",
                                        this.TB_User.Text,
                                        this.TB_Password.Text,
                                        Convert.ToInt32(this.TB_ServerPort.Text));
            fc.Put(this.textBox1.Text);
            this.textBox1.Text = "complete!";
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?