private void DoNetSend() { if (fileName == null) { MessageBox.Show("请先选择要下载的文件", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } IPAddress ip; try { ip = IPAddress.Parse(txtIP.Text); } catch (Exception) { MessageBox.Show("IP地址设置有误!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); txtIP.Focus(); return; } Cursor.Current = Cursors.WaitCursor; Application.DoEvents(); 载.Enabled = false; try { TFTPClient tftp = new TFTPClient(txtIP.Text); tftp.Put("Coin.bin", fileName); //MessageBox.Show("PUT finished"); } catch (TFTPClient.TFTPException tx) { MessageBox.Show("Exception in PUT: " + tx.ErrorMessage); Cursor.Current = Cursors.Default; } 载.Enabled = true; Cursor.Current = Cursors.Default; Application.DoEvents(); }
public void TestPutCoarseWrapper() { client.Put(remotePath, localPath); FileAssert.AreEqual(localPath, serverPath + remotePath); }
public static void PutCoarseWrapper() { clnt.Put(remotePutPath, localPutPath); }