| 12345678910111213141516171819202122232425262728293031 |
- using CefSharp;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace UAS_Web.tool
- {
- class DownLoadFile : IDownloadHandler
- {
- public void OnBeforeDownload(IBrowser browser, DownloadItem downloadItem, IBeforeDownloadCallback callback)
- {
- if (!callback.IsDisposed)
- {
- using (callback)
- {
- callback.Continue(@"C:\Users\" +
- System.Security.Principal.WindowsIdentity.GetCurrent().Name +
- @"\Downloads\" +
- downloadItem.SuggestedFileName,
- showDialog: true);
- }
- }
- }
- public void OnDownloadUpdated(IBrowser browser, DownloadItem downloadItem, IDownloadItemCallback callback)
- {
- }
- }
- }
|