SVN r1104
SVN-Revision: r1104
This commit is contained in:
@@ -11,11 +11,15 @@ using System.Web;
|
||||
using System.Windows.Forms;
|
||||
using Xilium.CefGlue;
|
||||
using Lskj.Control.Model;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Lskj.Control.BrowserSetting
|
||||
{
|
||||
public class BsDownloadHandler : CefDownloadHandler
|
||||
{
|
||||
[DllImport("user32.dll", ExactSpelling = true, CharSet = CharSet.Auto)]
|
||||
public static extern IntPtr GetParent(IntPtr hWnd);
|
||||
|
||||
private BsClient BsClient;
|
||||
public BsDownloadHandler(BsClient bsClient)
|
||||
{
|
||||
@@ -72,7 +76,9 @@ namespace Lskj.Control.BrowserSetting
|
||||
bool success = rowItem != null ? AttachImpl.CheckAttachOperation(2, "", Convert.ToInt32(rowItem["fileId"]), "", 0, out tipMsg) == 1 : isMultipleLoad;
|
||||
if (success)
|
||||
{
|
||||
Download(downloadItem.Url, fileTitle);
|
||||
string ModuleCode = string.Empty;
|
||||
GetParentForm(browser, out ModuleCode);
|
||||
Download(downloadItem.Url, fileTitle, ModuleCode);
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -160,7 +166,26 @@ namespace Lskj.Control.BrowserSetting
|
||||
/// </summary>
|
||||
/// <param name="URL">The URL.</param>
|
||||
/// <param name="FileName">Name of the file.</param>
|
||||
public static void Download(string URL, string FileName)
|
||||
public static void Download(string URL, string FileName,string ModuleCode)
|
||||
{
|
||||
FrmSelectDownload frmSelectDownload = new FrmSelectDownload();
|
||||
frmSelectDownl
|
||||
frmSelectDownload.URL = URL;
|
||||
frmSelectDownload.FileName = FileName;
|
||||
frmSelectDownload.ModelId = ModuleCode;
|
||||
frmSelectDownload.Show();
|
||||
//SaveFileDialog saveFileDialog = new SaveFileDialog();
|
||||
//saveFileDialog.FileName = FileName;
|
||||
//saveFileDialog.Title = "下载模板文件到";
|
||||
//saveFileDialog.RestoreDirectory = true;
|
||||
////点了保存按钮进入
|
||||
//if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||
//{
|
||||
// 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();
|
||||
//}
|
||||
}
|
||||
/// <summary>
|
||||
/// 通过 CefBrowser 获取所在��
|
||||
Reference in New Issue
Block a user