亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ftptst1.cpp

?? 包含常用Internet協(xié)議TCP,UDP、HTTP、FTP、Telnet等
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/*---------------------------------------------------------------------------

Author:       Fran鏾is PIETTE
Creation:     Aug 1997 (Delphi program)
Version:      2.23
Object:       Demo for TFtpClient object (RFC 959 implementation)
              It is a graphical FTP client program
              Compatible with Delphi 1, 2 and 3
Email:        francois.piette@swing.be
              francois.piette@pophost.eunet.be francois.piette@rtfm.be
WebSite       http://www.rtfm.be/fpiette
Support:      Use the mailing list twsocket@rtfm.be See website for details.
Legal issues: Copyright (C) 1997, 1998, 1999 by Fran鏾is PIETTE
              <francois.piette@pophost.eunet.be>

              This software is provided 'as-is', without any express or
  	          implied warranty.  In no event will the author be held liable
              for any  damages arising from the use of this software.

              Permission is granted to anyone to use this software for any
              purpose, including commercial applications, and to alter it
              and redistribute it freely, subject to the following
              restrictions:

              1. The origin of this software must not be misrepresented,
                 you must not claim that you wrote the original software.
                 If you use this software in a product, an acknowledgment
                 in the product documentation would be appreciated but is
                 not required.

              2. Altered source versions must be plainly marked as such, and
                 must not be misrepresented as being the original software.

              3. This notice may not be removed or altered from any source
                 distribution.

Updates:
Sep 13, 97    Added directory functions. Added button to show how to makes
              several transferts in one session
Sep 27, 97    Change identifiers names to be more standard with other sources
Jan 10, 98    Saved edit boxes content to an IniFile, added FileSize, Quote
              and RestartGet commands
Jan 25, 1998  Completely rewritten for new component version (Asynchronous)
Feb 02, 1998  V2.17 Added a checkbox to run the synchronous or asynchronous
              version of the component methods.
Feb 15, 1998  V2.18 Removed useless wait unit from the use clause.
              Added display of winsock information at startup.
Feb 21, 1998  V2.18 ported from Delphi to C++Builder
Feb 22, 1998  V2.19 Added Append and AppendFile commands
Mar 27, 1998  V2.20 Adapted for BCB version 3.0
              See the comments for FtpClient1Progress().
Mar 06, 1999  V2.21 Minor changes
Aug 15, 1999  V2.22 Adapted for BCB4 (Moved FIniFileName initialization from
              FormCreate to form constructor).
Apr 02, 2000  V2.23 Removed "#define _WINSPOOL_" (SetPortA syndrome)
              Adapted for BCB5.

 ---------------------------------------------------------------------------*/
#if __BORLANDC__ == 0x520     // BCB1 is BC5.20   BCB3 is BC5.30
    #define _WINSOCKAPI_      // Prevent winsock.h from being included
#endif
#include <vcl\vcl.h>
#include <vcl\inifiles.hpp>
#pragma hdrstop
#include "FtpTst1.h"
#include "FtpTst2.h"

#define FTPTstVersion 223
#define SectionData    "Data"
#define KeyHostName    "HostName"
#define KeyUserName    "UserName"
#define KeyPassWord    "PassWord"
#define KeyHostDir     "HostDir"
#define KeyPort        "Port"
#define KeyHostFile    "HostFile"
#define KeyLocalFile   "LocalFile"
#define SectionWindow  "Window"
#define KeyTop         "Top"
#define KeyLeft        "Left"
#define KeyWidth       "Width"
#define KeyHeight      "Height"
#define TEMP_FILE_NAME "FTPDIR.TXT"

