diff --git a/ProjBobcat/ProjBobcat/Class/Helper/DownloadHelper.cs b/ProjBobcat/ProjBobcat/Class/Helper/DownloadHelper.cs
index 56c27e33..4be57f5d 100644
--- a/ProjBobcat/ProjBobcat/Class/Helper/DownloadHelper.cs
+++ b/ProjBobcat/ProjBobcat/Class/Helper/DownloadHelper.cs
@@ -25,7 +25,7 @@ public static class DownloadHelper
///
/// 下载线程
///
- public static int DownloadThread { get; set; }
+ public static int DownloadThread { get; set; } = 8;
static HttpClient DataClient => HttpClientHelper.GetNewClient(HttpClientHelper.DataClientName);
diff --git a/ProjBobcat/ProjBobcat/DefaultComponent/DefaultResourceCompleter.cs b/ProjBobcat/ProjBobcat/DefaultComponent/DefaultResourceCompleter.cs
index 20207b16..6627483a 100644
--- a/ProjBobcat/ProjBobcat/DefaultComponent/DefaultResourceCompleter.cs
+++ b/ProjBobcat/ProjBobcat/DefaultComponent/DefaultResourceCompleter.cs
@@ -25,8 +25,8 @@ public class DefaultResourceCompleter : IResourceCompleter
bool disposedValue;
- public int TotalDownloaded { get; set; }
- public int NeedToDownload { get; set; }
+ public int TotalDownloaded { get; private set; }
+ public int NeedToDownload { get; private set; }
public int DownloadParts { get; set; } = 16;
public int TotalRetry { get; set; }
@@ -64,8 +64,7 @@ public event EventHandler DownloadFileCompletedE
var totalLostFiles = new List();
foreach (var resolver in ResourceInfoResolvers)
{
- var handler = (EventHandler) _listEventDelegates[ResolveEventKey]!;
- if (handler != null)
+ if (_listEventDelegates[ResolveEventKey] is EventHandler handler)
resolver.GameResourceInfoResolveEvent += handler;
var lostFiles = await resolver.ResolveResourceAsync();
diff --git a/ProjBobcat/ProjBobcat/Interface/IResourceCompleter.cs b/ProjBobcat/ProjBobcat/Interface/IResourceCompleter.cs
index 3df12103..c1c3b0b1 100644
--- a/ProjBobcat/ProjBobcat/Interface/IResourceCompleter.cs
+++ b/ProjBobcat/ProjBobcat/Interface/IResourceCompleter.cs
@@ -23,8 +23,8 @@ public interface IResourceCompleter : IDisposable
///
bool CheckFile { get; set; }
- public int TotalDownloaded { get; set; }
- public int NeedToDownload { get; set; }
+ public int TotalDownloaded { get; }
+ public int NeedToDownload { get; }
///
/// 游戏资源解析器集合