<img width="11" height="16" align="top" style="display: inline;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" id="Codehighlighter1_0_41_Closed_Image" alt=""><span style="border: 1px solid rgb(128, 128, 128); display: inline; background-color: rgb(255, 255, 255);" id="Codehighlighter1_0_41_Closed_Text">/**/</span><span id="Codehighlighter1_0_41_Open_Text" style="display: none;"><span style="color: rgb(0, 128, 0);">/*</span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">作者:S.F. <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">blog:www.cnblogs.com/chinasf <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" alt=""></span><span style="color: rgb(0, 128, 0);">*/</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" alt=""></span><span style="color: rgb(0, 0, 255);">using</span><span style="color: rgb(0, 0, 0);">System; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" alt=""></span><span style="color: rgb(0, 0, 255);">using</span><span style="color: rgb(0, 0, 0);">System.ComponentModel; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" alt=""></span><span style="color: rgb(0, 0, 255);">using</span><span style="color: rgb(0, 0, 0);">System.Runtime.Remoting; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" alt=""></span><span style="color: rgb(0, 0, 255);">using</span><span style="color: rgb(0, 0, 0);">System.Runtime.Remoting.Channels; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" alt=""></span><span style="color: rgb(0, 0, 255);">using</span><span style="color: rgb(0, 0, 0);">System.Runtime.Remoting.Channels.Tcp; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" alt=""></span><span style="color: rgb(0, 0, 255);">using</span><span style="color: rgb(0, 0, 0);">System.IO; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" alt=""></span><span style="color: rgb(0, 0, 255);">using</span><span style="color: rgb(0, 0, 0);">System.Text; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" alt=""></span><span style="color: rgb(0, 0, 255);">using</span><span style="color: rgb(0, 0, 0);">System.Net; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" alt=""></span><span style="color: rgb(0, 0, 255);">namespace</span><span style="color: rgb(0, 0, 0);">SocketLibrary <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" id="Codehighlighter1_280_7261_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" id="Codehighlighter1_280_7261_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_280_7261_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_280_7261_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_283_364_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_283_364_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_283_364_Closed_Text">/**/</span><span id="Codehighlighter1_283_364_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">NetFileTransfer的摘要说明。 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">用Remoting实现文件传输管理 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">NetFileTransfer:MarshalByRefObject <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_416_1511_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_416_1511_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_416_1511_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_416_1511_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">NetFileTransfer():</span><span style="color: rgb(0, 0, 255);">base</span><span style="color: rgb(0, 0, 0);">() <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_456_460_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_456_460_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_456_460_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_456_460_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_467_597_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_467_597_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_467_597_Closed_Text">/**/</span><span id="Codehighlighter1_467_597_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">获取文件的数组 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><paramname="filePath"></span><span style="color: rgb(0, 128, 0);">文件路径</span><span style="color: rgb(128, 128, 128);"></param></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><returns></span><span style="color: rgb(0, 128, 0);">数组(默认null)</span><span style="color: rgb(128, 128, 128);"></returns></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_645_1021_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_645_1021_Closed_Image" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[]GetFileBytes(</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">filePath)</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_645_1021_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_645_1021_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_678_981_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_678_981_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(File.Exists(filePath))</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_678_981_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_678_981_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_691_934_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_691_934_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">try</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_691_934_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_691_934_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">FileStreamfs</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">FileStream(filePath,FileMode.Open,FileAccess.Read,FileShare.Read); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[]buffer</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[fs.Length]; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">fs.Read(buffer,</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">,buffer.Length); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">fs.Close(); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">buffer; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_940_973_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_940_973_Closed_Image" alt="">}</span></span><span style="color: rgb(0, 0, 255);">catch</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_940_973_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_940_973_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_986_1015_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_986_1015_Closed_Image" alt="">}</span></span><span style="color: rgb(0, 0, 255);">else</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_986_1015_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_986_1015_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_1028_1147_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_1028_1147_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1028_1147_Closed_Text">/**/</span><span id="Codehighlighter1_1028_1147_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">发送数据 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><paramname="savePath"></span><span style="color: rgb(0, 128, 0);">保存路径</span><span style="color: rgb(128, 128, 128);"></param></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><returns></span><span style="color: rgb(0, 128, 0);">状态</span><span style="color: rgb(128, 128, 128);"></returns></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_1211_1508_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_1211_1508_Closed_Image" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">bool</span><span style="color: rgb(0, 0, 0);">SendFileBytes(</span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[]fileBytes,</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">savePath)</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1211_1508_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_1211_1508_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(fileBytes</span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_1263_1465_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_1263_1465_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">try</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1263_1465_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_1263_1465_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">FileStreamfs</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">FileStream(savePath,FileMode.OpenOrCreate,FileAccess.Write,FileShare.Write); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">fs.Write(fileBytes,</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">,fileBytes.Length); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">fs.Close(); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">true</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_1471_1501_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_1471_1501_Closed_Image" alt="">}</span></span><span style="color: rgb(0, 0, 255);">catch</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1471_1501_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_1471_1501_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_1563_3542_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_1563_3542_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">NetFileTransferServer:Component</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1563_3542_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_1563_3542_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);">TcpChannelchan</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">_Port</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 0);">8085</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">_RegisterMethod</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">FileService</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">bool</span><span style="color: rgb(0, 0, 0);">_Active</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_1721_1764_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_1721_1764_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1721_1764_Closed_Text">/**/</span><span id="Codehighlighter1_1721_1764_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">构造 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_1808_1815_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_1808_1815_Closed_Image" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">NetFileTransferServer():</span><span style="color: rgb(0, 0, 255);">base</span><span style="color: rgb(0, 0, 0);">()</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1808_1815_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_1808_1815_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_1822_1867_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_1822_1867_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1822_1867_Closed_Text">/**/</span><span id="Codehighlighter1_1822_1867_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">绑定端口 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_1888_1987_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_1888_1987_Closed_Image" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">Port</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1888_1987_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_1888_1987_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_1899_1934_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_1899_1934_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">get</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1899_1934_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_1899_1934_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._Port; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_1945_1981_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_1945_1981_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">set</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1945_1981_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_1945_1981_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._Port</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">value; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_1994_2042_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_1994_2042_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1994_2042_Closed_Text">/**/</span><span id="Codehighlighter1_1994_2042_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">绑定注册方法名 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_2076_2195_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_2076_2195_Closed_Image" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">RegisterMethod</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_2076_2195_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_2076_2195_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_2087_2132_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_2087_2132_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">get</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_2087_2132_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_2087_2132_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._RegisterMethod; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_2143_2189_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_2143_2189_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">set</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_2143_2189_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_2143_2189_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._RegisterMethod</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">value; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_2202_2249_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_2202_2249_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_2202_2249_Closed_Text">/**/</span><span id="Codehighlighter1_2202_2249_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">获取激活状态 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_2273_2327_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_2273_2327_Closed_Image" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">bool</span><span style="color: rgb(0, 0, 0);">Active</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_2273_2327_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_2273_2327_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_2284_2321_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_2284_2321_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">get</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_2284_2321_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_2284_2321_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._Active; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_2334_2379_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_2334_2379_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_2334_2379_Closed_Text">/**/</span><span id="Codehighlighter1_2334_2379_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">启动服务 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_2403_2779_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_2403_2779_Closed_Image" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">Start()</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_2403_2779_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_2403_2779_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_2414_2678_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_2414_2678_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">try</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_2414_2678_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_2414_2678_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">chan</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">TcpChannel(</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._Port); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">ChannelServices.RegisterChannel(chan); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">RemotingConfiguration.RegisterWellKnownServiceType(</span><span style="color: rgb(0, 0, 255);">typeof</span><span style="color: rgb(0, 0, 0);">(NetFileTransfer),</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._RegisterMethod,WellKnownObjectMode.SingleCall); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._Active</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">true</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_2697_2773_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_2697_2773_Closed_Image" alt="">}</span></span><span style="color: rgb(0, 0, 255);">catch</span><span style="color: rgb(0, 0, 0);">(Exceptione)</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_2697_2773_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_2697_2773_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">Console.WriteLine(e.Message); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._Active</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_2786_2831_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_2786_2831_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_2786_2831_Closed_Text">/**/</span><span id="Codehighlighter1_2786_2831_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">停止服务 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_2854_2967_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_2854_2967_Closed_Image" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">Stop()</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_2854_2967_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_2854_2967_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._Active</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_2904_2961_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_2904_2961_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(chan</span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">)</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_2904_2961_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_2904_2961_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">ChannelServices.UnregisterChannel(chan); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_2974_3118_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_2974_3118_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_2974_3118_Closed_Text">/**/</span><span id="Codehighlighter1_2974_3118_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">获取注册的方法协议全称 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><paramname="IpAddressIndex"></span><span style="color: rgb(0, 128, 0);">IP地址索引号(支持多IP)</span><span style="color: rgb(128, 128, 128);"></param></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><returns></span><span style="color: rgb(0, 128, 0);">协议全称</span><span style="color: rgb(128, 128, 128);"></returns></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_3181_3538_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_3181_3538_Closed_Image" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">NoticeRegisterMethodName(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">IpAddressIndex)</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_3181_3538_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_3181_3538_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">tcp:</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">localhost:8085/FileService</span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_3233_3479_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_3233_3479_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">try</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_3233_3479_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_3233_3479_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">IPHostEntryheserver</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">Dns.Resolve(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">localhost</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">IPAddresscurrAddr</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">heserver.AddressList[IpAddressIndex]; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">String.Format(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">tcp://{0}:{1}/{2}</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">,currAddr.ToString(),</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._Port.ToString(),</span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._RegisterMethod); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_3498_3532_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_3498_3532_Closed_Image" alt="">}</span></span><span style="color: rgb(0, 0, 255);">catch</span><span style="color: rgb(0, 0, 0);">(Exceptione)</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_3498_3532_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_3498_3532_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">e.Message; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_3594_7258_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_3594_7258_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);">NetFileTransferClient:Component</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_3594_7258_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_3594_7258_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);">NetFileTransfernft</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">bool</span><span style="color: rgb(0, 0, 0);">_Active</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">_NoticeRegisterMethodName</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">tcp://localhost:8085/FileService</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">_Port</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 0);">8085</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_3827_3833_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_3827_3833_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">NetFileTransferClient():</span><span style="color: rgb(0, 0, 255);">base</span><span style="color: rgb(0, 0, 0);">()</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_3827_3833_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_3827_3833_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_3840_3885_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_3840_3885_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_3840_3885_Closed_Text">/**/</span><span id="Codehighlighter1_3840_3885_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">绑定端口 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_3906_4005_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_3906_4005_Closed_Image" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">Port</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_3906_4005_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_3906_4005_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_3917_3952_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_3917_3952_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">get</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_3917_3952_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_3917_3952_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._Port; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_3963_3999_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_3963_3999_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">set</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_3963_3999_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_3963_3999_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._Port</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">value; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_4012_4060_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_4012_4060_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_4012_4060_Closed_Text">/**/</span><span id="Codehighlighter1_4012_4060_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">绑定注册方法名 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_4104_4243_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_4104_4243_Closed_Image" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">NoticeRegisterMethodName</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_4104_4243_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_4104_4243_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_4115_4170_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_4115_4170_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">get</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_4115_4170_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_4115_4170_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._NoticeRegisterMethodName; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_4181_4237_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_4181_4237_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">set</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_4181_4237_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_4181_4237_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._NoticeRegisterMethodName</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">value; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_4250_4297_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_4250_4297_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_4250_4297_Closed_Text">/**/</span><span id="Codehighlighter1_4250_4297_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">获取激活状态 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_4321_4375_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_4321_4375_Closed_Image" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">bool</span><span style="color: rgb(0, 0, 0);">Active</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_4321_4375_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_4321_4375_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_4332_4369_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_4332_4369_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">get</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_4332_4369_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_4332_4369_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._Active; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_4382_4426_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_4382_4426_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_4382_4426_Closed_Text">/**/</span><span id="Codehighlighter1_4382_4426_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">连接器 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_4475_4525_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_4475_4525_Closed_Image" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">NetFileTransferNetFileTransferObject</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_4475_4525_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_4475_4525_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_4486_4519_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_4486_4519_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">get</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_4486_4519_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_4486_4519_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">.nft; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_4532_4609_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_4532_4609_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_4532_4609_Closed_Text">/**/</span><span id="Codehighlighter1_4532_4609_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">连接到服务器 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><returns></span><span style="color: rgb(0, 128, 0);">状态</span><span style="color: rgb(128, 128, 128);"></returns></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_4635_5026_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_4635_5026_Closed_Image" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">bool</span><span style="color: rgb(0, 0, 0);">Connect()</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_4635_5026_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_4635_5026_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_4646_4955_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_4646_4955_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">try</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_4646_4955_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_4646_4955_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">nft</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">(NetFileTransfer)Activator.GetObject(</span><span style="color: rgb(0, 0, 255);">typeof</span><span style="color: rgb(0, 0, 0);">(SocketLibrary.NetFileTransfer),_NoticeRegisterMethodName); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_4813_4877_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_4813_4877_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(nft</span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 0);">&&</span><span style="color: rgb(0, 0, 0);">nft.ToString().Length</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">)</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_4813_4877_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_4813_4877_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._Active</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">true</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">true</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_4882_4947_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_4882_4947_Closed_Image" alt="">}</span></span><span style="color: rgb(0, 0, 255);">else</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_4882_4947_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_4882_4947_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._Active</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_4961_5020_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_4961_5020_Closed_Image" alt="">}</span></span><span style="color: rgb(0, 0, 255);">catch</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_4961_5020_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_4961_5020_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">this</span><span style="color: rgb(0, 0, 0);">._Active</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_5033_5078_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_5033_5078_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_5033_5078_Closed_Text">/**/</span><span id="Codehighlighter1_5033_5078_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">停止连接 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_5110_5156_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_5110_5156_Closed_Image" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">Disconnection()</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_5110_5156_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_5110_5156_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">nft</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">_Active</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_5163_5290_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_5163_5290_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_5163_5290_Closed_Text">/**/</span><span id="Codehighlighter1_5163_5290_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">获取文件 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><paramname="RemoteFilePath"></span><span style="color: rgb(0, 128, 0);">文件路径</span><span style="color: rgb(128, 128, 128);"></param></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><returns></span><span style="color: rgb(0, 128, 0);">文件数组</span><span style="color: rgb(128, 128, 128);"></returns></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_5344_5484_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_5344_5484_Closed_Image" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[]GetFileBytes(</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">RemoteFilePath)</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_5344_5484_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_5344_5484_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 0);">!</span><span style="color: rgb(0, 0, 0);">_Active)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_5386_5443_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_5386_5443_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">try</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_5386_5443_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_5386_5443_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">nft.GetFileBytes(RemoteFilePath); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_5449_5478_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_5449_5478_Closed_Image" alt="">}</span></span><span style="color: rgb(0, 0, 255);">catch</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_5449_5478_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_5449_5478_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_5491_5673_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_5491_5673_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_5491_5673_Closed_Text">/**/</span><span id="Codehighlighter1_5491_5673_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">获取文件,并保存 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><paramname="RemoteFilePath"></span><span style="color: rgb(0, 128, 0);">远程文件路径</span><span style="color: rgb(128, 128, 128);"></param></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><paramname="LocalSavePath"></span><span style="color: rgb(0, 128, 0);">本地保存路径</span><span style="color: rgb(128, 128, 128);"></param></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><returns></span><span style="color: rgb(0, 128, 0);">状态</span><span style="color: rgb(128, 128, 128);"></returns></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_5741_6176_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_5741_6176_Closed_Image" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">bool</span><span style="color: rgb(0, 0, 0);">GetFile(</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">RemoteFilePath,</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">LocalSavePath)</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_5741_6176_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_5741_6176_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 0);">!</span><span style="color: rgb(0, 0, 0);">_Active)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">true</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_5783_6134_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_5783_6134_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">try</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_5783_6134_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_5783_6134_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[]filebytes</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">nft.GetFileBytes(RemoteFilePath); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_5873_6087_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_5873_6087_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(filebytes</span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">)</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_5873_6087_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_5873_6087_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">FileStreamfs</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">FileStream(LocalSavePath,FileMode.CreateNew,FileAccess.Write,FileShare.Write); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">fs.Write(filebytes,</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">,filebytes.Length); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">fs.Close(); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">true</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_6092_6126_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_6092_6126_Closed_Image" alt="">}</span></span><span style="color: rgb(0, 0, 255);">else</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_6092_6126_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_6092_6126_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_6140_6170_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_6140_6170_Closed_Image" alt="">}</span></span><span style="color: rgb(0, 0, 255);">catch</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_6140_6170_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_6140_6170_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_6187_6359_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_6187_6359_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_6187_6359_Closed_Text">/**/</span><span id="Codehighlighter1_6187_6359_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">发送文件 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><paramname="fileBytes"></span><span style="color: rgb(0, 128, 0);">文件数组</span><span style="color: rgb(128, 128, 128);"></param></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><paramname="RemoteSavePath"></span><span style="color: rgb(0, 128, 0);">保存路径</span><span style="color: rgb(128, 128, 128);"></param></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><returns></span><span style="color: rgb(0, 128, 0);">保存状态</span><span style="color: rgb(128, 128, 128);"></returns></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_6429_6582_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_6429_6582_Closed_Image" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">bool</span><span style="color: rgb(0, 0, 0);">SendFileBytes(</span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[]fileBytes,</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">RemoteSavePath)</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_6429_6582_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_6429_6582_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 0);">!</span><span style="color: rgb(0, 0, 0);">_Active)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_6472_6540_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_6472_6540_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">try</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_6472_6540_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_6472_6540_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">nft.SendFileBytes(fileBytes,RemoteSavePath); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_6546_6576_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_6546_6576_Closed_Image" alt="">}</span></span><span style="color: rgb(0, 0, 255);">catch</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_6546_6576_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_6546_6576_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_6589_6774_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_6589_6774_Closed_Image" alt=""></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_6589_6774_Closed_Text">/**/</span><span id="Codehighlighter1_6589_6774_Open_Text"><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);">发送文件,并保存到主机 <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"></summary></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><paramname="LocalFilePath"></span><span style="color: rgb(0, 128, 0);">本地文件</span><span style="color: rgb(128, 128, 128);"></param></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><paramname="RemoteSavePath"></span><span style="color: rgb(0, 128, 0);">远端保存路径</span><span style="color: rgb(128, 128, 128);"></param></span><span style="color: rgb(0, 128, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt=""></span><span style="color: rgb(128, 128, 128);">///</span><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(128, 128, 128);"><returns></span><span style="color: rgb(0, 128, 0);">是否成功</span><span style="color: rgb(128, 128, 128);"></returns></span><span style="color: rgb(128, 128, 128);"></span></span> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_6843_7253_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_6843_7253_Closed_Image" alt=""><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">bool</span><span style="color: rgb(0, 0, 0);">SendFile(</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">LocalFilePath,</span><span style="color: rgb(0, 0, 255);">string</span><span style="color: rgb(0, 0, 0);">RemoteSavePath)</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_6843_7253_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_6843_7253_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 0);">!</span><span style="color: rgb(0, 0, 0);">_Active)</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_6886_7211_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_6886_7211_Closed_Image" alt=""></span><span style="color: rgb(0, 0, 255);">try</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_6886_7211_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_6886_7211_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 0);">!</span><span style="color: rgb(0, 0, 0);">File.Exists(LocalFilePath))</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">FileStreamfs</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">FileStream(LocalFilePath,FileMode.Open,FileAccess.Read,FileShare.Read); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[]buffer</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[fs.Length]; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">fs.Read(buffer,</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">,buffer.Length); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt="">fs.Close(); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">nft.SendFileBytes(buffer,RemoteSavePath); <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" id="Codehighlighter1_7217_7247_Open_Image" alt=""><img width="11" height="16" align="top" style="display: none;" src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" id="Codehighlighter1_7217_7247_Closed_Image" alt="">}</span></span><span style="color: rgb(0, 0, 255);">catch</span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_7217_7247_Closed_Text"><img width="15" height="20" src="http://www.cnblogs.com/Images/dot.gif" alt=""></span><span id="Codehighlighter1_7217_7247_Open_Text"><span style="color: rgb(0, 0, 0);">{ <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""></span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">; <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" alt=""><br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" alt="">}</span></span><span style="color: rgb(0, 0, 0);"> <br><img width="11" height="16" align="top" src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" alt=""></span><a href="http://www.cnblogs.com/Files/Chinasf/SocketLibrary.rar">点这里下载工程代码和演示程序</a>