Socket s = null ; try { s = CommunClass.ConnectToServer(Host,Port) ; CommunClass.WriteCommandToSocket(s,"SENDFILE") ; CommunClass.WriteCommandDescToSocket(s,"") ; CommunClass.WriteFileToSocket(s,FileToSend,new CommunClass.OnSend(OnSendDrawProgress)) ; } catch (Exception e) { MessageBox.Show(e.Message) ; } finally { if (s != null) s.Close() ; } } public void OnSendDrawProgress(int iTotal,int iSending) { 页码:[1] [2] [3] [4] [5] [6] [7] [8] 第5页、共8页 |