예제 #1
0
        public FTPClient2(FTPAccount account)
        {
            InitializeComponent();

            lblStatus.Text = string.Empty;
            lvFTPList.SubItemEndEditing += new SubItemEndEditingEventHandler(lvFTPList_SubItemEndEditing);

            this.Account = account;

            FTPAdapter = new FTP(account);
            FTPAdapter.Client.ClientRequest += new EventHandler<FtpRequestEventArgs>(Client_ClientRequest);
            FTPAdapter.Client.ServerResponse += new EventHandler<FtpResponseEventArgs>(Client_ServerResponse);
            FTPAdapter.Client.OpenAsyncCompleted += new EventHandler<OpenAsyncCompletedEventArgs>(Client_OpenAsyncCompleted);

            pgAccount.SelectedObject = FTPAdapter.Account;
            this.Text = "FTP Client - " + account.Name;
            lblConnecting.Text = "Connecting to " + account.FTPAddress;

            FTPAdapter.Client.OpenAsync(account.UserName, account.Password);
        }
예제 #2
0
        public FTPClientForm(FTPAccount account)
        {
            InitializeComponent();
            Icon = ShareXResources.Icon;

            lblStatus.Text = string.Empty;
            lvFTPList.SubItemEndEditing += lvFTPList_SubItemEndEditing;

            Account = account;

            FTPAdapter = new FTP(account);
            FTPAdapter.Client.ClientRequest += Client_ClientRequest;
            FTPAdapter.Client.ServerResponse += Client_ServerResponse;
            FTPAdapter.Client.OpenAsyncCompleted += Client_OpenAsyncCompleted;

            pgAccount.SelectedObject = FTPAdapter.Account;
            Text = "FTP Client - " + account.Name;
            lblConnecting.Text = "Connecting to " + account.FTPAddress;

            FTPAdapter.Client.OpenAsync(account.Username, account.Password);
        }