【正文】
ic void Get(string strRemoteFileName,string strFolder,string strLocalFileName) { if(!bConnected) { Connect()。 if (()) { strLocalFileName = strRemoteFileName。 ()。 Socket socketData = CreateDataSocket()。 if(!(iReplyCode == 150 || iReplyCode == 125 || iReplyCode == 226 || iReplyCode == 250)) { throw new IOException((4))。 (buffer,0,iBytes)。 } } ()。 } if(!(iReplyCode == 226 || iReplyCode == 250)) { ReadReply()。 } } } 輔助功能的程序?qū)崿F(xiàn) 當(dāng)需要返回上級(jí)目錄時(shí),先檢查當(dāng)前目錄字符串是否小于 3,如果小于了 3則表示已經(jīng)是跟目錄了,不能在返回上級(jí)目錄了。具體辦法是每次取字符串從 0 到最后一個(gè)“ \\” 。程序代碼如下: 其主要代碼 程序如下: private void but_Fa_Click(object sender, e) 第 14 頁 共 21 頁 {//返回上級(jí)目錄 string path=。 if((\\)) { if(=3) { (根目錄了! ,系統(tǒng)提示,)。 } newpath=(0,(\\))。 } else { if((\\)!=2) { newpath=(0,(\\))。 } else { newpath=(0,(\\)+1)。 return。先把所有的輸入框中的值賦給有代表意思的字符串。 然后通過 IniWriteValue 方法來寫入 文件中,其主要代碼程序如下: private void but_Ok_Click(object sender, e) {//添加 登錄 主機(jī)信息 string hostname=()。 string loginname=()。 string mydir=()。 } IniFile inf=new IniFile()。 int i=((MFFTP_Options,HostNum))。 string ServerName= MFFTP_OptionsHost+i。 (ServerName,HostIp,hostip)。 (ServerName,LoginPwd,loginpwd)。 i=i+1。 (hostname)。 } 5 軟件測試 測試 前分析 本 FTP 軟件測試,從詳細(xì)設(shè)計(jì)來看,分 4 部分進(jìn)行測試:首先必須連接到某網(wǎng)絡(luò),在網(wǎng)絡(luò)連接成功后,進(jìn)行第一步測試連接測試,在輸入 IP地址和 登錄名和密碼后能成功連接到主機(jī);第二步對(duì)文件操作測試,能新建文件、刪除文件等操作;第三步在于服務(wù)器連接成功后測試上傳和下載操作,第四步檢測文件在選擇目錄后能顯示根據(jù)路徑來顯示此路徑下所有文件和信息保存入 INI 文件。連接一般有兩種情況,一種是連接他是用戶經(jīng)常用要訪問的 FTP 服務(wù)器,需要進(jìn)行保存登錄信息的。連接前如下 圖 4, 輸入 IP 地址為 ( IP 為本機(jī)地址);以及用戶名密碼為“ anonymous” ,連接成功后如圖 5。對(duì)文件夾的屬性設(shè)置即修改是否讀寫,是否隱藏、是否存檔。 第三步測試文件上傳和下載功能,以下載 為例下載前本地主機(jī)沒有該文件如圖 6,當(dāng)下載成功后主機(jī)這邊顯示有 文件出來在本地主機(jī)上 如圖 7。都能成功的進(jìn)行讀寫操作。能完成新建文件、刪除文件以及文件的上傳和下載等操作。還有就是在獲取系統(tǒng)驅(qū)動(dòng)器時(shí)未能篩選掉軟驅(qū)磁盤和光驅(qū)磁盤。 下載成功后 下載前 第 18 頁 共 21 頁 結(jié) 論 此次 FTP 軟件的設(shè)計(jì)與開發(fā),從其功能上講沒有任何新的功能。能獲取系統(tǒng)驅(qū)動(dòng)器信息,能根據(jù)路徑來顯示你文件夾信息。能將登錄名和密碼保存到 INI 文件中去。完成了基本的 FTP 軟件功能。但是此次畢業(yè)設(shè)計(jì)的對(duì)我的最大收獲是了解了 .NET 開發(fā) Windows 應(yīng)用程序開發(fā),對(duì)新的開發(fā)語言 C有了了解。也可以給一些初學(xué) FTP 客 戶端軟件開發(fā)一些幫助。 [2] 微軟公司 [美 ].MCAD/MCSD 制勝寶典用 Visual 和 Visual C.NET 開發(fā)Windows應(yīng)用程序 [M].鄭宇紅 ,徐泓 [譯 ].北京:清華大學(xué)出版社 ,2020。 [4] 羅斌 .Visual C.NET精彩編程實(shí)例集錦 [M].北京:中國水利水電出版社 ,2020。 [6] 李勇平,陳峰波 .(C)基礎(chǔ)教程 [M].北京:清華大學(xué)出版社 ,2020。 第 20 頁 共 21 頁 致 謝 本文是在 陶德元 、方睿老師的熱情關(guān) 心和指導(dǎo)下完成的,他們淵博的知識(shí)和嚴(yán)謹(jǐn)?shù)闹螌W(xué)作風(fēng)使我受益匪淺,對(duì)順利完成本課題起到了極大的作用。文中除了特別加以標(biāo)注地方外,不包含他人已經(jīng)發(fā)表或撰寫過的研究成果,也不包含為獲得成都信息工程學(xué)院或其他教學(xué)機(jī)構(gòu)的學(xué)位或證書而使用過的材料。 關(guān)于學(xué)位論文使用權(quán)和研究成果知識(shí)產(chǎn)權(quán)的說明: 本人完全了解成都信息工程學(xué)院有關(guān)保管使用學(xué)位論文的規(guī)定,其中包括: ( 1)學(xué)校有權(quán)保管并向有關(guān)部門遞交學(xué)位論文的原件與復(fù)印件。 ( 3)學(xué)??梢詫W(xué)術(shù)交流為目的復(fù)制、贈(zèng)送和交換學(xué)位論文。 ( 5)學(xué)??梢怨紝W(xué)位論文的全部或部分內(nèi)容(保密學(xué)位論文在解密后遵守此規(guī)定)。 特此聲明! 作者簽名: 2020 年 06月 日 第 22 頁 共 21 頁 第 23 頁 共 21 頁 54 Of Vainglory It was prettily devised of Aesop。s really a pleasure now and then to bee a mere nothing, especially when a man is as highly placed as I am. And then to think that we all, even with patent lacquer, are nothing more than insects of a moment on that anthill the earth, though we may be insects with stars and garters, places and offices! One feels quite a novice beside these venerable millionyearold boulders. On last New Year39。s diversion, namely, the wild hunt to Amack. Ah, you don39。s eve, to the Brocken。s night through the air to Amack. They sit backwards on their painting b all lapse of time, and had bee a cipher and a nothing. Then three alone, or moveth upon greater means, if they have never so little hand in it, they think it is they that carry it They that are glorious, must needs be factious。 but according to die French proverb。 there are sometimes great effects of cross lies。 for as iron sharpens iron, so by glory one courage sharpeh another. In cases of great enterprise, upon charge and adventure, a position of glorious natures doth put life into business。s memory。 omnium, quae cHxerat jeceratque, arte quadam ostentator: for that proceeds not of vanity, but of natural magnanimity, and discretion: and in some persons is not only ely, but gracious. For excusations, cessions, modesty itself well governed, are bu t arts of ostentation. And amongst those arts there is none better, than that which Plinius Secundus speaketh of。s self hath any perfection. For saith Pliny very wittily。 for he that you mend, is either superior to you, in that you mend, or inferior. If he be inferior, if he be to be mended, you much more。 the admiration of fools。 and the slaves of their own vaunts. 第 24 頁 共 21 頁 LastIndexNext And now having spoken of assaults, let us sum up all acts ofviolence under a single law, which shall be as foll ows:No one shallta ke or carry away any of his neighbour39。s without the consent of theowner。 and especially greatwhen in vi olation of public and holy rites, or of the partly monrites in which tribes and phratries share。 the fourth kind of violence iswhen any one, regardless of the author ity of the rulers, takes orcarries away or makes use of anything which belongs to them, nothaving their consent。 but he who did must have supposed one of threethingseither that they did not exist,which is the first possibility,or secondly, that, if they did, they took no care of man, orthirdly, that they were easily appeased and turned aside from theirpurpose, by sacrifices and prayers. Cleinias. What shall we say or do to these persons? Athenian Stranger. My good friend, let us first hear the jests whichI suspect that they in their superiority will utter against us. Cle. What jests? Ath. They will make some irreverent speech of this sort:O inhabitants of A thens, and Sparta, and Cnosus, they will reply, inthat you spea k truly。 and others that t