System.Windows.Forms.FolderBrowserDialog dialog = new System.Windows.Forms.FolderBrowserDialog();
                dialog.Description = "请选择保存路径";
                if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    string url = q.IpAddress + path;
                    try
                    {
                        using (var client = new System.Net.WebClient())
                        {
                            client.DownloadFile(url, dialog.SelectedPath + "\\" + System.IO.Path.GetFileName(path));
                        }
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message, "下载异常");
                        return;
                    }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2021-09-05
  • 2022-12-23
  • 2021-12-09
  • 2021-06-24
猜你喜欢
  • 2022-12-23
  • 2021-09-23
  • 2022-12-23
  • 2021-11-18
  • 2022-01-11
相关资源
相似解决方案