Skip to content

Commit

Permalink
Use Flyout to mimic the ContentDialog that can be inputed
Browse files Browse the repository at this point in the history
1.Use Flyout to mimic the ContentDialog that can be inputed
2.Fix delivery optimization and background intelligent transfer service downloading bug
  • Loading branch information
Gaoyifei1011 committed Jun 2, 2024
1 parent e8d754a commit 2460fb0
Show file tree
Hide file tree
Showing 22 changed files with 555 additions and 1,012 deletions.
6 changes: 3 additions & 3 deletions WindowsTools/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
[assembly: AssemblyCompany("高怡飞")]
[assembly: AssemblyCopyright("Copyright ©2024 高怡飞, All Rights Reserved.")]
[assembly: AssemblyDescription("Windows 工具箱")]
[assembly: AssemblyFileVersion("2.5.528.0")]
[assembly: AssemblyInformationalVersion("2.5.528.0")]
[assembly: AssemblyFileVersion("2.5.602.0")]
[assembly: AssemblyInformationalVersion("2.5.602.0")]
[assembly: AssemblyProduct("Windows 工具箱")]
[assembly: AssemblyTitle("Windows 工具箱")]
[assembly: AssemblyVersion("2.5.528.0")]
[assembly: AssemblyVersion("2.5.602.0")]
3 changes: 1 addition & 2 deletions WindowsTools/Services/Controls/Download/BitsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Diagnostics.Tracing;
using System.IO;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using WindowsTools.Services.Root;
Expand Down Expand Up @@ -129,7 +128,7 @@ public static unsafe void CreateDownload(string url, string saveFilePath)
DownloadID = downloadID
};
backgroundCopyCallback.StatusChanged += OnStatusChanged;
downloadJob.SetNotifyInterface(new UnknownWrapper(backgroundCopyCallback).WrappedObject);
downloadJob.SetNotifyInterface(backgroundCopyCallback);

downloadJob.GetProgress(out BG_JOB_PROGRESS progress);
DownloadCreated?.Invoke(backgroundCopyCallback.DownloadID, Path.GetFileName(saveFilePath), saveFilePath, url, progress.BytesTotal is ulong.MaxValue ? 0 : progress.BytesTotal);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static void CreateDownload(string url, string saveFilePath)

DODownloadStatusCallback doDownloadStatusCallback = new();
doDownloadStatusCallback.StatusChanged += OnStatusChanged;
doDownload.SetProperty(DODownloadProperty.DODownloadProperty_CallbackInterface, new UnknownWrapper(doDownloadStatusCallback).WrappedObject);
doDownload.SetProperty(DODownloadProperty.DODownloadProperty_CallbackInterface, new UnknownWrapper(doDownloadStatusCallback));
doDownload.SetProperty(DODownloadProperty.DODownloadProperty_ForegroundPriority, true);

doDownload.GetProperty(DODownloadProperty.DODownloadProperty_Id, out object id);
Expand All @@ -96,7 +96,7 @@ public static void CreateDownload(string url, string saveFilePath)
}
}

doDownload.Start(IntPtr.Zero);
int Result = doDownload.Start(IntPtr.Zero);
}
}
catch (Exception e)
Expand Down
117 changes: 0 additions & 117 deletions WindowsTools/Strings/AddDownloadTask.Designer.cs

This file was deleted.

138 changes: 0 additions & 138 deletions WindowsTools/Strings/AddDownloadTask.en-us.resx

This file was deleted.

Loading

0 comments on commit 2460fb0

Please sign in to comment.