优化sku ai图片处理逻辑
This commit is contained in:
1 parent
dc95bd8621
commit
4d0478a9c5
7 files changed
+284
-193
No files matched your search
@@ -12,15 +12,16 @@ namespace TemuKJD.Helper
|
||||
{
|
||||
public class CustomDownloadHandler : DownloadHandler
|
||||
{
|
||||
private string downloadPath;
|
||||
private string downloadPath;
|
||||
public Action<object, DownloadItem> DownloadCompleteEvent;
|
||||
public Action<object, DownloadItem> DownloadStartEvent;
|
||||
|
||||
public CustomDownloadHandler(string path = null)
|
||||
{
|
||||
// 设置默认下载路径为用户的下载文件夹
|
||||
downloadPath = path ?? Path.Combine(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
||||
"Downloads");
|
||||
"Downloads\\DoubaoImage");
|
||||
|
||||
// 确保下载目录存在
|
||||
if (!Directory.Exists(downloadPath))
|
||||
@@ -47,8 +48,10 @@ namespace TemuKJD.Helper
|
||||
var filePath = Path.Combine(downloadPath, downloadFileName);
|
||||
using (callback)
|
||||
{
|
||||
callback.Continue(filePath, showDialog: true);
|
||||
// 是否显示下载文件夹
|
||||
callback.Continue(filePath, showDialog: false);
|
||||
}
|
||||
DownloadStartEvent?.Invoke(chromiumWebBrowser, downloadItem);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user