diff --git a/App.config b/App.config
new file mode 100644
index 0000000..193aecc
--- /dev/null
+++ b/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/App.xaml b/App.xaml
new file mode 100644
index 0000000..76aac41
--- /dev/null
+++ b/App.xaml
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
+
diff --git a/App.xaml.cs b/App.xaml.cs
new file mode 100644
index 0000000..6ea5ef3
--- /dev/null
+++ b/App.xaml.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace MinecraftServerDownloader
+{
+ public partial class App : System.Windows.Application
+ {
+ protected override void OnStartup(StartupEventArgs e)
+ {
+ base.OnStartup(e);
+ // 订阅 DispatcherUnhandledException 事件
+ Current.DispatcherUnhandledException += Current_DispatcherUnhandledException;
+ }
+
+ private void Current_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
+ {
+ // 处理异常
+ Exception exception = e.Exception;
+ // 进行异常处理逻辑,如记录异常信息、显示错误消息等
+
+ // 标记为已处理,以防止应用程序崩溃
+ e.Handled = true;
+ }
+ }
+}
diff --git a/MainWindow.xaml b/MainWindow.xaml
new file mode 100644
index 0000000..fc7dd60
--- /dev/null
+++ b/MainWindow.xaml
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs
new file mode 100644
index 0000000..65304f0
--- /dev/null
+++ b/MainWindow.xaml.cs
@@ -0,0 +1,324 @@
+using MinecraftServerDownloader.Modules;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Newtonsoft.Json;
+using System.Threading;
+using System.Security.Policy;
+
+namespace MinecraftServerDownloader
+{
+ public class Projects
+ {
+ public List projects;
+ }
+
+ public class ProjectDetail
+ {
+ public string ProjectId { get; set; }
+ public string ProjectName { get; set; }
+ public List VersionGroups { get; set; }
+ public List Versions { get; set; }
+ }
+
+ public class BuildData
+ {
+ public string ProjectId { get; set; }
+ public string ProjectName { get; set; }
+ public string Version { get; set; }
+ public List Builds { get; set; }
+ }
+
+ public class ProjectData
+ {
+ public string ProjectId { get; set; }
+ public string ProjectName { get; set; }
+ public string Version { get; set; }
+ public int Build { get; set; }
+ public DateTime Time { get; set; }
+ public string Channel { get; set; }
+ public bool Promoted { get; set; }
+ public List Changes { get; set; }
+ public Downloads Downloads { get; set; }
+ }
+
+ public class Change
+ {
+ public string Commit { get; set; }
+ public string Summary { get; set; }
+ public string Message { get; set; }
+ }
+
+ public class Downloads
+ {
+ public Application Application { get; set; }
+ }
+
+ public class Application
+ {
+ public string Name { get; set; }
+ public string Sha256 { get; set; }
+ }
+ ///
+ /// MainWindow.xaml 的交互逻辑
+ ///
+ public partial class MainWindow : Window
+ {
+ string downloadUrl = "NO";
+ public MainWindow()
+ {
+ InitializeComponent();
+
+ Initialize();
+ }
+
+ public async void Initialize()
+ {
+ // GET请求 到 https://api.papermc.io/v2/projects
+ // 该API返回一个JSON字符串,包含了PaperMC的所有项目
+
+ var projectsString = await ModNetwork.SendGetRequest("https://api.papermc.io/v2/projects");
+
+ Console.WriteLine(projectsString);
+
+ // 解析json
+ var projects = JsonConvert.DeserializeObject(projectsString);
+ projectsSel.Items.Clear();
+ projects.projects.ForEach((a)=>
+ {
+ projectsSel.Items.Add(a);
+ });
+
+ new Thread(() =>
+ {
+ while (true)
+ {
+ if (downloadUrl.Equals("NO"))
+ {
+ System.Windows.Application.Current.Dispatcher.Invoke(() =>
+ {
+ buttonDownload.IsEnabled = false;
+ });
+ }
+ Thread.Sleep(100);
+ }
+ }).Start();
+ }
+
+ private async void projectsSel_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ e.Handled = true;
+
+ buildSel.Items.Clear();
+ buildSel.SelectedItem = null;
+ versionSel.Items.Clear();
+ versionSel.SelectedItem = null;
+
+ downloadUrl = "NO";
+ typeHash.Text = "服务端SHA-256:";
+ typeBuild.Text = "服务端构建号:";
+ typeTime.Text = "服务端发布时间:";
+ typeDownload.Text = "服务端下载地址:";
+ typeVersion.Text = "服务端版本:";
+
+ typeBuild.Visibility = Visibility.Hidden;
+ typeHash.Visibility = Visibility.Hidden;
+ typeTime.Visibility = Visibility.Hidden;
+ typeDownload.Visibility = Visibility.Hidden;
+ typeVersion.Visibility = Visibility.Hidden;
+
+ var projectDetailString = await ModNetwork.SendGetRequest("https://api.papermc.io/v2/projects/" + projectsSel.SelectedItem);
+
+ Console.WriteLine(projectDetailString);
+
+ // 解析
+ var projectDetail = JsonConvert.DeserializeObject(projectDetailString);
+ versionSel.Items.Clear();
+ projectDetail.Versions.ForEach((a) =>
+ {
+ versionSel.Items.Add(a);
+ });
+ typeName.Text = "服务端类型:" + projectsSel.SelectedItem;
+ typeName.Visibility = Visibility.Visible;
+ }
+
+ private async void versionSel_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ e.Handled = true;
+
+ buildSel.Items.Clear();
+ buildSel.SelectedItem = null;
+
+ downloadUrl = "NO";
+ typeHash.Text = "服务端SHA-256:";
+ typeBuild.Text = "服务端构建号:";
+ typeTime.Text = "服务端发布时间:";
+ typeDownload.Text = "服务端下载地址:";
+
+ typeBuild.Visibility = Visibility.Hidden;
+ typeHash.Visibility = Visibility.Hidden;
+ typeTime.Visibility = Visibility.Hidden;
+ typeDownload.Visibility = Visibility.Hidden;
+
+ var buildDataString = await ModNetwork.SendGetRequest("https://api.papermc.io/v2/projects/" + projectsSel.SelectedItem + "/versions/" + versionSel.SelectedItem);
+
+ Console.WriteLine(buildDataString);
+ // 解析
+ var buildData = JsonConvert.DeserializeObject(buildDataString);
+ buildSel.Items.Clear();
+ var willAdd = buildData.Builds;
+ willAdd.Sort((a, b) => b.CompareTo(a));
+ willAdd.ForEach((a) =>
+ {
+ buildSel.Items.Add(a);
+ });
+
+ typeVersion.Text = "服务端版本:" + versionSel.SelectedItem;
+ typeVersion.Visibility = Visibility.Visible;
+ }
+
+ private async void buildSel_SelectionChanged(object sender, SelectionChangedEventArgs e)
+ {
+ e.Handled = true;
+ downloadUrl = "NO";
+ if (buildSel.SelectedItems.Count <= 0)
+ {
+ return;
+ }
+ var projectDataString = await ModNetwork.SendGetRequest("https://api.papermc.io/v2/projects/" + projectsSel.SelectedItem + "/versions/" + versionSel.SelectedItem + "/builds/" + buildSel.SelectedItem);
+
+ Console.WriteLine(projectDataString);
+ // 解析
+ try
+ {
+ var projectData = JsonConvert.DeserializeObject(projectDataString);
+ typeBuild.Text = "服务端构建号:" + buildSel.SelectedItem;
+ typeHash.Text = "服务端SHA-256:" + projectData.Downloads.Application.Sha256;
+ typeTime.Text = "服务端发布时间:" + projectData.Time.ToString("yyyy-MM-dd HH:mm:ss");
+ typeDownload.Text = "服务端下载地址:" + "https://api.papermc.io/v2/projects/" + projectsSel.SelectedItem + "/versions/" + versionSel.SelectedItem + "/builds/" + buildSel.SelectedItem + "/downloads/" + projectData.Downloads.Application.Name;
+ typeDownload.Tag = "https://api.papermc.io/v2/projects/" + projectsSel.SelectedItem + "/versions/" + versionSel.SelectedItem + "/builds/" + buildSel.SelectedItem + "/downloads/" + projectData.Downloads.Application.Name;
+ typeHash.Tag = projectData.Downloads.Application.Sha256;
+
+ typeBuild.Visibility = Visibility.Visible;
+ typeHash.Visibility = Visibility.Visible;
+ typeTime.Visibility = Visibility.Visible;
+ typeDownload.Visibility = Visibility.Visible;
+
+ downloadUrl = "https://api.papermc.io/v2/projects/" + projectsSel.SelectedItem + "/versions/" + versionSel.SelectedItem + "/builds/" + buildSel.SelectedItem + "/downloads/" + projectData.Downloads.Application.Name;
+ buttonDownload.IsEnabled = true;
+ } catch
+ {
+
+ }
+ }
+
+ private void typeDownload_MouseDown(object sender, MouseButtonEventArgs e)
+ {
+ Clipboard.SetDataObject(typeDownload.Tag);
+ var temp = typeDownload.Text;
+ typeDownload.Text = "已复制";
+
+ // 创建一个定时器,3秒后恢复原始文本
+ var timer = new Timer(state =>
+ {
+ Dispatcher.Invoke(() =>
+ {
+ typeDownload.Text = temp;
+ });
+ }, null, TimeSpan.FromSeconds(3), TimeSpan.FromMilliseconds(-1));
+ }
+
+ private void typeHash_MouseDown(object sender, MouseButtonEventArgs e)
+ {
+ Clipboard.SetDataObject(typeHash.Tag);
+
+ var temp = typeHash.Text;
+ typeHash.Text = "已复制";
+
+ // 创建一个定时器,3秒后恢复原始文本
+ var timer = new Timer(state =>
+ {
+ Dispatcher.Invoke(() =>
+ {
+ typeHash.Text = temp;
+ });
+ }, null, TimeSpan.FromSeconds(3), TimeSpan.FromMilliseconds(-1));
+ }
+
+ private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
+ {
+ Environment.Exit(0);
+ }
+
+ private void buttonDownload_Click(object sender, RoutedEventArgs e)
+ {
+ ProgressDownload.Visibility = Visibility.Visible;
+ buttonDownload.Visibility = Visibility.Collapsed;
+ Console.WriteLine(downloadUrl);
+ var downloader = new MultiThreadedDownloader(downloadUrl,
+ System.IO.Path.Combine(Environment.CurrentDirectory, string.Format("{0}-{1}-{2}.jar", projectsSel.SelectedItem, versionSel.SelectedItem, buildSel.SelectedItem)),
+ 4);
+ downloader.ProgressChanged += (threadId, downloadedBytes, percent) =>
+ {
+ Console.WriteLine($"Thread {threadId}: Downloaded {downloadedBytes} bytes.");
+
+ Dispatcher.Invoke(() =>
+ {
+ ProgressDownload.Value = percent;
+ });
+ };
+ downloader.DownloadCompleted += (success, error) =>
+ {
+ if (success)
+ {
+ Console.WriteLine("Download completed successfully.");
+ Dispatcher.Invoke(() =>
+ {
+ buttonDownload.Content = "下载成功";
+ Console.WriteLine(System.IO.Path.Combine(Environment.CurrentDirectory, string.Format("{0}-{1}-{2}.jar", projectsSel.SelectedItem, versionSel.SelectedItem, buildSel.SelectedItem)));
+ buttonDownload.Visibility = Visibility.Visible;
+ ProgressDownload.Visibility = Visibility.Collapsed;
+ });
+ var timer = new Timer(state =>
+ {
+ Dispatcher.Invoke(() =>
+ {
+ buttonDownload.Content = "下载";
+ });
+ }, null, TimeSpan.FromSeconds(3), TimeSpan.FromMilliseconds(-1));
+ }
+ else
+ {
+ Console.WriteLine($"Download failed with error: {error.Message}");
+ Console.WriteLine(error.StackTrace);
+ Dispatcher.Invoke(() =>
+ {
+ buttonDownload.Content = "下载失败";
+
+ buttonDownload.Visibility = Visibility.Visible;
+ ProgressDownload.Visibility = Visibility.Collapsed;
+ });
+ var timer = new Timer(state =>
+ {
+ Dispatcher.Invoke(() =>
+ {
+ buttonDownload.Content = "下载";
+ });
+ }, null, TimeSpan.FromSeconds(3), TimeSpan.FromMilliseconds(-1));
+ }
+ };
+ downloader.StartDownload();
+ }
+ }
+}
diff --git a/MinecraftServerDownloader.csproj b/MinecraftServerDownloader.csproj
new file mode 100644
index 0000000..9917e69
--- /dev/null
+++ b/MinecraftServerDownloader.csproj
@@ -0,0 +1,103 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {D14059ED-9AE2-4AC7-B3A4-C581794C36E7}
+ WinExe
+ MinecraftServerDownloader
+ MinecraftServerDownloader
+ v4.8
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+ true
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+ packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll
+
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ App.xaml
+
+
+ MainWindow.xaml
+ Code
+
+
+
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MinecraftServerDownloader.sln b/MinecraftServerDownloader.sln
new file mode 100644
index 0000000..ed3f6f2
--- /dev/null
+++ b/MinecraftServerDownloader.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.4.33213.308
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MinecraftServerDownloader", "MinecraftServerDownloader.csproj", "{D14059ED-9AE2-4AC7-B3A4-C581794C36E7}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D14059ED-9AE2-4AC7-B3A4-C581794C36E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D14059ED-9AE2-4AC7-B3A4-C581794C36E7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D14059ED-9AE2-4AC7-B3A4-C581794C36E7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D14059ED-9AE2-4AC7-B3A4-C581794C36E7}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {CBD5D56B-29E5-4251-BEAD-7EC6F71531CA}
+ EndGlobalSection
+EndGlobal
diff --git a/Modules/ModNetwork.cs b/Modules/ModNetwork.cs
new file mode 100644
index 0000000..a1bb474
--- /dev/null
+++ b/Modules/ModNetwork.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net.Http;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MinecraftServerDownloader.Modules
+{
+ internal static class ModNetwork
+ {
+ public static async Task SendGetRequest(string url)
+ {
+ using (HttpClient client = new HttpClient())
+ {
+ HttpResponseMessage httpResponse = await client.GetAsync(url);
+ httpResponse.EnsureSuccessStatusCode(); // 确保响应成功
+
+ string responseContent = await httpResponse.Content.ReadAsStringAsync();
+ return responseContent;
+ }
+ }
+ }
+}
diff --git a/Modules/MultiThreadedDownloader.cs b/Modules/MultiThreadedDownloader.cs
new file mode 100644
index 0000000..790cd88
--- /dev/null
+++ b/Modules/MultiThreadedDownloader.cs
@@ -0,0 +1,196 @@
+using System;
+using System.IO;
+using System.Net;
+using System.Threading;
+
+namespace MinecraftServerDownloader.Modules
+{
+ internal class MultiThreadedDownloader
+ {
+ private const int BufferSize = 4096; // 缓冲区大小
+
+ private string downloadUrl; // 下载文件的URL
+ private string savePath; // 保存文件的路径
+ private int threadCount; // 线程数量
+
+ private long totalSize; // 文件总大小
+ private long downloadedSize; // 已下载的文件大小
+
+ private ManualResetEvent[] downloadEvents; // 用于线程同步的 ManualResetEvent 数组
+ private bool[] isThreadFinished; // 标记线程是否完成下载
+ private Exception downloadException; // 下载过程中出现的异常
+
+ public event Action ProgressChanged; // 下载百分比改变事件
+ public event Action DownloadCompleted; // 下载完成事件
+
+ public MultiThreadedDownloader(string url, string savePath, int threadCount)
+ {
+ downloadUrl = url;
+ this.savePath = savePath;
+ this.threadCount = threadCount;
+ }
+
+ public void StartDownload()
+ {
+ try
+ {
+ using (var webClient = new WebClient())
+ {
+ webClient.DownloadDataCompleted += WebClient_DownloadDataCompleted;
+
+ // 开始异步下载
+ webClient.DownloadDataAsync(new Uri(downloadUrl));
+ }
+ }
+ catch (Exception ex)
+ {
+ OnDownloadCompleted(false, ex);
+ }
+ }
+
+ private void WebClient_DownloadDataCompleted(object sender, DownloadDataCompletedEventArgs e)
+ {
+ try
+ {
+ if (e.Error != null)
+ {
+ OnDownloadCompleted(false, e.Error);
+ return;
+ }
+
+ byte[] data = e.Result;
+
+ // 获取文件的大小
+ string contentLengthHeader = ((WebClient)sender).ResponseHeaders["Content-Length"];
+ if (!string.IsNullOrEmpty(contentLengthHeader) && long.TryParse(contentLengthHeader, out long fileSize))
+ {
+ totalSize = fileSize;
+ }
+ else
+ {
+ throw new Exception("无法获取文件大小。");
+ }
+
+ downloadedSize = 0;
+ downloadEvents = new ManualResetEvent[threadCount];
+ isThreadFinished = new bool[threadCount];
+
+ // 创建线程并开始下载
+ int completedThreadCount = 0; // 完成下载的线程数量
+ for (int i = 0; i < threadCount; i++)
+ {
+ int threadId = i;
+ downloadEvents[threadId] = new ManualResetEvent(false);
+ isThreadFinished[threadId] = false;
+
+ ThreadPool.QueueUserWorkItem(state =>
+ {
+ DownloadPart(data, threadId);
+ Interlocked.Increment(ref completedThreadCount); // 增加已完成的线程数量
+
+ if (completedThreadCount == threadCount)
+ {
+ // 所有线程都已完成下载
+ if (downloadException != null)
+ {
+ OnDownloadCompleted(false, downloadException);
+ }
+ else
+ {
+ MergeFilesAndDeleteTempFiles();
+ OnDownloadCompleted(true, null);
+ }
+ }
+ });
+ }
+
+ // 等待所有下载线程完成
+ WaitHandle.WaitAll(downloadEvents);
+ }
+ catch (Exception ex)
+ {
+ OnDownloadCompleted(false, ex);
+ }
+ }
+
+ private void DownloadPart(byte[] data, int threadId)
+ {
+ try
+ {
+ // 计算每个线程负责下载的字节范围
+ long start = (totalSize / threadCount) * threadId;
+ long end = threadId == threadCount - 1 ? totalSize - 1 : (totalSize / threadCount) * (threadId + 1) - 1;
+
+ // 截取数据范围
+ byte[] partData = new byte[end - start + 1];
+ Array.Copy(data, start, partData, 0, partData.Length);
+
+ // 写入临时分块文件
+ string tempFilePath = $"{savePath}.{threadId}";
+ using (var outputStream = File.OpenWrite(tempFilePath))
+ {
+ outputStream.Write(partData, 0, partData.Length);
+ }
+
+ // 更新已下载的文件大小和下载进度
+ Interlocked.Add(ref downloadedSize, partData.Length);
+ int progressPercentage = (int)((downloadedSize * 100) / totalSize);
+
+ // 触发进度变化事件
+ OnProgressChanged(threadId, downloadedSize, progressPercentage);
+
+ isThreadFinished[threadId] = true;
+ downloadEvents[threadId].Set();
+ }
+ catch (Exception ex)
+ {
+ downloadException = ex;
+ downloadEvents[threadId].Set();
+ }
+ }
+
+ private void MergeFilesAndDeleteTempFiles()
+ {
+ string[] tempFilePaths = new string[threadCount];
+ for (int i = 0; i < threadCount; i++)
+ {
+ tempFilePaths[i] = $"{savePath}.{i}";
+ }
+
+ FileMerger.MergeFiles(tempFilePaths, savePath);
+
+ // 删除临时分块文件
+ foreach (var tempFilePath in tempFilePaths)
+ {
+ File.Delete(tempFilePath);
+ }
+ }
+
+ private void OnProgressChanged(int threadId, long downloadedBytes, int progressPercentage)
+ {
+ ProgressChanged?.Invoke(threadId, downloadedBytes, progressPercentage);
+ }
+
+ private void OnDownloadCompleted(bool success, Exception error)
+ {
+ DownloadCompleted?.Invoke(success, error);
+ }
+ }
+
+ internal class FileMerger
+ {
+ public static void MergeFiles(string[] filePaths, string savePath)
+ {
+ using (var outputStream = File.OpenWrite(savePath))
+ {
+ foreach (var filePath in filePaths)
+ {
+ using (var inputStream = File.OpenRead(filePath))
+ {
+ inputStream.CopyTo(outputStream);
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..320bc0a
--- /dev/null
+++ b/Properties/AssemblyInfo.cs
@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("MinecraftServerDownloader")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("MinecraftServerDownloader")]
+[assembly: AssemblyCopyright("Copyright © 2023")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 会使此程序集中的类型
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+//若要开始生成可本地化的应用程序,请设置
+//.csproj 文件中的 CultureYouAreCodingWith
+//例如,如果您在源文件中使用的是美国英语,
+//使用的是美国英语,请将 设置为 en-US。 然后取消
+//对以下 NeutralResourceLanguage 特性的注释。 更新
+//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //主题特定资源词典所处位置
+ //(未在页面中找到资源时使用,
+ //或应用程序资源字典中找到时使用)
+ ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
+ //(未在页面中找到资源时使用,
+ //、应用程序或任何主题专用资源字典中找到时使用)
+)]
+
+
+// 程序集的版本信息由下列四个值组成:
+//
+// 主版本
+// 次版本
+// 生成号
+// 修订号
+//
+//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
+//通过使用 "*",如下所示:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..f78b6a9
--- /dev/null
+++ b/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// 此代码由工具生成。
+// 运行时版本: 4.0.30319.42000
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+//
+//------------------------------------------------------------------------------
+
+namespace MinecraftServerDownloader.Properties
+{
+
+
+ ///
+ /// 强类型资源类,用于查找本地化字符串等。
+ ///
+ // 此类是由 StronglyTypedResourceBuilder
+ // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+ // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+ // (以 /str 作为命令选项),或重新生成 VS 项目。
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// 返回此类使用的缓存 ResourceManager 实例。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MinecraftServerDownloader.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// 重写当前线程的 CurrentUICulture 属性,对
+ /// 使用此强类型资源类的所有资源查找执行重写。
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/Properties/Resources.resx b/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..9a772cc
--- /dev/null
+++ b/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace MinecraftServerDownloader.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/Properties/Settings.settings b/Properties/Settings.settings
new file mode 100644
index 0000000..033d7a5
--- /dev/null
+++ b/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages.config b/packages.config
new file mode 100644
index 0000000..0b14af3
--- /dev/null
+++ b/packages.config
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file