//---------------------------------------------------------------------------
#pragma link "Ftpcli"
#pragma resource "*.dfm"
TFtpReceiveForm *FtpReceiveForm;
//---------------------------------------------------------------------------
__fastcall TFtpReceiveForm::TFtpReceiveForm(TComponent* Owner)
	: TForm(Owner)  
{
    FIniFileName = LowerCase(ExtractFileName(Application->ExeName));
    FIniFileName = FIniFileName.SubString(1, FIniFileName.Length() - 3) + "ini";
}
//---------------------------------------------------------------------------
void __fastcall TFtpReceiveForm::FormCreate(TObject *Sender)
{
    DisplayMemo->Clear();
    InfoLabel->Caption  = "";
    StateLabel->Caption = "";
}
//---------------------------------------------------------------------------
void __fastcall TFtpReceiveForm::FormShow(TObject *Sender)
{
    TIniFile *IniFile;
    TWSAData Data;

    if (!FInitialized) {
        FInitialized = TRUE;
        IniFile =  new TIniFile(FIniFileName);
        HostNameEdit->Text  = IniFile->ReadString(SectionData, KeyHostName,
                                                  "ftp->simtel->net");
        PortEdit->Text      = IniFile->ReadString(SectionData, KeyPort,
                                                  "ftp");
        UserNameEdit->Text  = IniFile->ReadString(SectionData, KeyUserName,
                                                  "anonymous");
        PassWordEdit->Text  = IniFile->ReadString(SectionData, KeyPassWord,
                                                  "your->name@your->company->com");
        HostDirEdit->Text   = IniFile->ReadString(SectionData, KeyHostDir,
                                                  "/pub/simtelnet");
        HostFileEdit->Text  = IniFile->ReadString(SectionData, KeyHostFile,
                                                  "index->html");
        LocalFileEdit->Text = IniFile->ReadString(SectionData, KeyLocalFile,
                                                  "c:\temp\index->htm");

        Top    = IniFile->ReadInteger(SectionWindow, KeyTop,    Top);
        Left   = IniFile->ReadInteger(SectionWindow, KeyLeft,   Left);
        Width  = IniFile->ReadInteger(SectionWindow, KeyWidth,  Width);
        Height = IniFile->ReadInteger(SectionWindow, KeyHeight, Height);

        delete IniFile;

        // Display winsock info
        Data = WinsockInfo();
        DisplayMemo->Lines->Add("Winsock verion " +
                                IntToStr(LOBYTE(Data.wVersion)) + "." +
                                IntToStr(HIBYTE(Data.wVersion)));
        DisplayMemo->Lines->Add(Data.szDescription);
        DisplayMemo->Lines->Add(Data.szSystemStatus);
    }
}
//---------------------------------------------------------------------------
void __fastcall TFtpReceiveForm::FormClose(TObject *Sender,
	TCloseAction &Action)
{
    TIniFile *IniFile;

    IniFile = new TIniFile(FIniFileName);
    IniFile->WriteString(SectionData, KeyHostName,  HostNameEdit->Text);
    IniFile->WriteString(SectionData, KeyPort,      PortEdit->Text);
    IniFile->WriteString(SectionData, KeyUserName,  UserNameEdit->Text);
    IniFile->WriteString(SectionData, KeyPassWord,  PassWordEdit->Text);
    IniFile->WriteString(SectionData, KeyHostDir,   HostDirEdit->Text);
    IniFile->WriteString(SectionData, KeyHostFile,  HostFileEdit->Text);
    IniFile->WriteString(SectionData, KeyLocalFile, LocalFileEdit->Text);
    IniFile->WriteInteger(SectionWindow, KeyTop,    Top);
    IniFile->WriteInteger(SectionWindow, KeyLeft,   Left);
    IniFile->WriteInteger(SectionWindow, KeyWidth,  Width);
    IniFile->WriteInteger(SectionWindow, KeyHeight, Height);
    delete IniFile;
}
//---------------------------------------------------------------------------
void __fastcall TFtpReceiveForm::Display(
    TObject *Sender,
    AnsiString &Msg)
{
    DisplayMemo->Lines->Add(Msg);
}
//---------------------------------------------------------------------------
void __fastcall TFtpReceiveForm::ExitButtonClick(TObject *Sender)
{
    Close();    
}
//---------------------------------------------------------------------------
// BCB V1 and 3 do not agreed upon the Count argument type.
// V1 would like to have long and bcb3 would like to have int !
// In both case it is a 32 bit integer. You can safely ignore this error
// but do *NOT* remove the reference when the IDE ask for it !
// You can of course change to code to macth your BCB version !
void __fastcall TFtpReceiveForm::FtpClient1Progress(TObject *Sender, int Count,
    bool &Abort)
{
    InfoLabel->Caption = IntToStr(Count);
    InfoLabel->Repaint();
}
//---------------------------------------------------------------------------
void __fastcall TFtpReceiveForm::DisplayFile(const System::AnsiString FileName)
{
    try {
        DirectoryForm->DirListBox->Items->LoadFromFile(FileName);
    } __except (TRUE) {
        DirectoryForm->DirListBox->Clear();
    }
    DirectoryForm->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TFtpReceiveForm::FtpClient1RequestDone(TObject *Sender,
    TFtpRequest RqType, WORD Error)
{
    DisplayMemo->Lines->Add("Request " + IntToStr(RqType) + " Done.");
    DisplayMemo->Lines->Add("StatusCode = " + IntToStr(FtpClient1->StatusCode));
    DisplayMemo->Lines->Add("LastResponse was : \"" +
                            FtpClient1->LastResponse + "\"");
    if (Error == 0)
        DisplayMemo->Lines->Add("No error");
    else
        DisplayMemo->Lines->Add("Error = " + IntToStr(Error) +
                                " (" + FtpClient1->ErrorMessage + ")");

    if (Error == 0) {
        switch (RqType) {
        case ftpDirAsync:
        case ftpDirectoryAsync:
        case ftpLsAsync:
        case ftpListAsync:
            DisplayFile(TEMP_FILE_NAME);
            break;
        case ftpSizeAsync:
            DisplayMemo->Lines->Add("File size is " +
                                    IntToStr(FtpClient1->SizeResult) +
                                    " bytes" );
            break;
        case ftpPwdAsync:
        case ftpMkdAsync:
        case ftpCDupAsync:
        case ftpCwdAsync:
            DisplayMemo->Lines->Add("Directory is \"" +
                                    FtpClient1->DirResult + "\"");
            break;
        }
    }
}
//---------------------------------------------------------------------------
void __fastcall TFtpReceiveForm::FtpClient1SessionConnected(TObject *Sender,
    WORD Error)
{
    DisplayMemo->Lines->Add("Session Connected, error = " + IntToStr(Error));
}
//---------------------------------------------------------------------------
void __fastcall TFtpReceiveForm::FtpClient1SessionClosed(TObject *Sender,
    WORD Error)
{
    DisplayMemo->Lines->Add("Session Closed, error = " + IntToStr(Error));
}
//---------------------------------------------------------------------------
void __fastcall TFtpReceiveForm::FtpClient1StateChange(TObject *Sender)
{
    StateLabel->Caption = IntToStr(FtpClient1->State);
}
//---------------------------------------------------------------------------
void __fastcall TFtpReceiveForm::ExecuteCmd(
    TSyncCmd SyncCmd,
    TASyncCmd ASyncCmd)
{
    if (SyncCheckBox->Checked) {
        if (SyncCmd())
            DisplayMemo->Lines->Add("Command Success");
        else
            DisplayMemo->Lines->Add("Command Failure");
    }
    else
        ASyncCmd();
}
//---------------------------------------------------------------------------
void __fastcall TFtpReceiveForm::OpenAsyncButtonClick(TObject *Sender)
{
    DisplayMemo->Clear();
    DisplayMemo->Lines->Add("Connect Async");
    FtpClient1->HostName        = HostNameEdit->Text;
    FtpClient1->Port            = PortEdit->Text;
    FtpClient1->DisplayFileFlag = cbDisplay->Checked;
    FtpClient1->OnDisplay       = Display;
    ExecuteCmd(FtpClient1->Open, FtpClient1->OpenAsync);
}
//---------------------------------------------------------------------------
void __fastcall TFtpReceiveForm::QuitAsyncButtonClick(TObject *Sender)
{
    FtpClient1->DisplayFileFlag = cbDisplay->Checked;
    FtpClient1->OnDisplay       = Display;
    ExecuteCmd(FtpClient1->Quit, FtpClient1->QuitAsync);
}
//---------------------------------------------------------------------------
void __fastcall TFtpReceiveForm::CwdAsyncButtonClick(TObject *Sender)
{
    FtpClient1->HostDirName     = HostDirEdit->Text;
    FtpClient1->DisplayFileFlag = cbDisplay->Checked;
    FtpClient1->OnDisplay       = Display;
    ExecuteCmd(FtpClient1->Cwd, FtpClient1->CwdAsync);
}
//---------------------------------------------------------------------------
void __fastcall TFtpReceiveForm::UserAsyncButtonClick(TObject *Sender)
{
    FtpClient1->UserName        = UserNameEdit->Text;
    FtpClient1->DisplayFileFlag = cbDisplay->Checked;
    FtpClient1->OnDisplay       = Display;
    ExecuteCmd(FtpClient1->User, FtpClient1->UserAsync);
}
//---------------------------------------------------------------------------
void __fastcall TFtpReceiveForm::PassAsyncButtonClick(TObject *Sender)
{
    FtpClient1->PassWord        = PassWordEdit->Text;
    FtpClient1->DisplayFileFlag = cbDisplay->Checked;
    FtpClient1->OnDisplay       = Display;
    ExecuteCmd(FtpClient1->Pass, FtpClient1->PassAsync);
}
//---------------------------------------------------------------------------
void __fastcall TFtpReceiveForm::ConnectAsyncButtonClick(TObject *Sender)
{
    FtpClient1->HostName        = HostNameEdit->Text;
    FtpClient1->Port            = PortEdit->Text;
    FtpClient1->UserName        = UserNameEdit->Text;
    FtpClient1->PassWord        = PassWordEdit->Text;
    FtpClient1->DisplayFileFlag = cbDisplay->Checked;
    FtpClient1->OnDisplay       = Display;
    ExecuteCmd(FtpClient1->Connect, FtpClient1->ConnectAsync);
}
//---------------------------------------------------------------------------
void __fastcall TFtpReceiveForm::GetAsyncButtonClick(TObject *Sender)
{
    FtpClient1->HostDirName     = HostDirEdit->Text;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美久久久久中文字幕| 美女视频黄 久久| 不卡在线观看av| 国产午夜精品福利| 国产99精品国产| 中文字幕亚洲一区二区va在线| 99久久综合国产精品| 亚洲欧美一区二区不卡| 欧美日韩一区二区三区四区| 天天操天天干天天综合网| 日韩欧美综合一区| 懂色一区二区三区免费观看| 亚洲三级免费观看| 欧美日韩亚洲综合一区二区三区| 日韩电影免费在线观看网站| 亚洲精品一区二区三区香蕉 | 在线免费观看不卡av| 亚洲一区二区三区影院| 日韩欧美国产一区二区三区| 国产成人av网站| 亚洲一区电影777| 精品国产一区二区三区忘忧草| 国产91精品一区二区麻豆亚洲| 亚洲日本va午夜在线电影| 欧美日韩精品欧美日韩精品| 蜜桃av一区二区| 国产精品私人影院| 欧美日韩一区久久| 激情五月播播久久久精品| 最新国产の精品合集bt伙计| 日韩一区二区在线看| 成人高清免费观看| 蜜桃在线一区二区三区| 国产精品国产三级国产三级人妇| 在线播放日韩导航| 国产成人8x视频一区二区| 香蕉av福利精品导航| 国产性天天综合网| 91 com成人网| www.色精品| 精品中文字幕一区二区| 一区二区三区日韩| 久久精品人人做| 91精品国产综合久久国产大片| 成人午夜在线播放| 麻豆精品精品国产自在97香蕉 | 国产精品青草久久| 91麻豆精品91久久久久久清纯 | 麻豆一区二区三| xf在线a精品一区二区视频网站| 91亚洲精品一区二区乱码| 欧美一区二区三区免费在线看 | 91蜜桃传媒精品久久久一区二区| 五月综合激情婷婷六月色窝| 国产精品入口麻豆九色| 久久久噜噜噜久噜久久综合| 日韩欧美国产一二三区| 欧美精品久久久久久久久老牛影院| 白白色亚洲国产精品| 国产一区二区在线免费观看| 午夜欧美在线一二页| 自拍偷拍亚洲激情| 欧美极品aⅴ影院| 欧美精品一区二区在线观看| 日韩免费看的电影| 欧美日韩在线三级| 欧美亚洲动漫另类| 色偷偷成人一区二区三区91 | 91精选在线观看| 欧美日本国产一区| 欧洲国产伦久久久久久久| 91在线高清观看| 99久久精品国产一区二区三区| 国产 日韩 欧美大片| 久久99精品久久久久| 免费一级片91| 免费高清在线一区| 蜜臂av日日欢夜夜爽一区| 日本中文在线一区| 亚洲国产日日夜夜| 欧美韩日一区二区三区| 欧美成人高清电影在线| 日韩欧美中文一区二区| 日韩精品一区二区三区三区免费 | 成人av资源下载| 91网页版在线| 在线免费亚洲电影| 777欧美精品| 日韩精品中文字幕一区| 久久免费精品国产久精品久久久久| 欧美精品一区二区在线观看| 国产精品嫩草影院com| 一区二区视频免费在线观看| 亚洲高清中文字幕| 久久精品国产99国产精品| 国产在线播精品第三| 波多野结衣中文字幕一区| 色88888久久久久久影院野外| 欧美日韩精品一区视频| 日韩视频一区二区三区| 国产偷v国产偷v亚洲高清| 亚洲精品国产精品乱码不99 | 精品亚洲国产成人av制服丝袜 | 在线看国产一区二区| 欧美美女黄视频| 精品盗摄一区二区三区| 中文字幕亚洲电影| 亚洲成在人线免费| 国产一区二区三区久久悠悠色av| 成人黄色国产精品网站大全在线免费观看| 一本色道**综合亚洲精品蜜桃冫 | 久久色中文字幕| 亚洲青青青在线视频| 青青草原综合久久大伊人精品优势| 国产一区二区三区av电影 | 中文字幕在线观看不卡视频| 亚洲成人免费影院| 国产福利一区在线观看| 91福利精品视频| 久久久噜噜噜久久中文字幕色伊伊| 亚洲免费成人av| 久久99精品久久久久久| 色偷偷久久一区二区三区| 精品国产青草久久久久福利| 一区二区三区在线播| 狠狠色丁香久久婷婷综| 欧洲av在线精品| 国产精品久久久久久久久搜平片| 午夜欧美电影在线观看| 成熟亚洲日本毛茸茸凸凹| 日韩欧美中文字幕公布| 亚洲综合丁香婷婷六月香| 国产电影精品久久禁18| 欧美一区在线视频| 亚洲免费资源在线播放| 国产精品系列在线播放| 欧美一区二区视频观看视频| 亚洲一区二区三区在线看| 美女网站一区二区| 91麻豆国产精品久久| 精品国产成人在线影院 | 1区2区3区欧美| 久久av资源网| 欧美理论电影在线| 欧美国产日韩精品免费观看| 精品一区中文字幕| 欧美日韩一区二区在线观看视频| 亚洲少妇30p| 国产99久久久精品| 久久精品夜夜夜夜久久| 免费av网站大全久久| 欧美日韩免费不卡视频一区二区三区| 亚洲国产精品二十页| 麻豆精品新av中文字幕| 欧美一级高清片在线观看| 日韩av一二三| 不卡影院免费观看| 国产欧美一区二区精品婷婷 | 日韩一区二区免费在线电影| 曰韩精品一区二区| 不卡av电影在线播放| 国产亚洲精品福利| 国产中文字幕精品| 欧美成人高清电影在线| 精品午夜久久福利影院| 日韩欧美国产不卡| 久久国内精品视频| 日韩久久久精品| 激情久久久久久久久久久久久久久久| 宅男噜噜噜66一区二区66| 日韩中文欧美在线| 在线播放中文字幕一区| 毛片一区二区三区| 久久精品一区八戒影视| 国产xxx精品视频大全| 国产欧美综合色| 91尤物视频在线观看| 亚洲伦理在线精品| 欧美日韩一区二区在线视频| 日韩在线一区二区| 日韩精品一区二区三区视频 | 亚洲欧洲无码一区二区三区| 国产激情视频一区二区在线观看 | 波多野结衣中文字幕一区二区三区 | 91精品国产一区二区三区| 天天综合天天综合色| 精品少妇一区二区三区视频免付费 | 久久婷婷综合激情| 国产成人高清视频| 亚洲人成精品久久久久久 | 国产一区二区三区免费观看| 国产清纯美女被跳蛋高潮一区二区久久w| 国产精品538一区二区在线| 国产精品伦理一区二区| 欧美午夜在线观看| 麻豆精品视频在线观看免费| 国产精品美女久久久久aⅴ| 91高清视频免费看| 久久66热偷产精品| 中文字幕一区二区三区在线不卡|