SVN r1215

SVN-Revision: r1215
This commit is contained in:
cyf
2026-06-18 06:03:41 +00:00
parent 19ae29f016
commit 78c8310d41
+25 -17
View File
@@ -54,7 +54,7 @@ namespace Lskj.PubBrower
{
urlEnd = string.IsNullOrEmpty(PubBrowerModel.UrlParame) ? ReplaceHelper.ReplaceUserInfo(PubBrowerModel.ModuleCode) : string.IsNullOrWhiteSpace(PubBrowerModel.UrlParame) ? "" : HttpUtility.UrlEncode(PubBrowerModel.UrlParame);
}
this.Tag= urlEnd;
this.Tag = urlEnd;
string OAUrlAndEnd = string.Empty;
if (!(PubBrowerModel.BetweenDLLCoid != null && PubBrowerModel.BetweenDLLCoid.StartsWith("http")) && !urlEnd.StartsWith("http"))
{
@@ -79,6 +79,7 @@ namespace Lskj.PubBrower
if (downLoadFlag)
{
this.Close();
url = HttpUtility.UrlDecode(url);
url = url.Replace("%2f", "/");
url = url.Replace("#", "%23");
@@ -86,10 +87,12 @@ namespace Lskj.PubBrower
//browserNew.Navigate(url);
string[] newurl = url.Split('?');
string szFilename = newurl[0].Substring(newurl[0].LastIndexOf('/') + 1);//简单处理文件名,实际中还需要单独处理,这里有BUG
//string SzFileName = HttpUtility.UrlDecode(szFilename);
//string SzFileName = HttpUtility.UrlDecode(szFilename);
string[] szName = szFilename.Split('/');
string fileTitle = szName[szName.Length - 1];
Download(url, fileTitle);
}
else
{
@@ -148,25 +151,30 @@ namespace Lskj.PubBrower
/// <param name="FileName">Name of the file.</param>
public static void Download(string URL, string FileName)
{
FrmSelectDownload frmSelectDownload = new FrmSelectDownload();
frmSelectDownload.URL = URL;
frmSelectDownload.FileName = FileName;
frmSelectDownload.isBatchDownLoad = isBatchBrower;
// frmSelectDownload.TopMost = true;
frmSelectDownload.ShowDialog();
//SaveFileDialog saveFileDialog = new SaveFileDialog();
//saveFileDialog.FileName = FileName;
//saveFileDialog.Title = "下载模板文件到";
//saveFileDialog.RestoreDirectory = true;
////点了保存按钮进入
//if (saveFileDialog.ShowDialog() == DialogResult.OK)
//if (!string.IsNullOrWhiteSpace(Delimiter))
//{
// string localFilePath = System.IO.Path.GetFullPath(saveFileDialog.FileName);//获得文件路径,含文件名
// string fileNameExt = localFilePath.Substring(localFilePath.LastIndexOf("\\") + 1);//获取文件名,不带路径
// string FilePath = localFilePath.Substring(0, localFilePath.LastIndexOf("\\"));//获取文件路径,不带文件名
// FrmDownload frm = new FrmDownload(URL, FileName, localFilePath);
// frm.Show();
//}
}
}
}
// //批量下载
// int filequency = 0;
// string[] urls = URL.Split(new[] { Delimiter }, StringSplitOptions.None);
// bool isOpenvisble = urls.Count() > 0;
// foreach (string item in urls)
// {
// string url = item;
// url = HttpUtility.UrlDecode(url);
// url = item.Replace("%2f", "/");
// url = item.Replace("#", "%23");
// string[] newurl = url.Split('?');
// string szFilename = newurl[0].Substring(newurl[0].LastIndexOf('/') + 1);//简单处理文件名,实际中还需要单独处理,这里有BUG
// string[] szName = szFilename.Split('/');
// string fileTitle = szName[szName.Length - 1];
// FrmSelectDownload frmSelectDownload = new FrmSelectDownload();
// if (filequency > 0) frmSe