{"repo_name": "SubsCheck-Win-GUI", "file_name": "/SubsCheck-Win-GUI/MoreYAML.cs", "inference_info": {"prefix_code": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Diagnostics;\nusing System.Drawing;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\n\nnamespace subs_check.win.gui\n{\n ", "suffix_code": "\n}\n", "middle_code": "public partial class MoreYAML : Form\n {\n string 初始化;\n public MoreYAML()\n {\n InitializeComponent();\n textBox1.UseWaitCursor = false;\n 初始化 = textBox1.Text;\n groupBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;\n textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;\n linkLabel1.Anchor = AnchorStyles.Top | AnchorStyles.Right;\n button1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;\n button3.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;\n button2.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;\n LoadMoreYamlConfig();\n }\n private void LoadMoreYamlConfig()\n {\n try\n {\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string configFolderPath = System.IO.Path.Combine(executablePath, \"config\");\n string moreYamlFilePath = System.IO.Path.Combine(configFolderPath, \"more.yaml\");\n if (System.IO.File.Exists(moreYamlFilePath))\n {\n string yamlContent = System.IO.File.ReadAllText(moreYamlFilePath, Encoding.UTF8);\n textBox1.Text = yamlContent;\n }\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"读取配置文件时发生错误:{ex.Message}\", \"提示\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n }\n private void button2_Click(object sender, EventArgs e)\n {\n this.Close();\n }\n private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https:\n }\n private void button1_Click(object sender, EventArgs e)\n {\n try\n {\n if (!IsValidYaml(textBox1.Text))\n {\n MessageBox.Show(\"输入的内容不符合YAML格式,请检查后重试!\", \"格式错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Warning);\n return;\n }\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string configFolderPath = System.IO.Path.Combine(executablePath, \"config\");\n string moreYamlFilePath = System.IO.Path.Combine(configFolderPath, \"more.yaml\");\n if (!System.IO.Directory.Exists(configFolderPath))\n {\n System.IO.Directory.CreateDirectory(configFolderPath);\n }\n System.IO.File.WriteAllText(moreYamlFilePath, textBox1.Text, Encoding.UTF8);\n this.DialogResult = DialogResult.OK;\n this.Close();\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"保存配置文件时发生错误:{ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n private bool IsValidYaml(string yamlContent)\n {\n if (string.IsNullOrWhiteSpace(yamlContent))\n return true; \n try\n {\n var deserializer = new YamlDotNet.Serialization.Deserializer();\n deserializer.Deserialize(yamlContent);\n return true;\n }\n catch (YamlDotNet.Core.YamlException)\n {\n return false;\n }\n catch (Exception)\n {\n return false;\n }\n }\n private void button3_Click(object sender, EventArgs e)\n {\n textBox1.Text = 初始化;\n }\n }", "code_description": null, "fill_type": "CLASS_TYPE", "language_type": "c_sharp", "sub_task_type": null}, "context_code": [["/SubsCheck-Win-GUI/Form1.cs", "using Newtonsoft.Json.Linq;\nusing System;\nusing System.Collections.Generic;\nusing System.Data;\nusing System.Diagnostics;\nusing System.Drawing;\nusing System.IO;\nusing System.IO.Compression;\nusing System.Linq;\nusing System.Net.Http;\nusing System.Net.NetworkInformation;\nusing System.Runtime.InteropServices;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\n\nnamespace subs_check.win.gui\n{\n public partial class Form1: Form\n {\n //string 版本号;\n string 标题;\n private Process subsCheckProcess = null;\n string nodeInfo;//进度\n private Icon originalNotifyIcon; // 保存原始图标\n private ToolStripMenuItem startMenuItem;\n private ToolStripMenuItem stopMenuItem;\n string githubProxyURL = \"\";\n int run = 0;\n string 当前subsCheck版本号 = \"未知版本\";\n string 当前GUI版本号 = \"未知版本\";\n string 最新GUI版本号 = \"未知版本\";\n private string nextCheckTime = null;// 用于存储下次检查时间\n string WebUIapiKey = \"CMLiussss\";\n int downloading = 0;\n public Form1()\n {\n InitializeComponent();\n originalNotifyIcon = notifyIcon1.Icon;\n\n toolTip1.SetToolTip(numericUpDown1, \"并发线程数:推荐 宽带峰值/50M。\");\n toolTip1.SetToolTip(numericUpDown2, \"检查间隔时间(分钟):放置后台的时候,下次自动测速的间隔时间。\\n\\n 双击切换 使用「cron表达式」\");\n toolTip1.SetToolTip(label2, \"检查间隔时间(分钟):放置后台的时候,下次自动测速的间隔时间。\\n\\n 双击切换 使用「cron表达式」\");\n\n toolTip1.SetToolTip(numericUpDown3, \"超时时间(毫秒):节点的最大延迟。\");\n toolTip1.SetToolTip(numericUpDown4, \"最低测速结果舍弃(KB/s)。\");\n toolTip1.SetToolTip(numericUpDown5, \"下载测试时间(s):与下载链接大小相关,默认最大测试10s。\");\n toolTip1.SetToolTip(numericUpDown6, \"本地监听端口:用于直接返回测速结果的节点信息,方便 Sub-Store 实现订阅转换。\");\n toolTip1.SetToolTip(numericUpDown7, \"Sub-Store监听端口:用于订阅订阅转换。\\n注意:除非你知道你在干什么,否则不要将你的 Sub-Store 暴露到公网,否则可能会被滥用\");\n toolTip1.SetToolTip(textBox1, \"节点池订阅地址:支持 Link、Base64、Clash 格式的订阅链接。\");\n toolTip1.SetToolTip(checkBox1, \"以节点IP查询位置重命名节点。\\n质量差的节点可能造成IP查询失败,造成整体检查速度稍微变慢。\");\n toolTip1.SetToolTip(checkBox2, \"是否开启流媒体检测,其中IP欺诈依赖'节点地址查询',内核版本需要 v2.0.8 以上\\n\\n示例:美国1 | ⬇️ 5.6MB/s |0%|Netflix|Disney|Openai\\n风控值:0% (使用ping0.cc标准)\\n流媒体解锁:Netflix、Disney、Openai\");\n toolTip1.SetToolTip(comboBox3, \"GitHub 代理:代理订阅 GitHub raw 节点池。\");\n toolTip1.SetToolTip(comboBox2, \"测速地址:注意 并发数*节点速度<最大网速 否则测速结果不准确\\n尽量不要使用Speedtest,Cloudflare提供的下载链接,因为很多节点屏蔽测速网站。\");\n toolTip1.SetToolTip(textBox7, \"将测速结果推送到Worker的地址。\");\n toolTip1.SetToolTip(textBox6, \"Worker令牌。\");\n toolTip1.SetToolTip(comboBox1, \"测速结果的保存方法。\");\n toolTip1.SetToolTip(textBox2, \"Gist ID:注意!非Github用户名!\");\n toolTip1.SetToolTip(textBox3, \"Github TOKEN\");\n \n toolTip1.SetToolTip(comboBox4, \"通用订阅:内置了Sub-Store程序,自适应订阅格式。\\nClash订阅:带规则的 Mihomo、Clash 订阅格式。\");\n toolTip1.SetToolTip(comboBox5, \"生成带规则的 Clash 订阅所需的覆写规则文件\");\n\n toolTip1.SetToolTip(checkBox3, \"保存几个成功的节点,不选代表不限制,内核版本需要 v2.1.0 以上\\n如果你的并发数量超过这个参数,那么成功的结果可能会大于这个数值\");\n toolTip1.SetToolTip(numericUpDown8, \"保存几个成功的节点,不选代表不限制,内核版本需要 v2.1.0 以上\\n如果你的并发数量超过这个参数,那么成功的结果可能会大于这个数值\");\n\n toolTip1.SetToolTip(textBox11, \"支持标准cron表达式,如:\\n 0 */2 * * * 表示每2小时的整点执行\\n 0 0 */2 * * 表示每2天的0点执行\\n 0 0 1 * * 表示每月1日0点执行\\n */30 * * * * 表示每30分钟执行一次\\n\\n 双击切换 使用「分钟倒计时」\");\n\n toolTip1.SetToolTip(checkBox5, \"开机启动:勾选后,程序将在Windows启动时自动运行\");\n // 设置通知图标的上下文菜单\n SetupNotifyIconContextMenu();\n }\n\n private void SetupNotifyIconContextMenu()\n {\n // 创建上下文菜单\n ContextMenuStrip contextMenu = new ContextMenuStrip();\n\n // 创建\"▶️ 启动\"菜单项\n startMenuItem = new ToolStripMenuItem(\"启动\");\n startMenuItem.Click += (sender, e) =>\n {\n if (button1.Text == \"▶️ 启动\")\n {\n button1_Click(sender, e);\n }\n };\n\n // 创建\"⏹️ 停止\"菜单项\n stopMenuItem = new ToolStripMenuItem(\"停止\");\n stopMenuItem.Click += (sender, e) =>\n {\n if (button1.Text == \"⏹️ 停止\")\n {\n button1_Click(sender, e);\n }\n };\n stopMenuItem.Enabled = false; // 初始状态下禁用\n\n // 创建\"退出\"菜单项\n ToolStripMenuItem exitMenuItem = new ToolStripMenuItem(\"退出\");\n exitMenuItem.Click += async (sender, e) =>\n {\n try\n {\n // 如果程序正在运行,先停止它\n if (subsCheckProcess != null && !subsCheckProcess.HasExited)\n {\n await KillNodeProcessAsync();\n StopSubsCheckProcess();\n }\n\n // 确保通知图标被移除\n notifyIcon1.Visible = false;\n\n // 使用更直接的退出方式\n Environment.Exit(0);\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"退出程序时发生错误: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n\n // 如果仍然失败,尝试强制退出\n System.Diagnostics.Process.GetCurrentProcess().Kill();\n }\n };\n\n // 将菜单项添加到上下文菜单\n contextMenu.Items.Add(startMenuItem);\n contextMenu.Items.Add(stopMenuItem);\n contextMenu.Items.Add(new ToolStripSeparator()); // 分隔线\n contextMenu.Items.Add(exitMenuItem);\n\n // 将上下文菜单分配给通知图标\n notifyIcon1.ContextMenuStrip = contextMenu;\n\n // 确保通知图标可见\n notifyIcon1.Visible = true;\n }\n\n protected override void OnFormClosing(FormClosingEventArgs e)\n {\n if (e.CloseReason == CloseReason.UserClosing)\n {\n // 取消关闭操作\n e.Cancel = true;\n // 调用隐藏窗口方法\n 隐藏窗口();\n }\n }\n\n private async void timer1_Tick(object sender, EventArgs e)//初始化\n {\n timer1.Enabled = false;\n if (button2.Text == \"高级设置∧\") button2_Click(sender, e);\n // 检查并创建config文件夹\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string configFolderPath = System.IO.Path.Combine(executablePath, \"config\");\n if (!System.IO.Directory.Exists(configFolderPath))\n {\n // 文件不存在,可以给用户反馈\n string 免责声明 = \"SubsCheck-Win-GUI 项目仅供教育、研究和安全测试目的而设计和开发。本项目旨在为安全研究人员、学术界人士及技术爱好者提供一个探索和实践网络通信技术的工具。\\r\\n在下载和使用本项目代码时,使用者必须严格遵守其所适用的法律和规定。使用者有责任确保其行为符合所在地区的法律框架、规章制度及其他相关规定。\\r\\n\\r\\n使用条款\\r\\n\\r\\n教育与研究用途:本软件仅可用于网络技术和编程领域的学习、研究和安全测试。\\r\\n禁止非法使用:严禁将 SubsCheck-Win-GUI 用于任何非法活动或违反使用者所在地区法律法规的行为。\\r\\n使用时限:基于学习和研究目的,建议用户在完成研究或学习后,或在安装后的24小时内,删除本软件及所有相关文件。\\r\\n免责声明:SubsCheck-Win-GUI 的创建者和贡献者不对因使用或滥用本软件而导致的任何损害或法律问题负责。\\r\\n用户责任:用户对使用本软件的方式以及由此产生的任何后果完全负责。\\r\\n无技术支持:本软件的创建者不提供任何技术支持或使用协助。\\r\\n知情同意:使用 SubsCheck-Win-GUI 即表示您已阅读并理解本免责声明,并同意受其条款的约束。\\r\\n\\r\\n请记住:本软件的主要目的是促进学习、研究和安全测试。创作者不支持或认可任何其他用途。使用者应当在合法和负责任的前提下使用本工具。\\r\\n\\r\\n同意以上条款请点击\\\"是 / Yes\\\",否则程序将退出。\";\n\n // 显示带有 \"同意\" 和 \"拒绝\" 选项的对话框\n DialogResult result = MessageBox.Show(免责声明, \"SubsCheck-Win-GUI 免责声明\", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\n\n // 如果用户点击 \"拒绝\" (对应于 No 按钮)\n if (result == DialogResult.No)\n {\n // 退出程序\n Environment.Exit(0); // 立即退出程序\n }\n System.IO.Directory.CreateDirectory(configFolderPath);\n }\n\n FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location);\n 当前GUI版本号 = \"v\" + myFileVersionInfo.FileVersion;\n 最新GUI版本号 = 当前GUI版本号;\n 标题 = \"SubsCheck Win GUI \" + 当前GUI版本号;\n this.Text = 标题;// + \" TG:CMLiussss BY:CM喂饭 干货满满\";\n comboBox1.Text = \"本地\";\n comboBox4.Text = \"通用订阅\";\n ReadConfig();\n\n if (CheckCommandLineParameter(\"-auto\"))\n {\n Log(\"检测到开机启动,准备执行任务...\");\n button1_Click(this, EventArgs.Empty);\n this.Hide();\n notifyIcon1.Visible = true;\n } else await CheckGitHubVersionAsync();\n }\n\n private async Task CheckGitHubVersionAsync()\n {\n try\n {\n // 首先检查是否有网络连接\n if (!IsNetworkAvailable())\n {\n return; // 静默返回,不显示错误\n }\n\n var result = await 获取版本号(\"https://api.github.com/repos/cmliu/SubsCheck-Win-GUI/releases/latest\");\n if (result.Item1 != \"未知版本\") \n {\n string latestVersion = result.Item1;\n if (latestVersion != 当前GUI版本号)\n {\n 最新GUI版本号 = latestVersion;\n 标题 = \"SubsCheck Win GUI \" + 当前GUI版本号 + $\" 发现新版本: {最新GUI版本号} 请及时更新!\";\n this.Text = 标题;\n }\n }\n }\n catch\n {\n // 静默处理任何其他异常\n return;\n }\n }\n\n // 添加检查网络连接的辅助方法\n private bool IsNetworkAvailable()\n {\n try\n {\n return NetworkInterface.GetIsNetworkAvailable();\n }\n catch\n {\n return false; // 如果无法检查网络状态,假设网络不可用\n }\n }\n\n private async void ReadConfig()//读取配置文件\n {\n checkBox5.CheckedChanged -= checkBox5_CheckedChanged;// 临时移除事件处理器,防止触发事件\n try\n {\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string configFilePath = Path.Combine(executablePath, \"config\", \"config.yaml\");\n\n if (File.Exists(configFilePath))\n {\n // 读取YAML文件内容\n string yamlContent = File.ReadAllText(configFilePath);\n\n // 使用YamlDotNet解析YAML\n var deserializer = new YamlDotNet.Serialization.Deserializer();\n var config = deserializer.Deserialize>(yamlContent);\n\n // 使用新函数获取整数值并设置UI控件\n int? concurrentValue = 读取config整数(config, \"concurrent\");\n if (concurrentValue.HasValue) numericUpDown1.Value = concurrentValue.Value;\n\n int? checkIntervalValue = 读取config整数(config, \"check-interval\");\n if (checkIntervalValue.HasValue) numericUpDown2.Value = checkIntervalValue.Value;\n\n int? timeoutValue = 读取config整数(config, \"timeout\");\n if (timeoutValue.HasValue) numericUpDown3.Value = timeoutValue.Value;\n\n int? minspeedValue = 读取config整数(config, \"min-speed\");\n if (minspeedValue.HasValue) numericUpDown4.Value = minspeedValue.Value;\n\n int? downloadtimeoutValue = 读取config整数(config, \"download-timeout\");\n if (downloadtimeoutValue.HasValue) numericUpDown5.Value = downloadtimeoutValue.Value;\n\n string speedTestUrl = 读取config字符串(config, \"speed-test-url\");\n if (speedTestUrl != null) comboBox2.Text = speedTestUrl;\n\n string savemethod = 读取config字符串(config, \"save-method\");\n if (savemethod != null)\n {\n if (savemethod == \"local\") comboBox1.Text = \"本地\";\n else comboBox1.Text = savemethod;\n }\n\n string listenport = 读取config字符串(config, \"listen-port\");\n if (listenport != null)\n {\n // 查找最后一个冒号的位置\n int colonIndex = listenport.LastIndexOf(':');\n if (colonIndex >= 0 && colonIndex < listenport.Length - 1)\n {\n // 提取冒号后面的部分作为端口号\n string portStr = listenport.Substring(colonIndex + 1);\n if (decimal.TryParse(portStr, out decimal port))\n {\n numericUpDown6.Value = port;\n }\n }\n }\n\n /*\n int? substoreport = 读取config整数(config, \"sub-store-port\");\n if (substoreport.HasValue) numericUpDown7.Value = substoreport.Value;\n */\n\n string substoreport = 读取config字符串(config, \"sub-store-port\");\n if (substoreport != null)\n {\n // 查找最后一个冒号的位置\n int colonIndex = substoreport.LastIndexOf(':');\n if (colonIndex >= 0 && colonIndex < substoreport.Length - 1)\n {\n // 提取冒号后面的部分作为端口号\n string portStr = substoreport.Substring(colonIndex + 1);\n if (decimal.TryParse(portStr, out decimal port))\n {\n numericUpDown7.Value = port;\n }\n }\n }\n\n string githubproxy = 读取config字符串(config, \"githubproxy\");\n if (githubproxy != null) comboBox3.Text = githubproxy;\n\n const string githubRawPrefix = \"https://raw.githubusercontent.com/\";\n\n string mihomoOverwriteUrl = 读取config字符串(config, \"mihomo-overwrite-url\");\n int mihomoOverwriteUrlIndex = mihomoOverwriteUrl.IndexOf(githubRawPrefix);\n if (mihomoOverwriteUrl != null)\n {\n if (mihomoOverwriteUrl.Contains(\"http://127.0.0\"))\n {\n if (mihomoOverwriteUrl.EndsWith(\"bdg.yaml\", StringComparison.OrdinalIgnoreCase))\n {\n comboBox5.Text = \"[内置]布丁狗的订阅转换\";\n await ProcessComboBox5Selection();\n }\n else if (mihomoOverwriteUrl.EndsWith(\"ACL4SSR_Online_Full.yaml\", StringComparison.OrdinalIgnoreCase))\n {\n comboBox5.Text = \"[内置]ACL4SSR_Online_Full\";\n await ProcessComboBox5Selection();\n }\n }\n else if (mihomoOverwriteUrlIndex > 0) comboBox5.Text = mihomoOverwriteUrl.Substring(mihomoOverwriteUrlIndex);\n else comboBox5.Text = mihomoOverwriteUrl;\n }\n\n // 处理URLs,检查是否包含GitHub raw链接\n List subUrls = 读取config列表(config, \"sub-urls\");\n if (subUrls != null && subUrls.Count > 0)\n {\n // 创建一个新的过滤后的列表\n var filteredUrls = new List();\n\n for (int i = 0; i < subUrls.Count; i++)\n {\n // 排除本地URL\n string localUrlPattern = $\"http://127.0.0.1:{numericUpDown6.Value}/all.yaml\";\n if (!subUrls[i].Equals(localUrlPattern, StringComparison.OrdinalIgnoreCase))\n {\n // 处理GitHub raw链接\n int index = subUrls[i].IndexOf(githubRawPrefix);\n if (index > 0) // 如果找到且不在字符串开头\n {\n // 只保留从githubRawPrefix开始的部分\n filteredUrls.Add(subUrls[i].Substring(index));\n }\n else\n {\n // 如果不是GitHub链接,直接添加\n filteredUrls.Add(subUrls[i]);\n }\n }\n }\n\n // 将过滤后的列表中的每个URL放在单独的行上\n textBox1.Text = string.Join(Environment.NewLine, filteredUrls);\n }\n\n string renamenode = 读取config字符串(config, \"rename-node\");\n if (renamenode != null && renamenode == \"true\") checkBox1.Checked = true;\n else checkBox1.Checked = false;\n\n string mediacheck = 读取config字符串(config, \"media-check\");\n if (mediacheck != null && mediacheck == \"true\") checkBox2.Checked = true;\n else checkBox2.Checked = false;\n\n string githubgistid = 读取config字符串(config, \"github-gist-id\");\n if (githubgistid != null) textBox2.Text = githubgistid;\n string githubtoken = 读取config字符串(config, \"github-token\");\n if (githubtoken != null) textBox3.Text = githubtoken;\n\n string githubapimirror = 读取config字符串(config, \"github-api-mirror\");\n if (githubapimirror != null) textBox4.Text = githubapimirror;\n\n string workerurl = 读取config字符串(config, \"worker-url\");\n if (workerurl != null) textBox7.Text = workerurl;\n string workertoken = 读取config字符串(config, \"worker-token\");\n if (workertoken != null) textBox6.Text = workertoken;\n\n string webdavusername = 读取config字符串(config, \"webdav-username\");\n if (webdavusername != null) textBox9.Text = webdavusername;\n string webdavpassword = 读取config字符串(config, \"webdav-password\");\n if (webdavpassword != null) textBox8.Text = webdavpassword;\n string webdavurl = 读取config字符串(config, \"webdav-url\");\n if (webdavurl != null) textBox5.Text = webdavurl;\n\n string subscheckversion = 读取config字符串(config, \"subscheck-version\");\n if (subscheckversion != null) 当前subsCheck版本号 = subscheckversion;\n\n int? successlimit = 读取config整数(config, \"success-limit\");\n if (successlimit.HasValue)\n {\n if (successlimit.Value == 0)\n {\n checkBox3.Checked = false;\n numericUpDown8.Enabled = false;\n }\n else\n {\n checkBox3.Checked = true;\n numericUpDown8.Enabled = true;\n numericUpDown8.Value = successlimit.Value;\n }\n }\n\n string enablewebui = 读取config字符串(config, \"enable-web-ui\");\n if (enablewebui != null && enablewebui == \"true\") checkBox4.Checked = true;\n else checkBox4.Checked = false;\n\n string apikey = 读取config字符串(config, \"api-key\");\n if (apikey != null)\n {\n if (apikey == GetComputerNameMD5())\n {\n checkBox4.Checked = false;\n string oldapikey = 读取config字符串(config, \"old-api-key\");\n if (oldapikey != null)\n {\n textBox10.Text = oldapikey;\n }\n else\n {\n textBox10.PasswordChar = '\\0';\n textBox10.Text = \"请输入密钥\";\n textBox10.ForeColor = Color.Gray;\n }\n }\n else\n {\n textBox10.Text = apikey;\n }\n }\n\n string cronexpression = 读取config字符串(config, \"cron-expression\");\n if (cronexpression != null)\n {\n textBox11.Text = cronexpression;\n string cronDescription = GetCronExpressionDescription(textBox11.Text);\n textBox11.Location = new Point(9, 48);\n textBox11.Visible = true;\n label2.Visible = false;\n numericUpDown2.Visible = false;\n }\n\n string guiauto = 读取config字符串(config, \"gui-auto\");\n if (guiauto != null && guiauto == \"true\") checkBox5.Checked = true;\n else checkBox5.Checked = false;\n }\n else\n {\n comboBox3.Text = \"自动选择\";\n comboBox5.Text = \"[内置]布丁狗的订阅转换\";\n }\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"读取配置文件时发生错误: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n checkBox5.CheckedChanged += checkBox5_CheckedChanged;// 重新绑定事件处理器\n }\n\n private int? 读取config整数(Dictionary config, string fieldName)\n {\n // 检查是否存在指定字段且不为null\n if (config.ContainsKey(fieldName) && config[fieldName] != null)\n {\n int value;\n if (int.TryParse(config[fieldName].ToString(), out value))\n return value;\n }\n return null;\n }\n\n private string 读取config字符串(Dictionary config, string fieldName)\n {\n // 检查是否存在指定字段且不为null\n if (config.ContainsKey(fieldName) && config[fieldName] != null)\n {\n return config[fieldName].ToString();\n }\n return null;\n }\n\n private List 读取config列表(Dictionary config, string fieldName)\n {\n // 检查是否存在指定字段且不为null\n if (config.ContainsKey(fieldName) && config[fieldName] != null)\n {\n // 尝试将对象转换为列表\n if (config[fieldName] is List listItems)\n {\n return listItems.Select(item => item?.ToString()).Where(s => !string.IsNullOrEmpty(s)).ToList();\n }\n }\n return null;\n }\n\n private async Task SaveConfig(bool githubProxyCheck = true)//保存配置文件\n {\n try\n {\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string configFilePath = Path.Combine(executablePath, \"config\", \"config.yaml\");\n\n // 创建配置字典\n var config = new Dictionary();\n\n // 从UI控件获取值并添加到字典中\n config[\"concurrent\"] = (int)numericUpDown1.Value;\n config[\"check-interval\"] = (int)numericUpDown2.Value;\n if (textBox11.Visible) config[\"cron-expression\"] = textBox11.Text;\n config[\"timeout\"] = (int)numericUpDown3.Value;\n config[\"min-speed\"] = (int)numericUpDown4.Value;\n config[\"download-timeout\"] = (int)numericUpDown5.Value;\n\n if (!string.IsNullOrEmpty(comboBox2.Text)) config[\"speed-test-url\"] = comboBox2.Text;\n\n // 保存save-method,将\"本地\"转换为\"local\"\n config[\"save-method\"] = comboBox1.Text == \"本地\" ? \"local\" : comboBox1.Text;\n\n // 保存gist参数\n config[\"github-gist-id\"] = textBox2.Text;\n config[\"github-token\"] = textBox3.Text;\n\n config[\"github-api-mirror\"] = textBox4.Text;\n\n // 保存r2参数\n config[\"worker-url\"] = textBox7.Text;\n config[\"worker-token\"] = textBox6.Text;\n\n // 保存webdav参数\n config[\"webdav-username\"] = textBox9.Text;\n config[\"webdav-password\"] = textBox8.Text;\n config[\"webdav-url\"] = textBox5.Text;\n\n // 保存enable-web-ui\n config[\"enable-web-ui\"] = true;\n\n // 保存listen-port\n if (checkBox4.Checked) \n {\n WebUIapiKey = textBox10.Text;\n config[\"listen-port\"] = $@\":{numericUpDown6.Value}\";\n }\n else\n {\n WebUIapiKey = GetComputerNameMD5();\n config[\"listen-port\"] = $@\"127.0.0.1:{numericUpDown6.Value}\";\n if (textBox10.Text != \"请输入密钥\") config[\"old-api-key\"] = textBox10.Text;\n }\n config[\"api-key\"] = WebUIapiKey;\n\n // 保存sub-store-port\n config[\"sub-store-port\"] = $@\":{numericUpDown7.Value}\";\n\n string githubRawPrefix = \"https://raw.githubusercontent.com/\";\n if (githubProxyCheck)\n {\n // 检查并处理 GitHub Raw URLs\n if (comboBox3.Text == \"自动选择\")\n {\n // 创建不包含\"自动选择\"的代理列表\n List proxyItems = new List();\n for (int j = 0; j < comboBox3.Items.Count; j++)\n {\n string proxyItem = comboBox3.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n\n // 随机打乱列表顺序\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n\n // 异步检测可用代理\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n }\n }\n\n if (comboBox3.Text != \"自动选择\") githubProxyURL = $\"https://{comboBox3.Text}/\";\n config[\"githubproxy\"] = comboBox3.Text;\n config[\"github-proxy\"] = githubProxyURL;\n\n // 保存sub-urls列表\n List subUrls = new List();\n string allyamlFilePath = System.IO.Path.Combine(executablePath, \"output\", \"all.yaml\");\n if (System.IO.File.Exists(allyamlFilePath))\n {\n subUrls.Add($\"http://127.0.0.1:{numericUpDown6.Value}/all.yaml\");\n Log(\"已加载上次测试结果。\");\n }\n\n if (!string.IsNullOrEmpty(textBox1.Text))\n {\n subUrls.AddRange(textBox1.Text.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList());\n // 处理URLs\n for (int i = 0; i < subUrls.Count; i++)\n {\n if (subUrls[i].StartsWith(githubRawPrefix) && !string.IsNullOrEmpty(githubProxyURL))\n {\n // 替换为代理 URL 格式\n //subUrls[i] = githubProxyURL + githubRawPrefix + subUrls[i].Substring(githubRawPrefix.Length);\n // 使用subs-check内置github-proxy参数\n subUrls[i] = githubRawPrefix + subUrls[i].Substring(githubRawPrefix.Length);\n }\n }\n }\n\n config[\"sub-urls\"] = subUrls;\n\n // 处理配置文件下载与配置\n if (comboBox5.Text.Contains(\"[内置]\"))\n {\n // 确定文件名和下载URL\n string fileName;\n string downloadFilePath;\n string downloadUrl;\n string displayName;\n\n if (comboBox5.Text.Contains(\"[内置]布丁狗\"))\n {\n fileName = \"bdg.yaml\";\n displayName = \"[内置]布丁狗的订阅转换\";\n downloadUrl = \"https://raw.githubusercontent.com/cmliu/ACL4SSR/main/yaml/bdg.yaml\";\n }\n else // [内置]ACL4SSR\n {\n fileName = \"ACL4SSR_Online_Full.yaml\";\n displayName = \"[内置]ACL4SSR_Online_Full\";\n downloadUrl = \"https://raw.githubusercontent.com/beck-8/override-hub/main/yaml/ACL4SSR_Online_Full.yaml\";\n }\n\n // 确保output文件夹存在\n string outputFolderPath = Path.Combine(executablePath, \"output\");\n if (!Directory.Exists(outputFolderPath))\n {\n Directory.CreateDirectory(outputFolderPath);\n }\n\n // 确定文件完整路径\n downloadFilePath = Path.Combine(outputFolderPath, fileName);\n if (!File.Exists(downloadFilePath)) await ProcessComboBox5Selection();\n\n // 检查文件是否存在\n if (!File.Exists(downloadFilePath))\n {\n Log($\"{displayName} 覆写配置文件 未找到,将使用在线版本。\");\n config[\"mihomo-overwrite-url\"] = githubProxyURL + downloadUrl;\n }\n else\n {\n Log($\"{displayName} 覆写配置文件 加载成功。\");\n config[\"mihomo-overwrite-url\"] = $\"http://127.0.0.1:{numericUpDown6.Value}/{fileName}\";\n }\n }\n else if (comboBox5.Text.StartsWith(githubRawPrefix)) config[\"mihomo-overwrite-url\"] = githubProxyURL + comboBox5.Text;\n else config[\"mihomo-overwrite-url\"] = comboBox5.Text != \"\" ? comboBox5.Text : $\"http://127.0.0.1:{numericUpDown6.Value}/ACL4SSR_Online_Full.yaml\";\n \n config[\"rename-node\"] = checkBox1.Checked;//以节点IP查询位置重命名节点\n config[\"media-check\"] = checkBox2.Checked;//是否开启流媒体检测\n config[\"keep-success-proxies\"] = false;\n config[\"print-progress\"] = false;//是否显示进度\n config[\"sub-urls-retry\"] = 3;//重试次数(获取订阅失败后重试次数)\n config[\"subscheck-version\"] = 当前subsCheck版本号;//当前subsCheck版本号\n\n config[\"gui-auto\"] = checkBox5.Checked;//是否开机自启\n\n //保存几个成功的节点,为0代表不限制 \n if (checkBox3.Checked) config[\"success-limit\"] = (int)numericUpDown8.Value;\n else config[\"success-limit\"] = 0;\n\n // 使用YamlDotNet序列化配置\n var serializer = new YamlDotNet.Serialization.SerializerBuilder()\n .WithIndentedSequences() // 使序列化结果更易读\n .Build();\n\n string yamlContent = serializer.Serialize(config);\n\n // 确保配置目录存在\n string configDirPath = Path.GetDirectoryName(configFilePath);\n if (!Directory.Exists(configDirPath))\n Directory.CreateDirectory(configDirPath);\n\n string moreYamlPath = Path.Combine(configDirPath, \"more.yaml\");\n if (File.Exists(moreYamlPath))\n {\n // 读取more.yaml的内容\n string moreYamlContent = File.ReadAllText(moreYamlPath);\n\n // 确保more.yaml内容以换行开始\n if (!moreYamlContent.StartsWith(\"\\n\") && !moreYamlContent.StartsWith(\"\\r\\n\"))\n {\n yamlContent += \"\\n\"; // 添加换行符作为分隔\n }\n\n // 将more.yaml的内容追加到要写入的config.yaml内容后\n yamlContent += moreYamlContent;\n\n Log($\"已将补充参数配置 more.yaml 内容追加到配置文件\");\n }\n // 写入YAML文件\n File.WriteAllText(configFilePath, yamlContent);\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"保存配置文件时发生错误: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n if (button2.Text == \"高级设置∧\")\n {\n button2.Text = \"高级设置∨\";\n groupBox3.Visible = false;\n }\n else\n {\n button2.Text = \"高级设置∧\";\n groupBox3.Visible = true;\n }\n 判断保存类型();\n }\n\n private async void button1_Click(object sender, EventArgs e)\n {\n button1.Enabled = false;\n if (button1.Text == \"▶️ 启动\") \n {\n if (checkBox4.Checked && textBox10.Text == \"请输入密钥\")\n {\n MessageBox.Show(\"您已启用WebUI,请设置WebUI API密钥!\", \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Warning);\n return;\n }\n run = 1;\n if (button3.Enabled==false)\n {\n string executablePath = Path.GetDirectoryName(Application.ExecutablePath);\n string allyamlFilePath = Path.Combine(executablePath, \"output\", \"all.yaml\");\n button3.Enabled = File.Exists(allyamlFilePath);\n }\n\n numericUpDown1.Enabled = false;\n numericUpDown2.Enabled = false;\n textBox11.Enabled = false;\n numericUpDown3.Enabled = false;\n numericUpDown4.Enabled = false;\n numericUpDown5.Enabled = false;\n numericUpDown6.Enabled = false;\n numericUpDown7.Enabled = false;\n comboBox1.Enabled = false;\n textBox1.Enabled = false;\n groupBox3.Enabled = false;\n groupBox4.Enabled = false;\n groupBox5.Enabled = false;\n groupBox6.Enabled = false;\n if (checkBox4.Checked) button6.Enabled = true;\n button1.Text = \"⏹️ 停止\";\n //timer3.Enabled = true;\n // 清空 richTextBox1\n richTextBox1.Clear();\n await KillNodeProcessAsync();\n await SaveConfig();\n\n if (run == 1) \n {\n // 更新菜单项的启用状态\n startMenuItem.Enabled = false;\n stopMenuItem.Enabled = true;\n\n // 清空 richTextBox1\n //richTextBox1.Clear();\n\n notifyIcon1.Text = \"SubsCheck: 已就绪\";\n\n // 启动 subs-check.exe 程序\n StartSubsCheckProcess();\n }\n }\n else\n {\n run = 0;\n Log(\"任务停止\");\n progressBar1.Value = 0;\n groupBox2.Text = \"实时日志\";\n notifyIcon1.Text = \"SubsCheck: 未运行\";\n // 停止 subs-check.exe 程序\n StopSubsCheckProcess();\n // 结束 Sub-Store\n await KillNodeProcessAsync();\n if (checkBox4.Checked) ReadConfig();\n button3.Enabled = false;\n numericUpDown1.Enabled = true;\n numericUpDown2.Enabled = true;\n textBox11.Enabled = true;\n numericUpDown3.Enabled = true;\n numericUpDown4.Enabled = true;\n numericUpDown5.Enabled = true;\n numericUpDown6.Enabled = true;\n numericUpDown7.Enabled = true;\n comboBox1.Enabled = true;\n textBox1.Enabled = true;\n groupBox3.Enabled = true;\n groupBox4.Enabled = true;\n groupBox5.Enabled = true;\n groupBox6.Enabled = true;\n button6.Enabled = false;\n button1.Text = \"▶️ 启动\";\n //timer3.Enabled = false;\n // 更新菜单项的启用状态\n startMenuItem.Enabled = true;\n stopMenuItem.Enabled = false;\n }\n if (downloading == 0) button1.Enabled = true;\n }\n\n private async Task DownloadSubsCheckEXE()\n {\n button1.Enabled = false;\n downloading = 1;\n try\n {\n Log(\"正在检查网络连接...\");\n\n // 首先检查是否有网络连接\n if (!IsNetworkAvailable())\n {\n Log(\"网络连接不可用,无法下载核心文件。\", true);\n MessageBox.Show(\"缺少 subs-check.exe 核心文件。\\n\\n您可以前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n return;\n }\n\n var result = await 获取版本号(\"https://api.github.com/repos/beck-8/subs-check/releases/latest\", true);\n if (result.Item1 != \"未知版本\") \n {\n // 创建不使用系统代理的 HttpClientHandler\n HttpClientHandler handler = new HttpClientHandler\n {\n UseProxy = false,\n Proxy = null\n };\n\n // 使用自定义 handler 创建 HttpClient\n using (HttpClient client = new HttpClient(handler)) \n {\n try\n {\n string latestVersion = result.Item1;\n JArray assets = result.Item2;\n Log($\"subs-check.exe 最新版本为: {latestVersion} \");\n // 查找Windows i386版本的资源\n string downloadUrl = null;\n\n foreach (var asset in assets)\n {\n if (asset[\"name\"].ToString() == \"subs-check_Windows_i386.zip\")\n {\n downloadUrl = asset[\"browser_download_url\"].ToString();\n break;\n }\n }\n\n if (downloadUrl != null)\n {\n string 代理下载链接 = githubProxyURL + downloadUrl;\n string 原生下载链接 = 代理下载链接;\n // 计算\"https://\"在下载链接中出现的次数\n int httpsCount = 0;\n int lastIndex = -1;\n int currentIndex = 0;\n\n // 查找所有\"https://\"出现的位置\n while ((currentIndex = 代理下载链接.IndexOf(\"https://\", currentIndex)) != -1)\n {\n httpsCount++;\n lastIndex = currentIndex;\n currentIndex += 8; // \"https://\".Length = 8\n }\n\n // 如果\"https://\"出现2次或以上,提取最后一个\"https://\"之后的内容\n if (httpsCount >= 2 && lastIndex != -1)\n {\n 原生下载链接 = 代理下载链接.Substring(lastIndex);\n }\n\n string executablePath = Path.GetDirectoryName(Application.ExecutablePath);\n\n // 创建下载请求 - 优化的多级尝试下载逻辑\n Log(\"开始下载文件...\");\n bool downloadSuccess = false;\n string zipFilePath = Path.Combine(executablePath, \"subs-check_Windows_i386.zip\");\n string failureReason = \"\";\n\n // 如果文件已存在,先删除\n if (File.Exists(zipFilePath)) File.Delete(zipFilePath);\n\n // 第一次尝试:使用代理下载链接 + 当前HttpClient(不使用系统代理)\n try\n {\n Log($\"[尝试1/4] 使用代理下载链接:{代理下载链接}\");\n downloadSuccess = await DownloadFileAsync(client, 代理下载链接, zipFilePath);\n }\n catch (Exception ex)\n {\n Log($\"[尝试1/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n\n // 如果第一次尝试失败,且代理链接与原生链接不同,使用原生下载链接尝试\n if (!downloadSuccess && 代理下载链接 != 原生下载链接)\n {\n try\n {\n Log($\"[尝试2/4] 使用原生下载链接:{原生下载链接}\");\n downloadSuccess = await DownloadFileAsync(client, 原生下载链接, zipFilePath);\n }\n catch (Exception ex)\n {\n Log($\"[尝试2/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n }\n\n // 如果前面的尝试都失败,创建使用系统代理的HttpClient再次尝试\n if (!downloadSuccess)\n {\n try\n {\n Log(\"[尝试3/4] 使用系统代理 + 代理下载链接\");\n using (HttpClient proxyClient = new HttpClient())\n {\n proxyClient.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n proxyClient.Timeout = TimeSpan.FromSeconds(30);\n\n downloadSuccess = await DownloadFileAsync(proxyClient, 代理下载链接, zipFilePath);\n }\n }\n catch (Exception ex)\n {\n Log($\"[尝试3/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n\n // 最后一次尝试:使用系统代理 + 原生链接(如果不同)\n if (!downloadSuccess && 代理下载链接 != 原生下载链接)\n {\n try\n {\n Log(\"[尝试4/4] 使用系统代理 + 原生下载链接\");\n using (HttpClient proxyClient = new HttpClient())\n {\n proxyClient.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n proxyClient.Timeout = TimeSpan.FromSeconds(30);\n\n downloadSuccess = await DownloadFileAsync(proxyClient, 原生下载链接, zipFilePath);\n }\n }\n catch (Exception ex)\n {\n Log($\"[尝试4/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n }\n }\n\n if (downloadSuccess)\n {\n Log(\"下载完成,正在解压文件...\");\n\n // 解压文件的代码保持不变\n using (System.IO.Compression.ZipArchive archive = System.IO.Compression.ZipFile.OpenRead(zipFilePath))\n {\n // 查找subs-check.exe\n System.IO.Compression.ZipArchiveEntry exeEntry = archive.Entries.FirstOrDefault(\n entry => entry.Name.Equals(\"subs-check.exe\", StringComparison.OrdinalIgnoreCase));\n\n if (exeEntry != null)\n {\n string exeFilePath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 如果文件已存在,先删除\n if (File.Exists(exeFilePath))\n {\n File.Delete(exeFilePath);\n }\n\n // 解压文件\n exeEntry.ExtractToFile(exeFilePath);\n 当前subsCheck版本号 = latestVersion;\n Log($\"subs-check.exe {当前subsCheck版本号} 已就绪!\");\n\n await SaveConfig(false);\n\n // 删除下载的zip文件\n //File.Delete(zipFilePath);\n }\n else\n {\n Log(\"无法在压缩包中找到 subs-check.exe 文件。\", true);\n }\n }\n }\n else\n {\n // 所有尝试都失败\n Log($\"所有下载尝试均失败,最后错误: {failureReason}\", true);\n MessageBox.Show($\"下载 subs-check.exe 失败,请检查网络连接后重试。\\n\\n可尝试更换 Github Proxy 后,点击「检查更新」>「更新内核」。\\n或前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"下载失败\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n progressBar1.Value = 0;\n }\n\n // 解压文件\n using (System.IO.Compression.ZipArchive archive = System.IO.Compression.ZipFile.OpenRead(zipFilePath))\n {\n // 查找subs-check.exe\n System.IO.Compression.ZipArchiveEntry exeEntry = archive.Entries.FirstOrDefault(\n entry => entry.Name.Equals(\"subs-check.exe\", StringComparison.OrdinalIgnoreCase));\n\n if (exeEntry != null)\n {\n string exeFilePath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 如果文件已存在,先删除\n if (File.Exists(exeFilePath))\n {\n File.Delete(exeFilePath);\n }\n\n // 解压文件\n exeEntry.ExtractToFile(exeFilePath);\n 当前subsCheck版本号 = latestVersion;\n Log($\"subs-check.exe {当前subsCheck版本号} 已就绪!\");\n\n await SaveConfig(false);\n // 这里保留原有行为,不修改button1.Enabled\n\n // 删除下载的zip文件\n //File.Delete(zipFilePath);\n }\n else\n {\n Log(\"无法在压缩包中找到 subs-check.exe 文件。\", true);\n }\n }\n }\n else\n {\n Log(\"无法找到适用于 Windows i386 的下载链接。\", true);\n MessageBox.Show(\"未能找到适用的 subs-check.exe 下载链接。\\n\\n可尝试更换 Github Proxy 后,点击「检查更新」>「更新内核」。\\n或前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n }\n catch (Exception ex)\n {\n Log($\"下载过程中出错: {ex.Message}\", true);\n MessageBox.Show($\"下载 subs-check.exe 时出错: {ex.Message}\\n\\n可尝试更换 Github Proxy 后,点击「检查更新」>「更新内核」。\\n或前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n } \n }\n catch (Exception ex)\n {\n Log($\"初始化下载过程出错: {ex.Message}\", true);\n MessageBox.Show($\"下载准备过程出错: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n\n button1.Enabled = true;\n downloading = 0;\n }\n\n /// \n /// 获取最新版本号和对应的下载链接\n /// \n /// API请求URL\n /// 是否在日志中输出信息\n /// 包含最新版本号和下载链接的元组\n private async Task<(string LatestVersion, JArray assets)> 获取版本号(string 版本号URL, bool 是否输出log = false)\n {\n string latestVersion = \"未知版本\";\n JArray assets = null;\n\n // 创建不使用系统代理的 HttpClientHandler\n HttpClientHandler handler = new HttpClientHandler\n {\n UseProxy = false,\n Proxy = null\n };\n\n // 使用自定义 handler 创建 HttpClient\n using (HttpClient client = new HttpClient(handler))\n {\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n client.Timeout = TimeSpan.FromSeconds(30); // 增加超时时间以适应下载需求\n\n if (是否输出log) Log(\"正在获取最新版本 subs-check.exe 内核下载地址...\");\n string url = 版本号URL;\n string 备用url = 版本号URL.Replace(\"api.github.com\", \"api.github.cmliussss.net\");\n\n HttpResponseMessage response = null;\n string responseBody = null;\n JObject json = null;\n\n // 先尝试主URL\n try\n {\n response = await client.GetAsync(url);\n\n // 如果主URL请求成功返回有效数据\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从主API获取版本信息\");\n }\n // 如果主URL请求不成功但没有抛出异常\n else\n {\n if (是否输出log) Log($\"主API请求失败 HTTP {(int)response.StatusCode},尝试备用API...\");\n response = await client.GetAsync(备用url);\n\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用API获取版本信息\");\n }\n else\n {\n if (是否输出log) Log($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return (latestVersion, assets); // 两个URL都失败,提前退出\n }\n }\n }\n // 捕获网络请求异常(如连接超时、无法解析域名等)\n catch (HttpRequestException ex)\n {\n if (是否输出log) Log($\"主API请求出错: {ex.Message},尝试备用API...\");\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用API获取版本信息\");\n }\n else\n {\n if (是否输出log) Log($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return (latestVersion, assets); // 备用URL也失败,提前退出\n }\n }\n catch (Exception backupEx)\n {\n if (是否输出log) Log($\"备用API请求也出错: {backupEx.Message}\", true);\n return (latestVersion, assets); // 连备用URL也异常,提前退出\n }\n }\n // 捕获JSON解析异常\n catch (Newtonsoft.Json.JsonException ex)\n {\n if (是否输出log) Log($\"解析JSON数据出错: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用API获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n if (是否输出log) Log($\"备用API请求也出错: {backupEx.Message}\", true);\n return (latestVersion, assets); // 连备用URL也有问题,提前退出\n }\n }\n // 捕获其他所有异常\n catch (Exception ex)\n {\n if (是否输出log) Log($\"获取版本信息时出现未预期的错误: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用URL获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n if (是否输出log) Log($\"备用API请求也出错: {backupEx.Message}\", true);\n return (latestVersion, assets); // 连备用URL也有问题,提前退出\n }\n }\n\n // 如果成功获取了JSON数据,继续处理\n if (json != null)\n {\n latestVersion = json[\"tag_name\"].ToString();\n assets = (JArray)json[\"assets\"];\n }\n }\n\n return (latestVersion, assets);\n }\n\n\n private async void StartSubsCheckProcess()\n {\n try\n {\n // 重置进度条\n progressBar1.Value = 0;\n groupBox2.Text = \"实时日志\";\n using (MemoryStream ms = new MemoryStream(Properties.Resources.going))\n {\n notifyIcon1.Icon = new Icon(ms);\n }\n\n // 获取当前应用程序目录\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string subsCheckPath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 检查是否有其他subs-check.exe进程正在运行,并强制结束它们\n try\n {\n Process[] processes = Process.GetProcessesByName(\"subs-check\");\n if (processes.Length > 0)\n {\n Log(\"发现正在运行的subs-check.exe进程,正在强制结束...\");\n foreach (Process process in processes)\n {\n // 确保不是当前应用程序的进程\n if (process != subsCheckProcess)\n {\n try\n {\n process.Kill();\n process.WaitForExit();\n Log($\"成功结束subs-check.exe进程(ID: {process.Id})\");\n }\n catch (Exception ex)\n {\n Log($\"结束subs-check.exe进程时出错(ID: {process.Id}): {ex.Message}\", true);\n }\n }\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"检查运行中的subs-check.exe进程时出错: {ex.Message}\", true);\n }\n\n // 检查文件是否存在\n if (!File.Exists(subsCheckPath))\n {\n Log(\"没有找到 subs-check.exe 文件。\", true);\n await DownloadSubsCheckEXE(); // 使用异步等待\n }\n\n // 创建进程启动信息\n ProcessStartInfo startInfo = new ProcessStartInfo\n {\n FileName = subsCheckPath,\n UseShellExecute = false,\n RedirectStandardOutput = true,\n RedirectStandardError = true,\n CreateNoWindow = true,\n WorkingDirectory = executablePath,\n StandardOutputEncoding = Encoding.UTF8,\n StandardErrorEncoding = Encoding.UTF8\n };\n\n // 创建进程\n subsCheckProcess = new Process { StartInfo = startInfo };\n\n // 设置输出和错误数据接收事件处理\n subsCheckProcess.OutputDataReceived += SubsCheckProcess_OutputDataReceived;\n subsCheckProcess.ErrorDataReceived += SubsCheckProcess_OutputDataReceived;\n\n // 启动进程\n subsCheckProcess.Start();\n\n // 开始异步读取输出\n subsCheckProcess.BeginOutputReadLine();\n subsCheckProcess.BeginErrorReadLine();\n\n // 设置进程退出事件处理\n subsCheckProcess.EnableRaisingEvents = true;\n subsCheckProcess.Exited += SubsCheckProcess_Exited;\n\n Log($\"subs-check.exe {当前subsCheck版本号} 已启动...\");\n timer4.Enabled = true;\n }\n catch (Exception ex)\n {\n Log($\"启动 subs-check.exe 时出错: {ex.Message}\", true);\n button1.Text = \"▶️ 启动\";\n }\n }\n\n\n private void StopSubsCheckProcess()\n {\n timer4.Enabled = false;\n if (subsCheckProcess != null && !subsCheckProcess.HasExited)\n {\n try\n {\n // 尝试正常关闭进程\n subsCheckProcess.Kill();\n subsCheckProcess.WaitForExit();\n Log(\"subs-check.exe 已停止\");\n notifyIcon1.Icon = originalNotifyIcon;\n button7.Enabled = false;\n button7.Text = \"🔀未启动\";\n }\n catch (Exception ex)\n {\n Log($\"停止 subs-check.exe 时出错: {ex.Message}\", true);\n }\n finally\n {\n subsCheckProcess.Dispose();\n subsCheckProcess = null;\n }\n }\n }\n \n private void SubsCheckProcess_OutputDataReceived(object sender, DataReceivedEventArgs e)\n {\n if (!string.IsNullOrEmpty(e.Data))\n {\n // 由于此事件在另一个线程中触发,需要使用 Invoke 在 UI 线程上更新控件\n BeginInvoke(new Action(() =>\n {\n // 过滤ANSI转义序列\n string cleanText = RemoveAnsiEscapeCodes(e.Data);\n\n // 检查是否包含\"下次检查时间\"信息\n if (cleanText.Contains(\"下次检查时间:\"))\n {\n if (button3.Enabled == false)\n {\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string outputFolderPath = System.IO.Path.Combine(executablePath, \"output\");\n if (System.IO.Directory.Exists(outputFolderPath))\n {\n string allyamlFilePath = System.IO.Path.Combine(outputFolderPath, \"all.yaml\");\n if (System.IO.File.Exists(allyamlFilePath)) button3.Enabled = true;\n }\n }\n // 提取完整的下次检查时间信息\n int startIndex = cleanText.IndexOf(\"下次检查时间:\");\n nextCheckTime = cleanText.Substring(startIndex);\n }\n\n if (!cleanText.StartsWith(\"[GIN]\"))\n {\n // 如果不是进度行,则添加到日志中\n richTextBox1.AppendText(cleanText + \"\\r\\n\");\n // 滚动到最底部\n richTextBox1.SelectionStart = richTextBox1.Text.Length;\n richTextBox1.ScrollToCaret();\n }\n\n /*\n // 检查是否是进度信息行\n if (cleanText.StartsWith(\"进度: [\"))\n {\n // 解析百分比\n int percentIndex = cleanText.IndexOf('%');\n if (percentIndex > 0)\n {\n // 查找百分比前面的数字部分\n int startIndex = cleanText.LastIndexOfAny(new char[] { ' ', '>' }, percentIndex) + 1;\n string percentText = cleanText.Substring(startIndex, percentIndex - startIndex);\n\n if (double.TryParse(percentText, out double percentValue))\n {\n // 更新进度条,将百分比值(0-100)设置给进度条\n progressBar1.Value = (int)Math.Round(percentValue);\n }\n }\n\n // 解析节点信息部分(例如:(12/6167) 可用: 0)\n int infoStartIndex = cleanText.IndexOf('(');\n if (infoStartIndex > 0)\n {\n string fullNodeInfo = cleanText.Substring(infoStartIndex);\n\n // 提取最重要的信息:节点数量和可用数量\n int endIndex = fullNodeInfo.IndexOf(\"2025-\"); // 查找日期部分开始位置\n if (endIndex > 0)\n {\n nodeInfo = fullNodeInfo.Substring(0, endIndex).Trim();\n }\n else\n {\n // 如果找不到日期部分,则取前30个字符\n nodeInfo = fullNodeInfo.Length > 30 ? fullNodeInfo.Substring(0, 30) + \"...\" : fullNodeInfo;\n }\n\n groupBox2.Text = \"实时日志 \" + nodeInfo;\n\n // 确保通知图标文本不超过63个字符\n string notifyText = \"SubsCheck: \" + nodeInfo;\n if (notifyText.Length > 63)\n {\n notifyText = notifyText.Substring(0, 60) + \"...\";\n }\n notifyIcon1.Text = notifyText;\n }\n\n // 更新lastProgressLine,但不向richTextBox添加文本\n lastProgressLine = cleanText;\n }\n else\n {\n // 如果不是进度行,则添加到日志中\n richTextBox1.AppendText(cleanText + \"\\r\\n\");\n // 滚动到最底部\n richTextBox1.SelectionStart = richTextBox1.Text.Length;\n richTextBox1.ScrollToCaret();\n }\n */\n }));\n }\n }\n\n\n // 添加一个方法来过滤ANSI转义序列\n private string RemoveAnsiEscapeCodes(string input)\n {\n // 匹配ANSI转义序列的正则表达式\n // 这将匹配类似 \"[2m\"、\"[0m\"、\"[92m\" 等格式的ANSI颜色代码\n return System.Text.RegularExpressions.Regex.Replace(input, @\"\\x1B\\[[0-9;]*[mGK]\", string.Empty);\n }\n\n private void SubsCheckProcess_Exited(object sender, EventArgs e)\n {\n // 进程退出时,在 UI 线程上更新控件\n BeginInvoke(new Action(() =>\n {\n Log(\"subs-check.exe 已退出\");\n button1.Text = \"▶️ 启动\";\n\n // 更新菜单项的启用状态\n startMenuItem.Enabled = true;\n stopMenuItem.Enabled = false;\n\n // 重新启用控件\n numericUpDown1.Enabled = true;\n numericUpDown2.Enabled = true;\n numericUpDown3.Enabled = true;\n numericUpDown4.Enabled = true;\n numericUpDown5.Enabled = true;\n numericUpDown6.Enabled = true;\n textBox1.Enabled = true;\n groupBox3.Enabled = true;\n }));\n }\n\n /// \n /// 获取本地局域网IP地址,如果有多个则让用户选择\n /// \n /// 用户选择的IP地址,如果未选择则返回127.0.0.1\n private string GetLocalLANIP()\n {\n try\n {\n // 获取所有网卡的IP地址\n List lanIPs = new List();\n\n // 获取所有网络接口\n foreach (System.Net.NetworkInformation.NetworkInterface ni in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces())\n {\n // 排除loopback、虚拟网卡和非活动网卡\n if (ni.NetworkInterfaceType != System.Net.NetworkInformation.NetworkInterfaceType.Loopback &&\n ni.OperationalStatus == System.Net.NetworkInformation.OperationalStatus.Up)\n {\n // 获取该网卡的所有IP地址\n foreach (System.Net.NetworkInformation.UnicastIPAddressInformation ip in ni.GetIPProperties().UnicastAddresses)\n {\n // 只添加IPv4地址且不是回环地址\n if (ip.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork &&\n !System.Net.IPAddress.IsLoopback(ip.Address))\n {\n lanIPs.Add(ip.Address.ToString());\n }\n }\n }\n }\n\n // 如果没有找到任何IP地址,返回本地回环地址\n if (lanIPs.Count == 0)\n {\n return \"127.0.0.1\";\n }\n // 如果只找到一个IP地址,直接返回\n else if (lanIPs.Count == 1)\n {\n return lanIPs[0];\n }\n // 如果有多个IP地址,让用户选择\n else\n {\n // 创建选择窗口\n Form selectForm = new Form();\n selectForm.Text = \"选择局域网IP地址\";\n selectForm.StartPosition = FormStartPosition.CenterParent;\n /*\n selectForm.Width = 520; // 保持宽度\n selectForm.Height = 320; // 增加高度以容纳额外的警告标签\n selectForm.FormBorderStyle = FormBorderStyle.FixedDialog;\n */\n selectForm.AutoSize = true; // 启用自动大小调整\n selectForm.AutoSizeMode = AutoSizeMode.GrowAndShrink; // 根据内容调整大小\n selectForm.FormBorderStyle = FormBorderStyle.FixedSingle; // 使用固定但可调整的边框\n selectForm.ShowIcon = false;\n selectForm.MaximizeBox = false;\n selectForm.MinimizeBox = false;\n\n // 添加说明标签\n Label label = new Label();\n label.Text = \"发现多个局域网IP地址:\\n\\n\" +\n \"· 仅在本机访问:直接点击【取消】,将使用127.0.0.1\\n\\n\" +\n \"· 局域网内其他设备访问:请在下面列表中选择一个正确的局域网IP\";\n label.Location = new Point(15, 10);\n label.AutoSize = true;\n label.MaximumSize = new Size(380, 0); // 设置最大宽度,允许自动换行\n selectForm.Controls.Add(label);\n\n // 计算标签高度以正确放置列表框\n int labelHeight = label.Height + 20;\n\n // 添加IP地址列表框\n ListBox listBox = new ListBox();\n listBox.Location = new Point(15, labelHeight);\n listBox.Width = 380;\n listBox.Height = 130; // 保持列表框高度\n foreach (string ip in lanIPs)\n {\n listBox.Items.Add(ip);\n }\n // 查找非\".1\"结尾的IP地址,如果所有IP都以\".1\"结尾,则使用第一个IP\n int selectedIndex = 0;\n for (int i = 0; i < lanIPs.Count; i++)\n {\n if (!lanIPs[i].EndsWith(\".1\"))\n {\n selectedIndex = i;\n break;\n }\n }\n\n // 设置选中的索引\n listBox.SelectedIndex = selectedIndex;\n selectForm.Controls.Add(listBox);\n\n // 添加警告标签(放在列表框下方)\n Label warningLabel = new Label();\n warningLabel.Text = \"注意:选择错误的IP会导致局域网内其他设备无法访问。\\n\\n   推荐您可以先尝试使用非“.1”结尾的IP!\";\n warningLabel.Location = new Point(15, labelHeight + listBox.Height + 10);\n warningLabel.AutoSize = true;\n warningLabel.ForeColor = Color.Red; // 警告文本使用红色\n selectForm.Controls.Add(warningLabel);\n\n // 计算按钮位置(居中排布)\n int buttonY = labelHeight + listBox.Height + warningLabel.Height + 20;\n int buttonTotalWidth = 75 * 2 + 15; // 两个按钮的宽度加间距\n int buttonStartX = (selectForm.ClientSize.Width - buttonTotalWidth) / 2;\n\n // 添加确定按钮\n Button okButton = new Button();\n okButton.Text = \"确定\";\n okButton.DialogResult = DialogResult.OK;\n okButton.Location = new Point(buttonStartX, buttonY);\n okButton.Width = 75;\n selectForm.Controls.Add(okButton);\n selectForm.AcceptButton = okButton;\n\n // 添加取消按钮\n Button cancelButton = new Button();\n cancelButton.Text = \"取消\";\n cancelButton.DialogResult = DialogResult.Cancel;\n cancelButton.Location = new Point(buttonStartX + 90, buttonY);\n cancelButton.Width = 75;\n selectForm.Controls.Add(cancelButton);\n selectForm.CancelButton = cancelButton;\n\n // 显示选择窗口\n if (selectForm.ShowDialog() == DialogResult.OK)\n {\n return listBox.SelectedItem.ToString();\n }\n else\n {\n return \"127.0.0.1\"; // 如果用户取消,返回本地回环地址\n }\n }\n\n\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"获取局域网IP地址时出错: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n return \"127.0.0.1\";\n }\n }\n\n private void button3_Click(object sender, EventArgs e)\n {\n string 本地IP = GetLocalLANIP();\n try\n {\n // 构造URL\n string url = comboBox4.Text == \"Clash\" ? $\"http://{本地IP}:{numericUpDown7.Value}/api/file/mihomo\" : $\"http://{本地IP}:{numericUpDown7.Value}/download/sub\";\n\n // 将URL复制到剪贴板\n Clipboard.SetText(url);\n button3.Text = \"复制成功\";\n timer2.Enabled = true;\n // 可选:显示提示消息\n //MessageBox.Show($\"URL已复制到剪贴板:\\n{url}\", \"复制成功\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"复制到剪贴板时出错:{ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n private void timer2_Tick(object sender, EventArgs e)\n {\n button3.Text = \"复制订阅\";\n }\n\n private void comboBox3_Leave(object sender, EventArgs e)\n {\n // 检查是否有内容\n if (string.IsNullOrWhiteSpace(comboBox3.Text)) \n {\n comboBox3.Text = \"自动选择\";\n return;\n }\n\n string input = comboBox3.Text.Trim();\n\n // 检查是否存在 \"://\" 协议部分\n int protocolIndex = input.IndexOf(\"://\");\n if (protocolIndex >= 0)\n {\n // 保留 \"://\" 之后的内容\n input = input.Substring(protocolIndex + 3);\n }\n\n // 检查是否存在 \"/\" 路径部分\n int pathIndex = input.IndexOf('/');\n if (pathIndex >= 0)\n {\n // 只保留 \"/\" 之前的域名部分\n input = input.Substring(0, pathIndex);\n }\n\n // 更新 comboBox3 的文本\n comboBox3.Text = input;\n }\n\n private void 判断保存类型()\n {\n if (comboBox1.Text == \"本地\" || button2.Text == \"高级设置∨\")\n {\n groupBox4.Visible = false;\n groupBox5.Visible = false;\n groupBox6.Visible = false;\n }\n else if (comboBox1.Text == \"gist\" && button2.Text == \"高级设置∧\")\n {\n groupBox4.Visible = true;\n\n groupBox5.Visible = false;\n groupBox6.Visible = false;\n }\n else if (comboBox1.Text == \"r2\" && button2.Text == \"高级设置∧\")\n {\n groupBox5.Location = groupBox4.Location;\n groupBox5.Visible = true;\n\n groupBox4.Visible = false;\n groupBox6.Visible = false;\n }\n else if (comboBox1.Text == \"webdav\" && button2.Text == \"高级设置∧\")\n {\n groupBox6.Location = groupBox4.Location;\n groupBox6.Visible = true;\n\n groupBox4.Visible = false;\n groupBox5.Visible = false;\n }\n }\n\n private void comboBox1_TextChanged(object sender, EventArgs e)\n {\n 判断保存类型();\n if(!(comboBox1.Text == \"本地\" || comboBox1.Text == \"\") && button2.Text == \"高级设置∨\") button2_Click(sender, e);\n }\n\n private void textBox3_Enter(object sender, EventArgs e)\n {\n textBox3.PasswordChar = '\\0';\n textBox6.PasswordChar = '\\0';\n textBox8.PasswordChar = '\\0';\n }\n\n private void textBox3_Leave(object sender, EventArgs e)\n {\n textBox3.PasswordChar = '*';\n textBox6.PasswordChar = '*';\n textBox8.PasswordChar = '*';\n }\n\n private void textBox10_Enter(object sender, EventArgs e)\n {\n textBox10.PasswordChar = '\\0';\n if (textBox10.Text == \"请输入密钥\")\n {\n textBox10.Text = \"\";\n textBox10.ForeColor = Color.Black;\n }\n }\n\n private void textBox10_Leave(object sender, EventArgs e)\n {\n \n if (textBox10.Text == \"\")\n {\n textBox10.PasswordChar = '\\0';\n textBox10.Text = \"请输入密钥\";\n textBox10.ForeColor = Color.Gray;\n }\n else\n {\n textBox10.ForeColor = Color.Black;\n textBox10.PasswordChar = '*';\n }\n }\n\n private void textBox7_Leave(object sender, EventArgs e)\n {\n // 检查是否有内容\n if (string.IsNullOrWhiteSpace(textBox7.Text))\n return;\n\n string input = textBox7.Text.Trim();\n\n try\n {\n // 尝试解析为 URI\n Uri uri = new Uri(input);\n\n // 构建基础 URL (scheme + authority)\n string baseUrl = $\"{uri.Scheme}://{uri.Authority}\";\n\n // 更新 textBox7 的文本为基础 URL\n textBox7.Text = baseUrl;\n }\n catch (UriFormatException)\n {\n // 如果输入的不是有效 URI,尝试使用简单的字符串处理\n // 查找双斜杠后的第一个斜杠\n int schemeIndex = input.IndexOf(\"://\");\n if (schemeIndex >= 0)\n {\n int pathStartIndex = input.IndexOf('/', schemeIndex + 3);\n if (pathStartIndex >= 0)\n {\n // 截取到路径开始之前\n textBox7.Text = input.Substring(0, pathStartIndex);\n }\n }\n }\n }\n\n private void Log(string message, bool isError = false)\n {\n string timestamp = DateTime.Now.ToString(\"yyyy-MM-dd HH:mm:ss\");\n string logType = isError ? \"ERR\" : \"INF\";\n richTextBox1.AppendText($\"{timestamp} {logType} {message}\\r\\n\");\n\n if (richTextBox1.IsHandleCreated)\n {\n richTextBox1.BeginInvoke((MethodInvoker)(() =>\n {\n // 滚动到最底部\n richTextBox1.SelectionStart = richTextBox1.Text.Length;\n richTextBox1.ScrollToCaret();\n }));\n }\n }\n\n private void 恢复窗口()\n {\n // 首先显示窗体\n this.Show();\n\n // 强制停止当前布局逻辑\n this.SuspendLayout();\n\n // 恢复窗口状态\n this.WindowState = FormWindowState.Normal;\n\n // 强制重新布局\n this.ResumeLayout(true); // 参数true表示立即执行布局\n\n // 调用刷新布局的方法\n this.PerformLayout();\n\n // 处理WindowsForms消息队列中的所有挂起消息\n Application.DoEvents();\n\n // 激活窗口(使其获得焦点)\n this.Activate();\n }\n\n private void 隐藏窗口()\n {\n // 隐藏窗体(从任务栏消失)\n this.Hide();\n\n // 确保通知图标可见\n notifyIcon1.Visible = true;\n\n // 可选:显示气泡提示\n notifyIcon1.ShowBalloonTip(1000, \"SubsCheck\", \"程序已最小化到系统托盘\", ToolTipIcon.Info);\n }\n\n private void notifyIcon1_MouseClick(object sender, MouseEventArgs e)\n {\n if (e.Button == MouseButtons.Left)\n {\n // 检查窗口是否可见\n if (this.Visible)\n {\n // 如果窗口当前可见,则隐藏窗口\n 隐藏窗口();\n }\n else\n {\n // 如果窗口当前不可见,则恢复窗口\n 恢复窗口();\n }\n }\n }\n\n // 创建专用方法用于异步检测GitHub代理\n private async Task DetectGitHubProxyAsync(List proxyItems)\n {\n bool proxyFound = false;\n string detectedProxyURL = \"\";\n\n Log(\"检测可用 GitHub 代理...\");\n\n // 遍历随机排序后的代理列表\n foreach (string proxyItem in proxyItems)\n {\n string checkUrl = $\"https://{proxyItem}/https://raw.githubusercontent.com/cmliu/SubsCheck-Win-GUI/master/packages.config\";\n Log($\"正在测试 GitHub 代理: {proxyItem}\");\n richTextBox1.Refresh();\n\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); // 设置5秒超时\n // 添加User-Agent头,避免被拒绝访问\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n\n // 使用异步方式\n HttpResponseMessage response = await client.GetAsync(checkUrl);\n if (response.IsSuccessStatusCode)\n {\n // 找到可用代理\n detectedProxyURL = $\"https://{proxyItem}/\";\n Log($\"找到可用 GitHub 代理: {proxyItem}\");\n proxyFound = true;\n break;\n }\n }\n }\n catch (Exception ex)\n {\n // 记录错误但继续尝试下一个\n Log($\"代理 {proxyItem} 测试失败: {ex.Message}\", true);\n richTextBox1.Refresh();\n }\n }\n\n // 如果没有找到可用的代理\n if (!proxyFound)\n {\n Log(\"未找到可用的 GitHub 代理,请在高级设置中手动设置。\", true);\n MessageBox.Show(\"未找到可用的 GitHub 代理。\\n\\n请打开高级设置手动填入一个可用的Github Proxy,或检查您的网络连接。\",\n \"代理检测失败\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Warning);\n }\n\n return detectedProxyURL;\n }\n\n private async void button5_Click(object sender, EventArgs e)\n {\n try\n {\n button5.Enabled = false;\n button1.Enabled = false;\n // 清空日志\n richTextBox1.Clear();\n Log(\"开始检查和下载最新版本的 subs-check.exe...\");\n\n // 获取当前应用程序目录\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string subsCheckPath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 检查文件是否存在\n if (File.Exists(subsCheckPath))\n {\n Log($\"发现 subs-check.exe,正在删除...\");\n\n try\n {\n // 首先检查是否有进程正在运行\n Process[] processes = Process.GetProcessesByName(\"subs-check\");\n if (processes.Length > 0)\n {\n Log(\"发现正在运行的 subs-check.exe 进程,正在强制结束...\");\n foreach (Process process in processes)\n {\n try\n {\n process.Kill();\n process.WaitForExit();\n Log($\"成功结束 subs-check.exe 进程(ID: {process.Id})\");\n }\n catch (Exception ex)\n {\n Log($\"结束进程时出错(ID: {process.Id}): {ex.Message}\", true);\n }\n }\n }\n\n // 删除文件\n File.Delete(subsCheckPath);\n Log(\"成功删除旧版本 subs-check.exe\");\n }\n catch (Exception ex)\n {\n Log($\"删除 subs-check.exe 时出错: {ex.Message}\", true);\n MessageBox.Show($\"无法删除现有的 subs-check.exe 文件: {ex.Message}\\n\\n请手动删除后重试,或者检查文件是否被其他程序占用。\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n button5.Enabled = true;\n return;\n }\n }\n else\n {\n Log(\"未找到现有的 subs-check.exe 文件,将直接下载最新版本\");\n }\n\n // 检测可用的 GitHub 代理\n if (!string.IsNullOrEmpty(comboBox3.Text) && comboBox3.Text == \"自动选择\")\n {\n // 创建不包含\"自动选择\"的代理列表\n List proxyItems = new List();\n for (int j = 0; j < comboBox3.Items.Count; j++)\n {\n string proxyItem = comboBox3.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n\n // 随机打乱列表顺序\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n\n // 异步检测可用代理\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n\n // 如果未能找到可用代理,提示用户\n if (string.IsNullOrEmpty(githubProxyURL))\n {\n Log(\"未能找到可用的 GitHub 代理,下载可能会失败\", true);\n }\n }\n else if (!string.IsNullOrEmpty(comboBox3.Text))\n {\n githubProxyURL = $\"https://{comboBox3.Text}/\";\n Log($\"使用指定的 GitHub 代理: {comboBox3.Text}\");\n }\n else\n {\n Log(\"未设置 GitHub 代理,将尝试直接下载\", true);\n }\n\n // 下载最新版本的 subs-check.exe\n await DownloadSubsCheckEXE();\n\n // 完成\n Log(\"内核更新完成!\");\n }\n catch (Exception ex)\n {\n Log($\"操作过程中出错: {ex.Message}\", true);\n MessageBox.Show($\"处理过程中出现错误: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n finally\n {\n button5.Enabled = true;\n button1.Enabled = true;\n }\n }\n\n private decimal 订阅端口;\n private decimal SubStore端口;\n private void numericUpDown6_ValueChanged(object sender, EventArgs e)\n {\n // 检查numericUpDown7是否存在并且与numericUpDown6的值相等\n if (numericUpDown6.Value == numericUpDown7.Value)\n {\n // 显示警告消息\n MessageBox.Show(\"订阅端口 和 Sub-Store端口 不能相同!\",\n \"端口冲突\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Warning);\n\n // 将numericUpDown6的值恢复为更改前的值\n numericUpDown6.Value = 订阅端口;\n numericUpDown7.Value = SubStore端口;\n }\n else\n {\n // 保存当前值作为下次比较的基准\n 订阅端口 = numericUpDown6.Value;\n SubStore端口 = numericUpDown7.Value;\n }\n }\n\n /// \n /// 异步检测并强制终止所有程序目录下的output\\node.exe进程\n /// \n private async Task KillNodeProcessAsync()\n {\n try\n {\n Log(\"检查 node.exe 进程状态...\");\n\n // 获取当前应用程序的执行目录\n string executablePath = Path.GetDirectoryName(Application.ExecutablePath);\n string nodeExePath = Path.Combine(executablePath, \"output\", \"node.exe\");\n\n // 获取所有node.exe进程\n Process[] nodeProcesses = Process.GetProcessesByName(\"node\");\n\n if (nodeProcesses.Length == 0)\n {\n Log(\"未发现运行中的 node.exe 进程\");\n return;\n }\n\n Log($\"发现 {nodeProcesses.Length} 个 node.exe 进程,开始检查并终止匹配路径的进程...\");\n\n int terminatedCount = 0;\n\n foreach (Process process in nodeProcesses)\n {\n try\n {\n // 使用Task.Run将可能耗时的操作放在后台线程执行\n string processPath = await Task.Run(() => {\n try\n {\n return process.MainModule?.FileName;\n }\n catch (Exception)\n {\n return null;\n }\n });\n\n // 检查是否匹配我们要查找的node.exe路径\n if (!string.IsNullOrEmpty(processPath) &&\n processPath.Equals(nodeExePath, StringComparison.OrdinalIgnoreCase))\n {\n // 找到匹配的进程,终止它\n Log($\"发现匹配路径的 node.exe 进程(ID: {process.Id}),正在强制结束...\");\n\n await Task.Run(() => {\n process.Kill();\n process.WaitForExit();\n });\n\n Log($\"成功结束 node.exe 进程(ID: {process.Id})\");\n terminatedCount++;\n }\n }\n catch (Exception ex)\n {\n // 访问进程信息时可能会因为权限问题抛出异常\n Log($\"访问或终止进程(ID: {process.Id})时出错: {ex.Message}\", true);\n }\n }\n\n if (terminatedCount > 0)\n {\n Log($\"总共终止了 {terminatedCount} 个匹配路径的 node.exe 进程\");\n }\n else\n {\n Log(\"未发现需要终止的 node.exe 进程\");\n }\n }\n catch (Exception ex)\n {\n Log($\"检查或终止 node.exe 进程时出错: {ex.Message}\", true);\n }\n }\n\n private async void textBox1_DoubleClick(object sender, EventArgs e)\n {\n if (textBox1.Enabled)\n {\n // 创建EditURLs窗口的实例\n EditURLs editURLsForm = new EditURLs();\n\n // 传递当前textBox1的内容到EditURLs窗口\n editURLsForm.UrlContent = textBox1.Text + \"\\n\";\n editURLsForm.githubProxys = comboBox3.Items;\n editURLsForm.githubProxy = comboBox3.Text;\n // 显示对话框并等待结果\n DialogResult result = editURLsForm.ShowDialog();\n\n // 如果用户点击了\"保存并关闭\"按钮(返回DialogResult.OK)\n if (result == DialogResult.OK)\n {\n // 获取编辑后的内容,按行拆分,过滤空行\n string[] lines = editURLsForm.UrlContent.Split(\n new[] { \"\\r\\n\", \"\\r\", \"\\n\" },\n StringSplitOptions.RemoveEmptyEntries);\n\n // 去除每行首尾的空白字符\n for (int i = 0; i < lines.Length; i++)\n {\n lines[i] = lines[i].Trim();\n }\n\n // 再次过滤掉空行\n lines = lines.Where(line => !string.IsNullOrWhiteSpace(line)).ToArray();\n\n // 将处理后的内容更新到Form1的textBox1\n textBox1.Text = string.Join(Environment.NewLine, lines);\n await SaveConfig(false);\n Log(\"已保存订阅地址列表。\");\n }\n }\n\n }\n\n private void checkBox1_CheckedChanged(object sender, EventArgs e)\n {\n if (checkBox1.Checked == false) checkBox2.Checked = false;\n }\n\n private void checkBox2_CheckedChanged(object sender, EventArgs e)\n {\n if (checkBox2.Checked == true) checkBox1.Checked = true;\n }\n\n private async void timer3_Tick(object sender, EventArgs e)\n {\n if (button1.Text == \"⏹️ 停止\") \n {\n Log(\"subs-check.exe 运行时满24小时,自动重启清理内存占用。\");\n // 停止 subs-check.exe 程序\n StopSubsCheckProcess();\n // 结束 Sub-Store\n await KillNodeProcessAsync();\n // 重新启动 subs-check.exe 程序\n StartSubsCheckProcess();\n numericUpDown1.Enabled = false;\n numericUpDown2.Enabled = false;\n numericUpDown3.Enabled = false;\n numericUpDown4.Enabled = false;\n numericUpDown5.Enabled = false;\n numericUpDown6.Enabled = false;\n numericUpDown7.Enabled = false;\n comboBox1.Enabled = false;\n textBox1.Enabled = false;\n groupBox3.Enabled = false;\n groupBox4.Enabled = false;\n groupBox5.Enabled = false;\n groupBox6.Enabled = false;\n button1.Text = \"⏹️ 停止\";\n }\n }\n\n private void button4_Click(object sender, EventArgs e)\n {\n // 创建 CheckUpdates 窗口实例\n CheckUpdates checkUpdatesForm = new CheckUpdates();\n\n // 传递必要的数据和状态\n checkUpdatesForm.githubProxys = comboBox3.Items;\n checkUpdatesForm.githubProxy = comboBox3.Text;\n\n checkUpdatesForm.当前subsCheck版本号 = 当前subsCheck版本号;\n checkUpdatesForm.当前GUI版本号 = 当前GUI版本号;\n checkUpdatesForm.最新GUI版本号 = 最新GUI版本号;\n\n // 为 CheckUpdates 的 button2 添加点击事件处理程序\n checkUpdatesForm.FormClosed += (s, args) => {\n // 移除事件处理,避免内存泄漏\n if (checkUpdatesForm.DialogResult == DialogResult.OK)\n {\n // 如果返回OK结果,表示按钮被点击并需要更新内核\n button5_Click(this, EventArgs.Empty);\n }\n };\n\n // 设置 button2 点击后关闭窗口并返回 DialogResult.OK\n // 这需要在 CheckUpdates.cs 中修改 button2_Click 方法\n\n // 显示 CheckUpdates 窗口\n checkUpdatesForm.ShowDialog();\n }\n\n private void checkBox3_CheckedChanged(object sender, EventArgs e)\n {\n if (checkBox3.Checked) numericUpDown8.Enabled = true;\n else numericUpDown8.Enabled = false;\n }\n\n private async void comboBox5_SelectedIndexChanged(object sender, EventArgs e)\n {\n if (comboBox5.Text.Contains(\"[内置]\")) await ProcessComboBox5Selection(true);\n }\n\n private async Task ProcessComboBox5Selection(bool 汇报Log = false)\n {\n // 确定文件名和下载URL\n string fileName;\n string downloadFilePath;\n string downloadUrl;\n string displayName;\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n if (comboBox5.Text.Contains(\"[内置]布丁狗\"))\n {\n fileName = \"bdg.yaml\";\n displayName = \"[内置]布丁狗的订阅转换\";\n downloadUrl = \"https://raw.githubusercontent.com/cmliu/ACL4SSR/main/yaml/bdg.yaml\";\n }\n else // [内置]ACL4SSR\n {\n fileName = \"ACL4SSR_Online_Full.yaml\";\n displayName = \"[内置]ACL4SSR_Online_Full\";\n downloadUrl = \"https://raw.githubusercontent.com/beck-8/override-hub/main/yaml/ACL4SSR_Online_Full.yaml\";\n }\n\n // 确保output文件夹存在\n string outputFolderPath = Path.Combine(executablePath, \"output\");\n if (!Directory.Exists(outputFolderPath))\n {\n Directory.CreateDirectory(outputFolderPath);\n }\n\n // 确定文件完整路径\n downloadFilePath = Path.Combine(outputFolderPath, fileName);\n\n // 检查文件是否存在\n if (!File.Exists(downloadFilePath))\n {\n Log($\"{displayName} 覆写配置文件 未找到,正在下载...\");\n\n // 重置进度条\n progressBar1.Value = 0;\n\n // 添加GitHub代理前缀如果有\n string fullDownloadUrl = githubProxyURL + downloadUrl;\n\n try\n {\n // 创建不使用系统代理的HttpClientHandler\n using (HttpClientHandler handler = new HttpClientHandler { UseProxy = false, Proxy = null })\n using (HttpClient client = new HttpClient(handler))\n {\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n client.Timeout = TimeSpan.FromSeconds(15); // 设置15秒超时\n\n // 先获取文件大小\n HttpResponseMessage headResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Head, fullDownloadUrl));\n long totalBytes = headResponse.Content.Headers.ContentLength ?? 0;\n\n // 如果无法获取文件大小,显示不确定进度\n if (totalBytes == 0)\n {\n Console.WriteLine($\"无法获取 {displayName} 文件大小,将显示不确定进度\");\n }\n\n // 创建下载请求并获取响应流\n using (var response = await client.GetAsync(fullDownloadUrl, HttpCompletionOption.ResponseHeadersRead))\n {\n if (response.IsSuccessStatusCode)\n {\n using (var contentStream = await response.Content.ReadAsStreamAsync())\n using (var fileStream = new FileStream(downloadFilePath, FileMode.Create, FileAccess.Write, FileShare.None, 8192, true))\n {\n byte[] buffer = new byte[8192];\n long totalBytesRead = 0;\n int bytesRead;\n\n while ((bytesRead = await contentStream.ReadAsync(buffer, 0, buffer.Length)) > 0)\n {\n await fileStream.WriteAsync(buffer, 0, bytesRead);\n totalBytesRead += bytesRead;\n\n // 更新进度条\n if (totalBytes > 0)\n {\n int progressPercentage = (int)((totalBytesRead * 100) / totalBytes);\n // 确保进度值在有效范围内 (0-100)\n progressPercentage = Math.Min(100, Math.Max(0, progressPercentage));\n progressBar1.Value = progressPercentage;\n }\n }\n\n // 确保进度条显示100%\n progressBar1.Value = 100;\n }\n\n Log($\"{displayName} 覆写配置文件 下载成功\");\n }\n else\n {\n Log($\"{displayName} 覆写配置文件 下载失败: HTTP {(int)response.StatusCode} {response.ReasonPhrase}\", true);\n }\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"{displayName} 覆写配置文件 下载失败: {ex.Message}\", true);\n // 出错时重置进度条\n progressBar1.Value = 0;\n }\n }\n else\n {\n if (汇报Log) Log($\"{displayName} 覆写配置文件 已就绪。\");\n }\n }\n\n private void numericUpDown1_ValueChanged(object sender, EventArgs e)\n {\n if (numericUpDown1.Value > 128)\n {\n string warningMessage =\n \"⚠️ 高并发风险提醒 ⚠️\\n\\n\" +\n \"您设置的并发数值过高,可能导致:\\n\\n\" +\n \"• 运营商判定为异常流量并限制网络\\n\" +\n \"• 路由器性能压力过大\\n\" +\n \"• 测速结果不准确\\n\\n\" +\n \"并发数设置建议:\\n\" +\n \"• 宽带峰值/50Mbps:一般对网络无影响\\n\" +\n \"• 宽带峰值/25Mbps:可能会影响同网络下载任务\\n\" +\n \"• 宽带峰值/10Mbps:可能会影响同网络下其他设备的上网体验\\n\";\n\n Log(warningMessage);\n }\n }\n\n private void checkBox4_CheckedChanged(object sender, EventArgs e)\n {\n if(checkBox4.Checked) textBox10.Enabled = true;\n else textBox10.Enabled = false;\n }\n\n private void button6_Click(object sender, EventArgs e)\n {\n string 本地IP = GetLocalLANIP();\n try\n {\n // 构造URL\n string url = $\"http://{本地IP}:{numericUpDown6.Value}/admin\";\n\n // 使用系统默认浏览器打开URL\n System.Diagnostics.Process.Start(url);\n\n Log($\"正在浏览器中打开 Subs-Check 配置管理: {url}\");\n }\n catch (Exception ex)\n {\n Log($\"打开浏览器失败: {ex.Message}\", true);\n MessageBox.Show($\"打开浏览器时出错: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n /// \n /// 获取API状态信息并返回包含6个元素的字符串数组\n /// \n /// \n /// 包含6个元素的字符串数组:\n /// [0] - 状态类型 (\"checking\"/\"idle\"/\"error\")\n /// [1] - 状态图标类别 (\"primary\"/\"success\"/\"danger\")\n /// [2] - 状态文本 (\"正在检测中...\"/\"空闲\"/\"获取状态失败\")\n /// [3] - 节点总数 (proxyCount或\"N/A\")\n /// [4] - 进度百分比 (progress或\"N/A\")\n /// [5] - 可用节点数量 (available或\"N/A\")\n /// \n private async Task GetApiStatusAsync()\n {\n string[] resultArray = new string[6];\n string baseUrl = $\"http://127.0.0.1:{numericUpDown6.Value}\";\n\n try\n {\n using (HttpClient client = new HttpClient())\n {\n // 设置基础URL\n client.BaseAddress = new Uri(baseUrl);\n\n // 添加API密钥请求头\n client.DefaultRequestHeaders.Add(\"X-API-Key\", WebUIapiKey);\n\n // 设置超时时间\n client.Timeout = TimeSpan.FromSeconds(5);\n\n // 发送请求\n HttpResponseMessage response = await client.GetAsync(\"/api/status\");\n\n // 检查响应状态\n if (response.IsSuccessStatusCode)\n {\n // 读取响应内容\n string content = await response.Content.ReadAsStringAsync();\n\n // 解析JSON\n JObject data = JObject.Parse(content);\n\n if (data[\"checking\"] != null && data[\"checking\"].Value())\n {\n // 正在检测状态\n resultArray[0] = \"checking\";\n resultArray[1] = \"primary\";\n resultArray[2] = \"正在检测中...\";\n\n // 提取节点数据\n resultArray[3] = data[\"proxyCount\"]?.ToString() ?? \"0\";\n resultArray[4] = data[\"progress\"]?.ToString() ?? \"0\";\n resultArray[5] = data[\"available\"]?.ToString() ?? \"0\";\n }\n else\n {\n // 空闲状态\n resultArray[0] = \"idle\";\n resultArray[1] = \"success\";\n resultArray[2] = \"空闲\";\n\n // 空闲时相关数据设为N/A\n resultArray[3] = \"N/A\";\n resultArray[4] = \"N/A\";\n resultArray[5] = \"N/A\";\n }\n }\n else\n {\n // 请求失败,例如未授权\n resultArray[0] = \"error\";\n resultArray[1] = \"danger\";\n resultArray[2] = $\"API请求失败: {(int)response.StatusCode}\";\n resultArray[3] = \"N/A\";\n resultArray[4] = \"N/A\";\n resultArray[5] = \"N/A\";\n }\n }\n }\n catch (Exception ex)\n {\n // 发生异常\n resultArray[0] = \"error\";\n resultArray[1] = \"danger\";\n resultArray[2] = $\"获取状态失败: {ex.Message}\";\n resultArray[3] = \"N/A\";\n resultArray[4] = \"N/A\";\n resultArray[5] = \"N/A\";\n\n // 可选:记录错误到日志\n Log($\"获取API状态失败: {ex.Message}\", true);\n }\n\n return resultArray;\n }\n\n private async void timer4_Tick(object sender, EventArgs e)\n {\n //if (!button7.Enabled) button7.Enabled = true;\n string[] subscheck状态 = await GetApiStatusAsync();\n string 状态类型 = subscheck状态[0];\n string 状态图标类别 = subscheck状态[1];\n string 状态文本 = subscheck状态[2];\n string 节点总数 = subscheck状态[3];\n string 进度百分比 = subscheck状态[4];\n string 可用节点数量 = subscheck状态[5];\n // 更新状态文本\n\n if (状态类型 == \"checking\")\n {\n button7.Text = \"⏸️ 暂停\";\n nodeInfo = $\"({进度百分比}/{节点总数}) 可用: {可用节点数量}\";\n int nodeTotal = int.Parse(节点总数);\n if (nodeTotal > 0) {\n int 进度条百分比 = int.Parse(进度百分比) * 100 / nodeTotal;\n progressBar1.Value = 进度条百分比;\n if (!button7.Enabled) button7.Enabled = true;\n }\n \n // 确保通知图标文本不超过63个字符\n string notifyText = \"SubsCheck: \" + nodeInfo;\n if (notifyText.Length > 63)\n {\n notifyText = notifyText.Substring(0, 60) + \"...\";\n }\n notifyIcon1.Text = notifyText;\n textBox1.Enabled = false;\n }\n else if (状态类型 == \"idle\")\n {\n button7.Text = \"⏯️ 开始\";\n progressBar1.Value = 100;\n nodeInfo = $\"等待{nextCheckTime}\";\n notifyIcon1.Text = \"SubsCheck: 已就绪\\n\" + nextCheckTime; ;\n textBox1.Enabled = true;\n }\n else if (状态类型 == \"error\")\n {\n button7.Text = \"🔀 未知\";\n nodeInfo = 状态文本;\n }\n groupBox2.Text = $\"实时日志 {nodeInfo}\";\n }\n\n private async void button7_Click(object sender, EventArgs e)\n {\n button7.Enabled = false;\n timer4.Enabled = false;\n\n try\n {\n bool isSuccess;\n\n if (button7.Text == \"⏯️ 开始\")\n {\n isSuccess = await SendApiRequestAsync(\"/api/trigger-check\", \"节点检查\");\n if (isSuccess)\n {\n button7.Text = \"⏸️ 暂停\";\n textBox1.Enabled = false; // 检查开始后禁用订阅编辑\n }\n }\n else // \"⏸️ 暂停\"\n {\n isSuccess = await SendApiRequestAsync(\"/api/force-close\", \"强制关闭\");\n }\n\n // 如果请求失败,更新按钮状态为未知\n if (!isSuccess) button7.Text = \"🔀 未知\";\n }\n finally\n {\n // 无论成功失败都重新启用定时器和按钮\n timer4.Enabled = true;\n timer4.Start();\n //button7.Enabled = true;\n }\n }\n\n /// \n /// 发送API请求到SubsCheck服务\n /// \n /// API端点路径\n /// 操作名称(用于日志)\n /// 操作是否成功\n private async Task SendApiRequestAsync(string endpoint, string operationName)\n {\n try\n {\n // 获取API基础地址和API密钥\n string baseUrl = $\"http://127.0.0.1:{numericUpDown6.Value}\";\n\n using (HttpClient client = new HttpClient())\n {\n client.BaseAddress = new Uri(baseUrl);\n client.DefaultRequestHeaders.Add(\"X-API-Key\", WebUIapiKey);\n client.Timeout = TimeSpan.FromSeconds(10);\n\n // 发送POST请求\n HttpResponseMessage response = await client.PostAsync(endpoint, new StringContent(\"\"));\n\n // 检查响应状态\n if (response.IsSuccessStatusCode)\n {\n Log($\"成功{operationName}\");\n return true;\n }\n else\n {\n string errorContent = await response.Content.ReadAsStringAsync();\n Log($\"{operationName}失败: HTTP {(int)response.StatusCode} {response.ReasonPhrase}\\n{errorContent}\", true);\n return false;\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"{operationName}时发生错误: {ex.Message}\", true);\n return false;\n }\n }\n\n private void textBox11_Leave(object sender, EventArgs e)\n {\n if (IsValidCronExpression(textBox11.Text))\n {\n // 计算并显示cron表达式的说明\n string cronDescription = GetCronExpressionDescription(textBox11.Text);\n // 可以用工具提示或者消息框显示,这里使用消息框\n //MessageBox.Show(cronDescription, \"Cron表达式说明\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n Log($\"Cron表达式说明 {cronDescription}\");\n }\n else\n {\n MessageBox.Show(\"请输入有效的cron表达式,例如:*/30 * * * *\", \"无效的cron表达式\",\n MessageBoxButtons.OK, MessageBoxIcon.Warning);\n textBox11.Focus();\n textBox11.Text = \"0 */2 * * *\"; // 恢复默认值\n }\n }\n\n /// \n /// 验证输入文本是否是合法的cron表达式\n /// \n /// 如果是合法的cron表达式,则返回true;否则返回false\n private bool IsValidCronExpression(string cron表达式)\n {\n string cronExpression = cron表达式.Trim();\n\n // 如果是空字符串,则不是有效表达式\n if (string.IsNullOrWhiteSpace(cronExpression))\n return false;\n\n // 分割cron表达式为5个部分:分钟 小时 日期 月份 星期\n string[] parts = cronExpression.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n\n // cron表达式必须有5个部分\n if (parts.Length != 5)\n return false;\n\n try\n {\n // 验证每个部分\n // 分钟 (0-59)\n if (!IsValidCronField(parts[0], 0, 59))\n return false;\n\n // 小时 (0-23)\n if (!IsValidCronField(parts[1], 0, 23))\n return false;\n\n // 日期 (1-31)\n if (!IsValidCronField(parts[2], 1, 31))\n return false;\n\n // 月份 (1-12)\n if (!IsValidCronField(parts[3], 1, 12))\n return false;\n\n // 星期 (0-7,0和7都表示星期日)\n if (!IsValidCronField(parts[4], 0, 7))\n return false;\n\n return true;\n }\n catch\n {\n return false;\n }\n }\n\n /// \n /// 验证cron表达式中的单个字段是否合法\n /// \n /// 字段值\n /// 最小允许值\n /// 最大允许值\n /// 如果字段合法,则返回true;否则返回false\n private bool IsValidCronField(string field, int min, int max)\n {\n // 处理通配符 \"*\"\n if (field == \"*\")\n return true;\n\n // 处理步长 \"*/n\"\n if (field.StartsWith(\"*/\"))\n {\n string stepStr = field.Substring(2);\n if (int.TryParse(stepStr, out int step))\n return step > 0 && step <= max;\n return false;\n }\n\n // 处理范围 \"n-m\"\n if (field.Contains(\"-\"))\n {\n string[] range = field.Split('-');\n if (range.Length != 2)\n return false;\n\n if (int.TryParse(range[0], out int start) && int.TryParse(range[1], out int end))\n return start >= min && end <= max && start <= end;\n return false;\n }\n\n // 处理列表 \"n,m,k\"\n if (field.Contains(\",\"))\n {\n string[] values = field.Split(',');\n foreach (string item in values)\n {\n if (!int.TryParse(item, out int itemValue) || itemValue < min || itemValue > max)\n return false;\n }\n return true;\n }\n\n // 处理单个数字\n if (int.TryParse(field, out int fieldValue))\n return fieldValue >= min && fieldValue <= max;\n\n return false;\n }\n\n /// \n /// 获取cron表达式的友好文本说明\n /// \n /// 要解析的cron表达式\n /// 返回cron表达式的执行时间说明\n private string GetCronExpressionDescription(string cron表达式)\n {\n try\n {\n string cronExpression = cron表达式.Trim();\n string[] parts = cronExpression.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n\n if (parts.Length != 5)\n return \"无效的cron表达式\";\n\n // 分别解析每个部分\n string minuteDesc = ParseCronPart(parts[0], \"分钟\", 0, 59);\n string hourDesc = ParseCronPart(parts[1], \"小时\", 0, 23);\n string dayDesc = ParseCronPart(parts[2], \"日\", 1, 31);\n string monthDesc = ParseCronPart(parts[3], \"月\", 1, 12);\n string weekDesc = ParseCronPart(parts[4], \"星期\", 0, 7, true);\n\n // 组合最终说明\n string description = \"执行时间: \";\n\n // 月份\n if (monthDesc != \"每月\")\n description += monthDesc + \"的\";\n\n // 星期与日期的关系\n if (parts[2] == \"*\" && parts[4] != \"*\")\n description += weekDesc + \"的\";\n else if (parts[2] != \"*\" && parts[4] == \"*\")\n description += dayDesc;\n else if (parts[2] != \"*\" && parts[4] != \"*\")\n description += $\"{dayDesc}或{weekDesc}\";\n else\n description += \"每天\";\n\n // 时间(小时:分钟)\n description += $\"{hourDesc}{minuteDesc}\";\n\n return description;\n }\n catch\n {\n return \"无法解析cron表达式\";\n }\n }\n\n /// \n /// 解析cron表达式的单个部分\n /// \n private string ParseCronPart(string part, string unit, int min, int max, bool isWeekday = false)\n {\n // 处理星号,表示每个时间单位\n if (part == \"*\")\n {\n return $\"每{unit}\";\n }\n\n // 处理步长 */n\n if (part.StartsWith(\"*/\"))\n {\n int step = int.Parse(part.Substring(2));\n return $\"每{step}{unit}\";\n }\n\n // 处理范围 n-m\n if (part.Contains(\"-\"))\n {\n string[] range = part.Split('-');\n int start = int.Parse(range[0]);\n int end = int.Parse(range[1]);\n\n if (isWeekday)\n {\n string[] weekdays = { \"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\", \"星期日\" };\n return $\"从{weekdays[start]}到{weekdays[end]}\";\n }\n\n return $\"从{start}{unit}到{end}{unit}\";\n }\n\n // 处理列表 n,m,k\n if (part.Contains(\",\"))\n {\n string[] values = part.Split(',');\n if (isWeekday)\n {\n string[] weekdays = { \"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\", \"星期日\" };\n return string.Join(\"、\", values.Select(v => weekdays[int.Parse(v)]));\n }\n return $\"{string.Join(\"、\", values)}{unit}\";\n }\n\n // 处理单个数字\n int value = int.Parse(part);\n if (isWeekday)\n {\n string[] weekdays = { \"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\", \"星期日\" };\n return weekdays[value];\n }\n return $\"{value}{unit}\";\n }\n\n private void 切换cron表达式(object sender, EventArgs e)\n {\n if (textBox11.Visible)\n {\n textBox11.Visible = false;\n label2.Visible = true;\n numericUpDown2.Visible = true;\n Log(\"下次检查时间间隔 使用分钟倒计时\");\n }\n else\n {\n textBox11.Location = new Point(9, 48);\n textBox11.Visible = true;\n label2.Visible = false;\n numericUpDown2.Visible = false;\n Log(\"下次检查时间间隔 使用cron表达式\");\n }\n }\n\n /// \n /// 获取计算机名的MD5哈希值\n /// \n /// 返回计算机名的MD5哈希字符串(32位小写)\n private string GetComputerNameMD5()\n {\n try\n {\n // 获取计算机名\n string computerName = System.Environment.MachineName;\n\n // 引入必要的命名空间\n using (System.Security.Cryptography.MD5 md5 = System.Security.Cryptography.MD5.Create())\n {\n // 将计算机名转换为字节数组\n byte[] inputBytes = System.Text.Encoding.UTF8.GetBytes(computerName);\n\n // 计算MD5哈希值\n byte[] hashBytes = md5.ComputeHash(inputBytes);\n\n // 将字节数组转换为十六进制字符串\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < hashBytes.Length; i++)\n {\n sb.Append(hashBytes[i].ToString(\"x2\"));\n }\n\n return sb.ToString();\n }\n }\n catch (Exception ex)\n {\n Log($\"计算计算机名MD5时出错: {ex.Message}\", true);\n return \"CMLiussss\";\n }\n }\n\n // 添加辅助下载方法\n async Task DownloadFileAsync(HttpClient httpClient, string url, string filePath)\n {\n try\n {\n // 获取文件大小\n HttpResponseMessage headResponse = await httpClient.SendAsync(new HttpRequestMessage(HttpMethod.Head, url));\n headResponse.EnsureSuccessStatusCode(); // 确保请求成功\n long totalBytes = headResponse.Content.Headers.ContentLength ?? 0;\n\n // 下载文件\n using (var response = await httpClient.GetAsync(url, HttpCompletionOption.ResponseHeadersRead))\n {\n response.EnsureSuccessStatusCode(); // 确保请求成功\n\n using (var contentStream = await response.Content.ReadAsStreamAsync())\n using (var fileStream = new FileStream(filePath, FileMode.Create, FileAccess.Write, FileShare.None, 8192, true))\n {\n byte[] buffer = new byte[8192];\n long totalBytesRead = 0;\n int bytesRead;\n\n while ((bytesRead = await contentStream.ReadAsync(buffer, 0, buffer.Length)) > 0)\n {\n await fileStream.WriteAsync(buffer, 0, bytesRead);\n totalBytesRead += bytesRead;\n\n // 更新进度条\n if (totalBytes > 0)\n {\n int progressPercentage = (int)((totalBytesRead * 100) / totalBytes);\n progressPercentage = Math.Min(100, Math.Max(0, progressPercentage));\n progressBar1.Value = progressPercentage;\n }\n }\n }\n }\n\n return true; // 下载成功\n }\n catch\n {\n throw; // 重新抛出异常,让调用者处理\n }\n }\n\n private static about aboutWindow = null;\n private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n // 检查窗口是否已经打开\n if (aboutWindow != null && !aboutWindow.IsDisposed)\n {\n // 窗口已经存在,激活它\n aboutWindow.Activate();\n return;\n }\n\n // 需要创建新窗口\n this.BeginInvoke(new Action(() =>\n {\n // 创建about窗口实例\n aboutWindow = new about();\n\n // 传递版本号信息\n aboutWindow.GuiVersion = 当前GUI版本号;\n aboutWindow.CoreVersion = 当前subsCheck版本号;\n\n // 添加窗口关闭时的处理,清除静态引用\n aboutWindow.FormClosed += (s, args) => aboutWindow = null;\n\n // 非模态显示窗口\n aboutWindow.Show(this);\n\n // 设置TopMost确保窗口显示在最前面\n aboutWindow.TopMost = true;\n }));\n }\n\n private void button8_Click(object sender, EventArgs e)\n {\n try\n {\n // 创建MoreYAML窗口实例\n MoreYAML moreYamlWindow = new MoreYAML();\n\n // 显示为模态对话框,这会阻塞主线程直到窗口关闭\n DialogResult result = moreYamlWindow.ShowDialog(this);\n\n // 如果需要,可以处理对话框的返回结果\n if (result == DialogResult.OK)\n {\n // 用户点击了\"确定\"或某种完成操作的按钮\n Log(\"补充参数配置已成功保存到 more.yaml 文件!设置已应用\");\n }\n }\n catch (Exception ex)\n {\n Log($\"打开MoreYAML窗口时出错: {ex.Message}\", true);\n MessageBox.Show($\"打开MoreYAML窗口时出错: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n private async void checkBox5_CheckedChanged(object sender, EventArgs e)\n {\n checkBox5.Enabled = false;\n try\n {\n // 获取当前应用程序的可执行文件路径\n string appPath = Application.ExecutablePath;\n // 获取应用程序名称(不包含扩展名)\n string appName = Path.GetFileNameWithoutExtension(appPath);\n // 获取启动文件夹的路径\n string startupFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.Startup);\n // 快捷方式文件的完整路径\n string shortcutPath = Path.Combine(startupFolderPath, $\"{appName}.lnk\");\n\n if (checkBox5.Checked)\n {\n // 检查启动文件夹中是否已存在该快捷方式\n if (File.Exists(shortcutPath))\n {\n Log(\"开机启动项已存在,无需重复创建\");\n }\n else\n {\n // 创建快捷方式\n CreateShortcut(appPath, shortcutPath, \"-auto\");\n Log(\"已成功创建开机启动项,下次电脑启动时将自动运行程序\");\n }\n }\n else\n {\n // 删除启动项\n if (File.Exists(shortcutPath))\n {\n File.Delete(shortcutPath);\n Log(\"已移除开机启动项,下次开机将不会自动启动\");\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"设置开机启动项时出错: {ex.Message}\", true);\n MessageBox.Show($\"设置开机启动项失败: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n\n // 恢复CheckBox状态,避免UI状态与实际状态不一致\n checkBox5.CheckedChanged -= checkBox5_CheckedChanged;\n checkBox5.Checked = !checkBox5.Checked;\n checkBox5.CheckedChanged += checkBox5_CheckedChanged;\n }\n checkBox5.Enabled = true;\n await SaveConfig(false);\n }\n\n /// \n /// 创建指向指定路径应用程序的快捷方式\n /// \n /// 目标应用程序的完整路径\n /// 要创建的快捷方式的完整路径\n /// 可选的启动参数\n private void CreateShortcut(string targetPath, string shortcutPath, string arguments = \"\")\n {\n // 使用COM接口创建快捷方式\n Type t = Type.GetTypeFromProgID(\"WScript.Shell\");\n dynamic shell = Activator.CreateInstance(t);\n var shortcut = shell.CreateShortcut(shortcutPath);\n\n shortcut.TargetPath = targetPath;\n if (!string.IsNullOrEmpty(arguments))\n shortcut.Arguments = arguments; // 设置启动参数\n\n shortcut.WorkingDirectory = Path.GetDirectoryName(targetPath);\n shortcut.WindowStyle = 7; // 最小化启动: 7, 正常启动: 1, 最大化启动: 3\n shortcut.Description = \"SubsCheck Win GUI自启动快捷方式\";\n shortcut.IconLocation = targetPath + \",0\"; // 使用应用程序自身的图标\n\n // 保存快捷方式\n shortcut.Save();\n\n // 释放COM对象\n System.Runtime.InteropServices.Marshal.FinalReleaseComObject(shortcut);\n System.Runtime.InteropServices.Marshal.FinalReleaseComObject(shell);\n }\n\n /// \n /// 检查启动参数中是否包含指定的参数\n /// \n /// 要检查的参数名称,例如\"-autoup\"\n /// 如果存在指定参数,则返回true;否则返回false\n private bool CheckCommandLineParameter(string parameterName)\n {\n // 获取命令行参数数组\n string[] args = Environment.GetCommandLineArgs();\n\n // 遍历所有参数,检查是否有匹配的参数\n foreach (string arg in args)\n {\n // 不区分大小写比较\n if (string.Equals(arg, parameterName, StringComparison.OrdinalIgnoreCase))\n {\n return true;\n }\n }\n\n return false;\n }\n\n private void richTextBox1_DoubleClick(object sender, EventArgs e)\n {\n // 检查是否有日志内容\n if (richTextBox1.TextLength > 0)\n {\n // 显示确认对话框,询问用户是否要清空日志\n DialogResult result = MessageBox.Show(\n \"是否要清空当前日志?\",\n \"清空日志确认\",\n MessageBoxButtons.YesNo,\n MessageBoxIcon.Question,\n MessageBoxDefaultButton.Button2); // 默认选择\"否\"按钮\n\n if (result == DialogResult.Yes)\n {\n // 清空richTextBox1内容\n richTextBox1.Clear();\n // 记录一条清空日志的操作信息\n Log(\"日志已清空\");\n }\n }\n }\n\n private void numericUpDown4_ValueChanged(object sender, EventArgs e)\n {\n if (numericUpDown4.Value > 4096)\n {\n string warningMessage =\n \"⚠️ 测速下限设置提醒 ⚠️\\n\\n\" +\n \"您设置的测速下限值过高,可能导致:\\n\\n\" +\n \"• 可用节点数量显著减少\\n\" +\n \"• 部分低速但稳定的节点被过滤\\n\" +\n \"测速下限设置建议:\\n\" +\n \"• 日常浏览:512-1024 KB/s\\n\" +\n \"• 视频观看:1024-2048 KB/s\\n\" +\n \"• 大文件下载:根据实际需求设置\\n\";\n\n Log(warningMessage);\n }\n }\n\n private void numericUpDown3_ValueChanged(object sender, EventArgs e)\n {\n if (numericUpDown3.Value < 5000)\n {\n string warningMessage =\n \"⚠️ 超时时间设置提醒 ⚠️\\n\\n\" +\n \"该超时时间并非延迟时间,除非您的网络极其优秀,否则超时时间过低会导致无可用节点。\\n\\n\" +\n \"• 超时时间是真连接测试的最大等待时间\\n\" +\n \"• 设置过低会导致大部分节点连接失败\\n\" +\n \"• 推荐设置不低于5000ms\\n\\n\" +\n \"建议超时时间设置:\\n\" +\n \"• 普通网络环境:5000± ms\\n\" +\n \"• 极好网络环境:3000± ms\\n\";\n\n Log(warningMessage);\n }\n\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/EditURLs.cs", "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nusing System.Linq;\nusing System.Net.Http;\nusing System.Security.Policy;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\nusing static System.Windows.Forms.VisualStyles.VisualStyleElement;\n\nnamespace subs_check.win.gui\n{\n public partial class EditURLs: Form\n {\n // 添加一个属性用于存储和传递文本内容\n public string UrlContent { get; set; }\n public System.Windows.Forms.ComboBox.ObjectCollection githubProxys { get; set; }\n public string githubProxy { get; set; }\n string githubProxyURL;\n string SubsCheckURLs;\n public EditURLs()\n {\n InitializeComponent();\n\n // 设置textBox1的锚点为上、左、右\n textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom;\n\n // 设置button1、button2、button3的锚点为左、下\n button1.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;\n button2.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;\n button3.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;\n\n // 设置button4的锚点为右、下\n button4.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;\n }\n\n // 加载窗体时处理传入的内容\n protected override void OnLoad(EventArgs e)\n {\n base.OnLoad(e);\n\n // 将传入的内容显示在textBox1中\n if (!string.IsNullOrEmpty(UrlContent)) textBox1.Text = UrlContent;\n\n timer1.Enabled = true;\n\n if (githubProxys != null)\n {\n comboBox1.Items.Clear();\n foreach (var item in githubProxys)\n {\n comboBox1.Items.Add(item);\n }\n }\n if (!string.IsNullOrEmpty(githubProxy)) comboBox1.Text = githubProxy;\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n // 将textBox1的内容保存到UrlContent属性\n UrlContent = textBox1.Text;\n\n // 设置对话框结果为OK并关闭窗口\n this.DialogResult = DialogResult.OK;\n this.Close();\n }\n\n private void button4_Click(object sender, EventArgs e)\n {\n this.Close();\n }\n\n private void button3_Click(object sender, EventArgs e)\n {\n // 确保有内容需要处理\n if (string.IsNullOrWhiteSpace(textBox1.Text))\n return;\n\n // 按行分割文本\n string[] lines = textBox1.Text.Split(\n new[] { \"\\r\\n\", \"\\r\", \"\\n\" },\n StringSplitOptions.RemoveEmptyEntries);\n\n // 去除每行首尾的空白字符\n for (int i = 0; i < lines.Length; i++)\n {\n lines[i] = lines[i].Trim();\n }\n\n // 使用LINQ的Distinct()方法去重,并过滤掉空行\n string[] uniqueLines = lines\n .Where(line => !string.IsNullOrWhiteSpace(line))\n .Distinct(StringComparer.OrdinalIgnoreCase) // 忽略大小写进行去重\n .ToArray();\n\n // 将去重后的内容设回textBox1\n textBox1.Text = string.Join(Environment.NewLine, uniqueLines) + \"\\n\";\n\n // 可选:显示去重结果\n int removed = lines.Length - uniqueLines.Length;\n if (removed > 0)\n {\n MessageBox.Show($\"已移除 {removed} 个重复行。\", \"去重完成\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n else\n {\n MessageBox.Show(\"没有发现重复行。\", \"去重完成\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n }\n\n private async void timer1_Tick(object sender, EventArgs e)\n {\n timer1.Enabled = false;\n\n if (comboBox1.Text == \"自动选择\")\n {\n // 创建不包含\"自动选择\"的代理列表\n List proxyItems = new List();\n for (int j = 0; j < comboBox1.Items.Count; j++)\n {\n string proxyItem = comboBox1.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n\n // 随机打乱列表顺序\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n\n // 异步检测可用代理\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n }\n else\n {\n githubProxyURL = $\"https://{comboBox1.Text}/\";\n }\n\n string SubsCheckURLsURL = $\"{githubProxyURL}https://raw.githubusercontent.com/cmliu/cmliu/main/SubsCheck-URLs\";\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); // 设置5秒超时\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n\n // 使用异步方式检查URL可访问性\n HttpResponseMessage response = await client.GetAsync(SubsCheckURLsURL);\n if (response.IsSuccessStatusCode)\n {\n button2.Text = \"在线获取\";\n button2.Enabled = true;\n SubsCheckURLs = await response.Content.ReadAsStringAsync();\n //MessageBox.Show(SubsCheckURLs);\n }\n else\n {\n button2.Text = \"获取失败\";\n button2.Enabled = false;\n }\n }\n }\n catch (Exception ex)\n {\n Console.WriteLine($\"Error: {ex.Message}\");\n // 网络错误或其他异常情况\n button2.Text = \"获取失败\";\n button2.Enabled = false;\n }\n }\n\n // 创建专用方法用于异步检测GitHub代理\n private async Task DetectGitHubProxyAsync(List proxyItems)\n {\n string detectedProxyURL = \"\";\n\n // 遍历随机排序后的代理列表\n foreach (string proxyItem in proxyItems)\n {\n string checkUrl = $\"https://{proxyItem}/https://raw.githubusercontent.com/cmliu/SubsCheck-Win-GUI/master/packages.config\";\n\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); // 设置5秒超时\n // 添加User-Agent头,避免被拒绝访问\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n\n // 使用异步方式\n HttpResponseMessage response = await client.GetAsync(checkUrl);\n if (response.IsSuccessStatusCode)\n {\n // 找到可用代理\n detectedProxyURL = $\"https://{proxyItem}/\";\n break;\n }\n }\n }\n catch (Exception ex)\n {\n // 记录错误但继续尝试下一个\n Console.WriteLine($\"Error: {ex.Message}\");\n }\n }\n return detectedProxyURL;\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n // 检查是否已成功获取在线内容\n if (string.IsNullOrEmpty(SubsCheckURLs))\n {\n MessageBox.Show(\"未能获取在线内容,请重试。\", \"获取失败\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n return;\n }\n\n // 显示带有\"覆盖\"和\"追加\"选项的对话框\n DialogResult result = MessageBox.Show(\n \"请选择如何处理获取到的内容:\\n\\n\" +\n \"- 点击【是】将覆盖当前内容\\n\" +\n \"- 点击【否】将追加到当前内容后面\\n\" +\n \"- 点击【取消】不做任何操作\",\n \"操作选择\",\n MessageBoxButtons.YesNoCancel,\n MessageBoxIcon.Question);\n\n // 根据用户选择执行对应操作\n if (result == DialogResult.Yes)\n {\n // 覆盖操作\n // 确保所有换行符格式一致 (将单独的\\n或\\r替换为Windows风格的\\r\\n)\n string normalizedText = NormalizeLineEndings(SubsCheckURLs);\n textBox1.Text = normalizedText;\n MessageBox.Show(\"已用在线内容覆盖原有内容。\", \"感谢大自然的馈赠\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n else if (result == DialogResult.No)\n {\n // 追加操作\n // 确保原有内容末尾有换行符\n if (!textBox1.Text.EndsWith(\"\\r\\n\") && !textBox1.Text.EndsWith(\"\\n\"))\n {\n textBox1.Text += Environment.NewLine;\n }\n\n // 追加新内容,确保换行符格式一致\n textBox1.Text += NormalizeLineEndings(SubsCheckURLs);\n MessageBox.Show(\"已将在线内容追加到原有内容后。\", \"感谢大自然的馈赠\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n\n // 如果用户选择\"取消\",不执行任何操作\n }\n\n // 标准化文本中的换行符为Windows风格 (\\r\\n)\n private string NormalizeLineEndings(string text)\n {\n if (string.IsNullOrEmpty(text))\n return string.Empty;\n\n // 先将所有类型的换行符替换为\\n\n text = text.Replace(\"\\r\\n\", \"\\n\").Replace(\"\\r\", \"\\n\");\n // 然后将\\n替换为\\r\\n\n text = text.Replace(\"\\n\", Environment.NewLine);\n\n return text;\n }\n\n }\n}\n"], ["/SubsCheck-Win-GUI/CheckUpdates.cs", "using Newtonsoft.Json.Linq;\nusing System;\nusing System.Collections.Generic;\nusing System.Data;\nusing System.Linq;\nusing System.Net.Http;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\nusing static System.Windows.Forms.VisualStyles.VisualStyleElement;\n\nnamespace subs_check.win.gui\n{\n public partial class CheckUpdates : Form\n {\n // 添加一个属性用于存储和传递文本内容\n public string UrlContent { get; set; }\n public System.Windows.Forms.ComboBox.ObjectCollection githubProxys { get; set; }\n public string githubProxy { get; set; }\n string githubProxyURL;\n public string 当前subsCheck版本号 { get; set; }\n public string 当前GUI版本号 { get; set; }\n public string 最新GUI版本号 { get; set; }\n\n public CheckUpdates()\n {\n InitializeComponent();\n }\n\n protected override void OnLoad(EventArgs e)\n {\n base.OnLoad(e);\n\n timer1.Enabled = true;\n\n if (githubProxys != null)\n {\n comboBox1.Items.Clear();\n foreach (var item in githubProxys)\n {\n comboBox1.Items.Add(item);\n }\n }\n if (!string.IsNullOrEmpty(githubProxy)) comboBox1.Text = githubProxy;\n }\n\n private async void timer1_Tick(object sender, EventArgs e)\n {\n timer1.Enabled = false;\n label3.Text = 最新GUI版本号;\n label4.Text = 当前GUI版本号;\n\n label5.Text = 当前subsCheck版本号;\n\n if (comboBox1.Text == \"自动选择\")\n {\n // 创建不包含\"自动选择\"的代理列表\n List proxyItems = new List();\n for (int j = 0; j < comboBox1.Items.Count; j++)\n {\n string proxyItem = comboBox1.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n\n // 随机打乱列表顺序\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n\n // 异步检测可用代理\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n }\n else\n {\n githubProxyURL = $\"https://{comboBox1.Text}/\";\n }\n\n if (最新GUI版本号 != 当前GUI版本号)\n {\n // 检查当前目录下是否存在 Upgrade.exe\n string upgradeExePath = System.IO.Path.Combine(Application.StartupPath, \"Upgrade.exe\");\n if (System.IO.File.Exists(upgradeExePath))\n {\n button1.Text = \"立即更新\";\n button1.Enabled = true;\n }\n else\n {\n button1.Text = \"缺少更新程序\";\n button1.Enabled = false;\n }\n }\n else\n {\n button1.Text = \"已是最新版本\";\n button1.Enabled = false;\n }\n\n using (HttpClient client = new HttpClient())\n {\n try\n {\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n client.Timeout = TimeSpan.FromSeconds(30); // 增加超时时间以适应下载需求\n\n string url = \"https://api.github.com/repos/beck-8/subs-check/releases/latest\";\n string 备用url = \"https://api.github.cmliussss.net/repos/beck-8/subs-check/releases/latest\";\n\n HttpResponseMessage response = null;\n string responseBody = null;\n JObject json = null;\n\n // 先尝试主URL\n try\n {\n response = await client.GetAsync(url);\n\n // 如果主URL请求成功返回有效数据\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从主API获取版本信息\");\n }\n // 如果主URL请求不成功但没有抛出异常\n else\n {\n Console.WriteLine($\"主API请求失败 HTTP {(int)response.StatusCode},尝试备用API...\");\n response = await client.GetAsync(备用url);\n\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用API获取版本信息\");\n }\n else\n {\n Console.WriteLine($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return; // 两个URL都失败,提前退出\n }\n }\n }\n // 捕获网络请求异常(如连接超时、无法解析域名等)\n catch (HttpRequestException ex)\n {\n Console.WriteLine($\"主API请求出错: {ex.Message},尝试备用API...\");\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用API获取版本信息\");\n }\n else\n {\n Console.WriteLine($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return; // 备用URL也失败,提前退出\n }\n }\n catch (Exception backupEx)\n {\n Console.WriteLine($\"备用API请求也出错: {backupEx.Message}\", true);\n return; // 连备用URL也异常,提前退出\n }\n }\n // 捕获JSON解析异常\n catch (Newtonsoft.Json.JsonException ex)\n {\n Console.WriteLine($\"解析JSON数据出错: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用API获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n Console.WriteLine($\"备用API请求也出错: {backupEx.Message}\", true);\n return; // 连备用URL也有问题,提前退出\n }\n }\n // 捕获其他所有异常\n catch (Exception ex)\n {\n Console.WriteLine($\"获取版本信息时出现未预期的错误: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用URL获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n //控制台打印错误\n Console.WriteLine($\"备用API请求也出错: {backupEx.Message}\", true);\n return; // 连备用URL也有问题,提前退出\n }\n }\n\n // 如果成功获取了JSON数据,继续处理\n if (json != null)\n {\n string latestVersion = json[\"tag_name\"].ToString();\n label6.Text = latestVersion;\n if (当前subsCheck版本号 != latestVersion)\n {\n button2.Text = \"立即更新\";\n button2.Enabled = true;\n }\n else\n {\n button2.Text = \"已是最新版本\";\n button2.Enabled = false;\n }\n }\n\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"下载 subs-check.exe 时出错: {ex.Message}\\n\\n请前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n }\n\n // 创建专用方法用于异步检测GitHub代理\n private async Task DetectGitHubProxyAsync(List proxyItems)\n {\n string detectedProxyURL = \"\";\n\n // 遍历随机排序后的代理列表\n foreach (string proxyItem in proxyItems)\n {\n string checkUrl = $\"https://{proxyItem}/https://raw.githubusercontent.com/cmliu/SubsCheck-Win-GUI/master/packages.config\";\n\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); // 设置5秒超时\n // 添加User-Agent头,避免被拒绝访问\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n\n // 使用异步方式\n HttpResponseMessage response = await client.GetAsync(checkUrl);\n if (response.IsSuccessStatusCode)\n {\n // 找到可用代理\n detectedProxyURL = $\"https://{proxyItem}/\";\n break;\n }\n }\n }\n catch (Exception ex)\n {\n // 记录错误但继续尝试下一个\n Console.WriteLine($\"Error: {ex.Message}\");\n }\n }\n return detectedProxyURL;\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n // 设置对话框结果为OK,表示用户点击了\"立即更新\"按钮\n this.DialogResult = DialogResult.OK;\n\n // 关闭窗口\n this.Close();\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n //下载链接\n string downloadURL = $\"{githubProxyURL}https://github.com/cmliu/SubsCheck-Win-GUI/releases/download/{最新GUI版本号}/SubsCheck_Win_GUI.zip\";\n //目标文件\n string downloadEXE = \"subs-check.win.gui.exe\";\n\n try\n {\n // 获取应用程序目录\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n // 创建 Upgrade.ini 文件路径\n string iniFilePath = System.IO.Path.Combine(executablePath, \"Upgrade.ini\");\n\n // 准备 INI 文件内容\n string iniContent =\n \"[Upgrade]\\r\\n\" +\n $\"DownloadURL={downloadURL}\\r\\n\" +\n $\"TargetFile={downloadEXE}\\r\\n\";\n\n // 写入文件(如果文件已存在会被覆盖)\n System.IO.File.WriteAllText(iniFilePath, iniContent);\n\n DialogResult result = MessageBox.Show(\n $\"发现新版本: {最新GUI版本号}\\n\\n\" +\n \"· 点击【确定】将下载并安装更新\\n\" +\n \"· 更新过程中程序会自动关闭并重启\\n\" +\n \"· 更新完成后所有设置将保持不变\\n\\n\" +\n \"是否立即更新到最新版本?\",\n \"发现新版本\",\n MessageBoxButtons.OKCancel,\n MessageBoxIcon.Information);\n\n if (result == DialogResult.OK)\n {\n // 检查目标文件是否存在\n string targetFilePath = System.IO.Path.Combine(Application.StartupPath, \"Upgrade.exe\");\n if (System.IO.File.Exists(targetFilePath))\n {\n // 使用Process.Start异步启动应用程序\n System.Diagnostics.Process.Start(targetFilePath);\n this.Close();\n }\n else\n {\n MessageBox.Show(\"更新程序 Upgrade.exe 不存在!\",\n \"错误\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Error);\n }\n }\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"写入更新信息时出错: {ex.Message}\",\n \"错误\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Error);\n }\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/MoreYAML.Designer.cs", "namespace subs_check.win.gui\n{\n partial class MoreYAML\n {\n /// \n /// Required designer variable.\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// Clean up any resources being used.\n /// \n /// true if managed resources should be disposed; otherwise, false.\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows Form Designer generated code\n\n /// \n /// Required method for Designer support - do not modify\n /// the contents of this method with the code editor.\n /// \n private void InitializeComponent()\n {\n System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MoreYAML));\n this.button1 = new System.Windows.Forms.Button();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.button2 = new System.Windows.Forms.Button();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.linkLabel1 = new System.Windows.Forms.LinkLabel();\n this.button3 = new System.Windows.Forms.Button();\n this.groupBox1.SuspendLayout();\n this.SuspendLayout();\n // \n // button1\n // \n this.button1.Font = new System.Drawing.Font(\"宋体\", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.button1.Location = new System.Drawing.Point(12, 415);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"保存\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // groupBox1\n // \n this.groupBox1.Controls.Add(this.linkLabel1);\n this.groupBox1.Controls.Add(this.textBox1);\n this.groupBox1.Location = new System.Drawing.Point(12, 12);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(776, 397);\n this.groupBox1.TabIndex = 1;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"YAML\";\n // \n // button2\n // \n this.button2.Location = new System.Drawing.Point(713, 415);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"返回\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n // \n // textBox1\n // \n this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox1.Font = new System.Drawing.Font(\"微软雅黑\", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.textBox1.Location = new System.Drawing.Point(6, 13);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;\n this.textBox1.Size = new System.Drawing.Size(764, 378);\n this.textBox1.TabIndex = 0;\n this.textBox1.Text = resources.GetString(\"textBox1.Text\");\n this.textBox1.UseWaitCursor = true;\n // \n // linkLabel1\n // \n this.linkLabel1.AutoSize = true;\n this.linkLabel1.Location = new System.Drawing.Point(585, 0);\n this.linkLabel1.Name = \"linkLabel1\";\n this.linkLabel1.Size = new System.Drawing.Size(191, 12);\n this.linkLabel1.TabIndex = 1;\n this.linkLabel1.TabStop = true;\n this.linkLabel1.Text = \"更多请参考 config.yaml 参数文档\";\n this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);\n // \n // button3\n // \n this.button3.Location = new System.Drawing.Point(93, 415);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 3;\n this.button3.Text = \"重置\";\n this.button3.UseVisualStyleBackColor = true;\n this.button3.Click += new System.EventHandler(this.button3_Click);\n // \n // MoreYAML\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.ClientSize = new System.Drawing.Size(800, 450);\n this.Controls.Add(this.button3);\n this.Controls.Add(this.button2);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.button1);\n this.MaximizeBox = false;\n this.MinimizeBox = false;\n this.Name = \"MoreYAML\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"编辑 补充参数\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.ResumeLayout(false);\n\n }\n\n #endregion\n\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.LinkLabel linkLabel1;\n private System.Windows.Forms.Button button3;\n }\n}"], ["/SubsCheck-Win-GUI/Program.cs", "using System;\nusing System.Threading;\nusing System.Windows.Forms;\n\nnamespace subs_check.win.gui\n{\n static class Program\n {\n // 定义一个全局唯一的标识符,使用项目名称作为互斥体的名称\n private static string appMutexName = \"cmliu/SubsCheck-Win-GUI\";\n private static Mutex mutex;\n\n /// \n /// 应用程序的主入口点。\n /// \n [STAThread]\n static void Main()\n {\n // 尝试创建一个命名互斥体,如果已存在,则获取它\n bool createdNew;\n mutex = new Mutex(true, appMutexName, out createdNew);\n\n if (!createdNew)\n {\n // 如果互斥体已存在(即程序已在运行),则终止当前实例\n MessageBox.Show(\"应用程序已经在运行中。\", \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n return;\n }\n\n try\n {\n Application.EnableVisualStyles();\n Application.SetCompatibleTextRenderingDefault(false);\n Application.Run(new Form1());\n }\n finally\n {\n // 确保释放互斥体\n mutex.ReleaseMutex();\n }\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/about.cs", "using System;\nusing System.Windows.Forms;\nusing System.Diagnostics;\n\nnamespace subs_check.win.gui\n{\n public partial class about : Form\n {\n // 添加两个公共属性来接收版本号\n public string GuiVersion { set { label2.Text = value; } }\n public string CoreVersion { set { label3.Text = value; } }\n\n public about()\n {\n InitializeComponent();\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n this.Close();\n }\n\n private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/beck-8/subs-check\");\n }\n\n private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://t.me/CMLiussss\");\n }\n\n private void linkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://url.cmliussss.com/SCWinGUI\");\n }\n\n private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/cmliu/SubsCheck-Win-GUI\");\n }\n\n private void linkLabel5_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/beck-8/subs-check\");\n }\n\n private void linkLabel6_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/bestruirui/BestSub\");\n }\n\n private void linkLabel8_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/sub-store-org/Sub-Store\");\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/Form1.Designer.cs", "namespace subs_check.win.gui\n{\n partial class Form1\n {\n /// \n /// 必需的设计器变量。\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// 清理所有正在使用的资源。\n /// \n /// 如果应释放托管资源,为 true;否则为 false。\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows 窗体设计器生成的代码\n\n /// \n /// 设计器支持所需的方法 - 不要修改\n /// 使用代码编辑器修改此方法的内容。\n /// \n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));\n this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.checkBox5 = new System.Windows.Forms.CheckBox();\n this.textBox11 = new System.Windows.Forms.TextBox();\n this.button7 = new System.Windows.Forms.Button();\n this.button6 = new System.Windows.Forms.Button();\n this.comboBox4 = new System.Windows.Forms.ComboBox();\n this.button3 = new System.Windows.Forms.Button();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.numericUpDown4 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown3 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();\n this.label7 = new System.Windows.Forms.Label();\n this.label6 = new System.Windows.Forms.Label();\n this.label3 = new System.Windows.Forms.Label();\n this.label2 = new System.Windows.Forms.Label();\n this.label1 = new System.Windows.Forms.Label();\n this.button2 = new System.Windows.Forms.Button();\n this.button1 = new System.Windows.Forms.Button();\n this.label8 = new System.Windows.Forms.Label();\n this.numericUpDown6 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown5 = new System.Windows.Forms.NumericUpDown();\n this.label4 = new System.Windows.Forms.Label();\n this.label5 = new System.Windows.Forms.Label();\n this.numericUpDown7 = new System.Windows.Forms.NumericUpDown();\n this.label20 = new System.Windows.Forms.Label();\n this.groupBox2 = new System.Windows.Forms.GroupBox();\n this.linkLabel1 = new System.Windows.Forms.LinkLabel();\n this.button5 = new System.Windows.Forms.Button();\n this.richTextBox1 = new System.Windows.Forms.RichTextBox();\n this.groupBox3 = new System.Windows.Forms.GroupBox();\n this.button8 = new System.Windows.Forms.Button();\n this.textBox10 = new System.Windows.Forms.TextBox();\n this.checkBox4 = new System.Windows.Forms.CheckBox();\n this.numericUpDown8 = new System.Windows.Forms.NumericUpDown();\n this.checkBox3 = new System.Windows.Forms.CheckBox();\n this.button4 = new System.Windows.Forms.Button();\n this.checkBox1 = new System.Windows.Forms.CheckBox();\n this.checkBox2 = new System.Windows.Forms.CheckBox();\n this.comboBox5 = new System.Windows.Forms.ComboBox();\n this.label19 = new System.Windows.Forms.Label();\n this.comboBox3 = new System.Windows.Forms.ComboBox();\n this.label10 = new System.Windows.Forms.Label();\n this.comboBox2 = new System.Windows.Forms.ComboBox();\n this.label9 = new System.Windows.Forms.Label();\n this.progressBar1 = new System.Windows.Forms.ProgressBar();\n this.timer2 = new System.Windows.Forms.Timer(this.components);\n this.groupBox4 = new System.Windows.Forms.GroupBox();\n this.textBox4 = new System.Windows.Forms.TextBox();\n this.label13 = new System.Windows.Forms.Label();\n this.textBox3 = new System.Windows.Forms.TextBox();\n this.label12 = new System.Windows.Forms.Label();\n this.textBox2 = new System.Windows.Forms.TextBox();\n this.label11 = new System.Windows.Forms.Label();\n this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);\n this.groupBox5 = new System.Windows.Forms.GroupBox();\n this.textBox6 = new System.Windows.Forms.TextBox();\n this.label15 = new System.Windows.Forms.Label();\n this.textBox7 = new System.Windows.Forms.TextBox();\n this.label16 = new System.Windows.Forms.Label();\n this.groupBox6 = new System.Windows.Forms.GroupBox();\n this.textBox5 = new System.Windows.Forms.TextBox();\n this.label14 = new System.Windows.Forms.Label();\n this.textBox8 = new System.Windows.Forms.TextBox();\n this.label17 = new System.Windows.Forms.Label();\n this.textBox9 = new System.Windows.Forms.TextBox();\n this.label18 = new System.Windows.Forms.Label();\n this.timer3 = new System.Windows.Forms.Timer(this.components);\n this.timer4 = new System.Windows.Forms.Timer(this.components);\n this.groupBox1.SuspendLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown7)).BeginInit();\n this.groupBox2.SuspendLayout();\n this.groupBox3.SuspendLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown8)).BeginInit();\n this.groupBox4.SuspendLayout();\n this.groupBox5.SuspendLayout();\n this.groupBox6.SuspendLayout();\n this.SuspendLayout();\n // \n // notifyIcon1\n // \n this.notifyIcon1.BalloonTipTitle = \"Subs-Check\";\n this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject(\"notifyIcon1.Icon\")));\n this.notifyIcon1.Text = \"Subs-Check:未运行\";\n this.notifyIcon1.Visible = true;\n this.notifyIcon1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon1_MouseClick);\n // \n // timer1\n // \n this.timer1.Enabled = true;\n this.timer1.Interval = 1;\n this.timer1.Tick += new System.EventHandler(this.timer1_Tick);\n // \n // groupBox1\n // \n this.groupBox1.Controls.Add(this.checkBox5);\n this.groupBox1.Controls.Add(this.textBox11);\n this.groupBox1.Controls.Add(this.button7);\n this.groupBox1.Controls.Add(this.button6);\n this.groupBox1.Controls.Add(this.comboBox4);\n this.groupBox1.Controls.Add(this.button3);\n this.groupBox1.Controls.Add(this.textBox1);\n this.groupBox1.Controls.Add(this.comboBox1);\n this.groupBox1.Controls.Add(this.numericUpDown4);\n this.groupBox1.Controls.Add(this.numericUpDown3);\n this.groupBox1.Controls.Add(this.numericUpDown2);\n this.groupBox1.Controls.Add(this.numericUpDown1);\n this.groupBox1.Controls.Add(this.label7);\n this.groupBox1.Controls.Add(this.label6);\n this.groupBox1.Controls.Add(this.label3);\n this.groupBox1.Controls.Add(this.label2);\n this.groupBox1.Controls.Add(this.label1);\n this.groupBox1.Controls.Add(this.button2);\n this.groupBox1.Controls.Add(this.button1);\n this.groupBox1.Controls.Add(this.label8);\n this.groupBox1.Location = new System.Drawing.Point(13, 13);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(174, 484);\n this.groupBox1.TabIndex = 0;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"参数设置\";\n // \n // checkBox5\n // \n this.checkBox5.AutoSize = true;\n this.checkBox5.Location = new System.Drawing.Point(91, 428);\n this.checkBox5.Name = \"checkBox5\";\n this.checkBox5.Size = new System.Drawing.Size(72, 16);\n this.checkBox5.TabIndex = 30;\n this.checkBox5.Text = \"开机自启\";\n this.checkBox5.UseVisualStyleBackColor = true;\n this.checkBox5.CheckedChanged += new System.EventHandler(this.checkBox5_CheckedChanged);\n // \n // textBox11\n // \n this.textBox11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox11.Location = new System.Drawing.Point(9, 343);\n this.textBox11.Name = \"textBox11\";\n this.textBox11.Size = new System.Drawing.Size(154, 21);\n this.textBox11.TabIndex = 21;\n this.textBox11.Text = \"0 */2 * * *\";\n this.textBox11.Visible = false;\n this.textBox11.DoubleClick += new System.EventHandler(this.切换cron表达式);\n this.textBox11.Leave += new System.EventHandler(this.textBox11_Leave);\n // \n // button7\n // \n this.button7.Enabled = false;\n this.button7.Location = new System.Drawing.Point(7, 399);\n this.button7.Name = \"button7\";\n this.button7.Size = new System.Drawing.Size(75, 23);\n this.button7.TabIndex = 30;\n this.button7.Text = \"🔀未启动\";\n this.button7.UseVisualStyleBackColor = true;\n this.button7.Click += new System.EventHandler(this.button7_Click);\n // \n // button6\n // \n this.button6.Enabled = false;\n this.button6.Location = new System.Drawing.Point(88, 399);\n this.button6.Name = \"button6\";\n this.button6.Size = new System.Drawing.Size(75, 23);\n this.button6.TabIndex = 29;\n this.button6.Text = \"访问WebUI\";\n this.button6.UseVisualStyleBackColor = true;\n this.button6.Click += new System.EventHandler(this.button6_Click);\n // \n // comboBox4\n // \n this.comboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\n this.comboBox4.FormattingEnabled = true;\n this.comboBox4.Items.AddRange(new object[] {\n \"通用订阅\",\n \"Clash\"});\n this.comboBox4.Location = new System.Drawing.Point(8, 372);\n this.comboBox4.Name = \"comboBox4\";\n this.comboBox4.Size = new System.Drawing.Size(74, 20);\n this.comboBox4.TabIndex = 19;\n // \n // button3\n // \n this.button3.Enabled = false;\n this.button3.Location = new System.Drawing.Point(88, 370);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 18;\n this.button3.Text = \"复制订阅\";\n this.button3.UseVisualStyleBackColor = true;\n this.button3.Click += new System.EventHandler(this.button3_Click);\n // \n // textBox1\n // \n this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox1.Location = new System.Drawing.Point(9, 179);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ReadOnly = true;\n this.textBox1.Size = new System.Drawing.Size(154, 185);\n this.textBox1.TabIndex = 17;\n this.textBox1.Text = resources.GetString(\"textBox1.Text\");\n this.textBox1.WordWrap = false;\n this.textBox1.Click += new System.EventHandler(this.textBox1_DoubleClick);\n this.textBox1.DoubleClick += new System.EventHandler(this.textBox1_DoubleClick);\n // \n // comboBox1\n // \n this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\n this.comboBox1.FormattingEnabled = true;\n this.comboBox1.Items.AddRange(new object[] {\n \"本地\",\n \"gist\",\n \"r2\",\n \"webdav\"});\n this.comboBox1.Location = new System.Drawing.Point(105, 135);\n this.comboBox1.Name = \"comboBox1\";\n this.comboBox1.Size = new System.Drawing.Size(58, 20);\n this.comboBox1.TabIndex = 16;\n this.comboBox1.TextChanged += new System.EventHandler(this.comboBox1_TextChanged);\n // \n // numericUpDown4\n // \n this.numericUpDown4.Location = new System.Drawing.Point(105, 106);\n this.numericUpDown4.Maximum = new decimal(new int[] {\n 20480,\n 0,\n 0,\n 0});\n this.numericUpDown4.Minimum = new decimal(new int[] {\n 128,\n 0,\n 0,\n 0});\n this.numericUpDown4.Name = \"numericUpDown4\";\n this.numericUpDown4.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown4.TabIndex = 13;\n this.numericUpDown4.Value = new decimal(new int[] {\n 1024,\n 0,\n 0,\n 0});\n this.numericUpDown4.ValueChanged += new System.EventHandler(this.numericUpDown4_ValueChanged);\n // \n // numericUpDown3\n // \n this.numericUpDown3.Location = new System.Drawing.Point(105, 77);\n this.numericUpDown3.Maximum = new decimal(new int[] {\n 10000,\n 0,\n 0,\n 0});\n this.numericUpDown3.Minimum = new decimal(new int[] {\n 1000,\n 0,\n 0,\n 0});\n this.numericUpDown3.Name = \"numericUpDown3\";\n this.numericUpDown3.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown3.TabIndex = 12;\n this.numericUpDown3.Value = new decimal(new int[] {\n 5000,\n 0,\n 0,\n 0});\n this.numericUpDown3.ValueChanged += new System.EventHandler(this.numericUpDown3_ValueChanged);\n // \n // numericUpDown2\n // \n this.numericUpDown2.Location = new System.Drawing.Point(105, 48);\n this.numericUpDown2.Maximum = new decimal(new int[] {\n 1440,\n 0,\n 0,\n 0});\n this.numericUpDown2.Minimum = new decimal(new int[] {\n 30,\n 0,\n 0,\n 0});\n this.numericUpDown2.Name = \"numericUpDown2\";\n this.numericUpDown2.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown2.TabIndex = 11;\n this.numericUpDown2.Value = new decimal(new int[] {\n 120,\n 0,\n 0,\n 0});\n this.numericUpDown2.DoubleClick += new System.EventHandler(this.切换cron表达式);\n // \n // numericUpDown1\n // \n this.numericUpDown1.Location = new System.Drawing.Point(105, 19);\n this.numericUpDown1.Maximum = new decimal(new int[] {\n 1024,\n 0,\n 0,\n 0});\n this.numericUpDown1.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown1.Name = \"numericUpDown1\";\n this.numericUpDown1.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown1.TabIndex = 10;\n this.numericUpDown1.Value = new decimal(new int[] {\n 32,\n 0,\n 0,\n 0});\n this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);\n // \n // label7\n // \n this.label7.AutoSize = true;\n this.label7.Location = new System.Drawing.Point(7, 137);\n this.label7.Name = \"label7\";\n this.label7.Size = new System.Drawing.Size(65, 12);\n this.label7.TabIndex = 8;\n this.label7.Text = \"保存方法:\";\n // \n // label6\n // \n this.label6.AutoSize = true;\n this.label6.Location = new System.Drawing.Point(7, 108);\n this.label6.Name = \"label6\";\n this.label6.Size = new System.Drawing.Size(101, 12);\n this.label6.TabIndex = 5;\n this.label6.Text = \"测速下限(KB/s):\";\n // \n // label3\n // \n this.label3.AutoSize = true;\n this.label3.Location = new System.Drawing.Point(7, 79);\n this.label3.Name = \"label3\";\n this.label3.Size = new System.Drawing.Size(101, 12);\n this.label3.TabIndex = 4;\n this.label3.Text = \"超时时间(毫秒):\";\n // \n // label2\n // \n this.label2.AutoSize = true;\n this.label2.Location = new System.Drawing.Point(7, 50);\n this.label2.Name = \"label2\";\n this.label2.Size = new System.Drawing.Size(101, 12);\n this.label2.TabIndex = 3;\n this.label2.Text = \"检查间隔(分钟):\";\n this.label2.DoubleClick += new System.EventHandler(this.切换cron表达式);\n // \n // label1\n // \n this.label1.AutoSize = true;\n this.label1.Location = new System.Drawing.Point(7, 21);\n this.label1.Name = \"label1\";\n this.label1.Size = new System.Drawing.Size(77, 12);\n this.label1.TabIndex = 2;\n this.label1.Text = \"并发线程数:\";\n // \n // button2\n // \n this.button2.Location = new System.Drawing.Point(88, 450);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 1;\n this.button2.Text = \"高级设置∧\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n // \n // button1\n // \n this.button1.Font = new System.Drawing.Font(\"宋体\", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.button1.Location = new System.Drawing.Point(7, 428);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 45);\n this.button1.TabIndex = 0;\n this.button1.Text = \"▶️ 启动\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // label8\n // \n this.label8.AutoSize = true;\n this.label8.Location = new System.Drawing.Point(7, 164);\n this.label8.Name = \"label8\";\n this.label8.Size = new System.Drawing.Size(161, 12);\n this.label8.TabIndex = 9;\n this.label8.Text = \"节点池订阅链接(点击编辑):\";\n this.label8.Click += new System.EventHandler(this.textBox1_DoubleClick);\n // \n // numericUpDown6\n // \n this.numericUpDown6.Location = new System.Drawing.Point(281, 19);\n this.numericUpDown6.Maximum = new decimal(new int[] {\n 65535,\n 0,\n 0,\n 0});\n this.numericUpDown6.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown6.Name = \"numericUpDown6\";\n this.numericUpDown6.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown6.TabIndex = 15;\n this.numericUpDown6.Value = new decimal(new int[] {\n 8199,\n 0,\n 0,\n 0});\n this.numericUpDown6.ValueChanged += new System.EventHandler(this.numericUpDown6_ValueChanged);\n // \n // numericUpDown5\n // \n this.numericUpDown5.Location = new System.Drawing.Point(281, 45);\n this.numericUpDown5.Maximum = new decimal(new int[] {\n 10,\n 0,\n 0,\n 0});\n this.numericUpDown5.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown5.Name = \"numericUpDown5\";\n this.numericUpDown5.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown5.TabIndex = 14;\n this.numericUpDown5.Value = new decimal(new int[] {\n 10,\n 0,\n 0,\n 0});\n // \n // label4\n // \n this.label4.AutoSize = true;\n this.label4.Location = new System.Drawing.Point(191, 21);\n this.label4.Name = \"label4\";\n this.label4.Size = new System.Drawing.Size(89, 12);\n this.label4.TabIndex = 7;\n this.label4.Text = \"HTTP服务端口:\";\n // \n // label5\n // \n this.label5.AutoSize = true;\n this.label5.Location = new System.Drawing.Point(191, 48);\n this.label5.Name = \"label5\";\n this.label5.Size = new System.Drawing.Size(89, 12);\n this.label5.TabIndex = 6;\n this.label5.Text = \"测速时间(秒):\";\n // \n // numericUpDown7\n // \n this.numericUpDown7.Location = new System.Drawing.Point(441, 19);\n this.numericUpDown7.Maximum = new decimal(new int[] {\n 65535,\n 0,\n 0,\n 0});\n this.numericUpDown7.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown7.Name = \"numericUpDown7\";\n this.numericUpDown7.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown7.TabIndex = 21;\n this.numericUpDown7.Value = new decimal(new int[] {\n 8299,\n 0,\n 0,\n 0});\n this.numericUpDown7.ValueChanged += new System.EventHandler(this.numericUpDown6_ValueChanged);\n // \n // label20\n // \n this.label20.AutoSize = true;\n this.label20.Location = new System.Drawing.Point(345, 21);\n this.label20.Name = \"label20\";\n this.label20.Size = new System.Drawing.Size(95, 12);\n this.label20.TabIndex = 20;\n this.label20.Text = \"Sub-Store端口:\";\n // \n // groupBox2\n // \n this.groupBox2.Controls.Add(this.linkLabel1);\n this.groupBox2.Controls.Add(this.button5);\n this.groupBox2.Controls.Add(this.richTextBox1);\n this.groupBox2.Location = new System.Drawing.Point(193, 13);\n this.groupBox2.Name = \"groupBox2\";\n this.groupBox2.Size = new System.Drawing.Size(600, 484);\n this.groupBox2.TabIndex = 1;\n this.groupBox2.TabStop = false;\n this.groupBox2.Text = \"实时日志\";\n // \n // linkLabel1\n // \n this.linkLabel1.AutoSize = true;\n this.linkLabel1.Location = new System.Drawing.Point(460, 2);\n this.linkLabel1.Name = \"linkLabel1\";\n this.linkLabel1.Size = new System.Drawing.Size(137, 12);\n this.linkLabel1.TabIndex = 21;\n this.linkLabel1.TabStop = true;\n this.linkLabel1.Text = \"关于 SubsCheck Win GUI\";\n this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);\n // \n // button5\n // \n this.button5.Location = new System.Drawing.Point(515, 450);\n this.button5.Name = \"button5\";\n this.button5.Size = new System.Drawing.Size(75, 23);\n this.button5.TabIndex = 20;\n this.button5.Text = \"更新内核\";\n this.button5.UseVisualStyleBackColor = true;\n this.button5.Visible = false;\n this.button5.Click += new System.EventHandler(this.button5_Click);\n // \n // richTextBox1\n // \n this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;\n this.richTextBox1.Location = new System.Drawing.Point(3, 17);\n this.richTextBox1.Name = \"richTextBox1\";\n this.richTextBox1.ReadOnly = true;\n this.richTextBox1.Size = new System.Drawing.Size(594, 464);\n this.richTextBox1.TabIndex = 0;\n this.richTextBox1.Text = \"\";\n this.richTextBox1.DoubleClick += new System.EventHandler(this.richTextBox1_DoubleClick);\n // \n // groupBox3\n // \n this.groupBox3.Controls.Add(this.button8);\n this.groupBox3.Controls.Add(this.textBox10);\n this.groupBox3.Controls.Add(this.checkBox4);\n this.groupBox3.Controls.Add(this.numericUpDown8);\n this.groupBox3.Controls.Add(this.checkBox3);\n this.groupBox3.Controls.Add(this.button4);\n this.groupBox3.Controls.Add(this.checkBox1);\n this.groupBox3.Controls.Add(this.numericUpDown6);\n this.groupBox3.Controls.Add(this.checkBox2);\n this.groupBox3.Controls.Add(this.numericUpDown5);\n this.groupBox3.Controls.Add(this.comboBox5);\n this.groupBox3.Controls.Add(this.label19);\n this.groupBox3.Controls.Add(this.comboBox3);\n this.groupBox3.Controls.Add(this.label10);\n this.groupBox3.Controls.Add(this.label4);\n this.groupBox3.Controls.Add(this.comboBox2);\n this.groupBox3.Controls.Add(this.label9);\n this.groupBox3.Controls.Add(this.label5);\n this.groupBox3.Controls.Add(this.numericUpDown7);\n this.groupBox3.Controls.Add(this.label20);\n this.groupBox3.Location = new System.Drawing.Point(13, 503);\n this.groupBox3.Name = \"groupBox3\";\n this.groupBox3.Size = new System.Drawing.Size(780, 103);\n this.groupBox3.TabIndex = 2;\n this.groupBox3.TabStop = false;\n this.groupBox3.Text = \"高级设置\";\n this.groupBox3.Visible = false;\n // \n // button8\n // \n this.button8.Location = new System.Drawing.Point(695, 43);\n this.button8.Name = \"button8\";\n this.button8.Size = new System.Drawing.Size(75, 23);\n this.button8.TabIndex = 29;\n this.button8.Text = \"补充参数\";\n this.button8.UseVisualStyleBackColor = true;\n this.button8.Click += new System.EventHandler(this.button8_Click);\n // \n // textBox10\n // \n this.textBox10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox10.Enabled = false;\n this.textBox10.Location = new System.Drawing.Point(141, 73);\n this.textBox10.Name = \"textBox10\";\n this.textBox10.PasswordChar = '*';\n this.textBox10.Size = new System.Drawing.Size(110, 21);\n this.textBox10.TabIndex = 6;\n this.textBox10.Text = \"admin\";\n this.textBox10.Enter += new System.EventHandler(this.textBox10_Enter);\n this.textBox10.Leave += new System.EventHandler(this.textBox10_Leave);\n // \n // checkBox4\n // \n this.checkBox4.AutoSize = true;\n this.checkBox4.Location = new System.Drawing.Point(9, 75);\n this.checkBox4.Name = \"checkBox4\";\n this.checkBox4.Size = new System.Drawing.Size(138, 16);\n this.checkBox4.TabIndex = 28;\n this.checkBox4.Text = \"启用WebUI API密钥:\";\n this.checkBox4.UseVisualStyleBackColor = true;\n this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox4_CheckedChanged);\n // \n // numericUpDown8\n // \n this.numericUpDown8.Enabled = false;\n this.numericUpDown8.Location = new System.Drawing.Point(122, 45);\n this.numericUpDown8.Maximum = new decimal(new int[] {\n 65535,\n 0,\n 0,\n 0});\n this.numericUpDown8.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown8.Name = \"numericUpDown8\";\n this.numericUpDown8.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown8.TabIndex = 22;\n this.numericUpDown8.Value = new decimal(new int[] {\n 100,\n 0,\n 0,\n 0});\n // \n // checkBox3\n // \n this.checkBox3.AutoSize = true;\n this.checkBox3.Location = new System.Drawing.Point(9, 48);\n this.checkBox3.Name = \"checkBox3\";\n this.checkBox3.Size = new System.Drawing.Size(108, 16);\n this.checkBox3.TabIndex = 27;\n this.checkBox3.Text = \"节点保存数目:\";\n this.checkBox3.UseVisualStyleBackColor = true;\n this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged);\n // \n // button4\n // \n this.button4.Location = new System.Drawing.Point(695, 71);\n this.button4.Name = \"button4\";\n this.button4.Size = new System.Drawing.Size(75, 23);\n this.button4.TabIndex = 26;\n this.button4.Text = \"检查更新\";\n this.button4.UseVisualStyleBackColor = true;\n this.button4.Click += new System.EventHandler(this.button4_Click);\n // \n // checkBox1\n // \n this.checkBox1.AutoSize = true;\n this.checkBox1.Checked = true;\n this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;\n this.checkBox1.Location = new System.Drawing.Point(9, 20);\n this.checkBox1.Name = \"checkBox1\";\n this.checkBox1.Size = new System.Drawing.Size(96, 16);\n this.checkBox1.TabIndex = 22;\n this.checkBox1.Text = \"节点地址查询\";\n this.checkBox1.UseVisualStyleBackColor = true;\n this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);\n // \n // checkBox2\n // \n this.checkBox2.AutoSize = true;\n this.checkBox2.Location = new System.Drawing.Point(106, 20);\n this.checkBox2.Name = \"checkBox2\";\n this.checkBox2.Size = new System.Drawing.Size(84, 16);\n this.checkBox2.TabIndex = 25;\n this.checkBox2.Text = \"流媒体检测\";\n this.checkBox2.UseVisualStyleBackColor = true;\n this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);\n // \n // comboBox5\n // \n this.comboBox5.FormattingEnabled = true;\n this.comboBox5.Items.AddRange(new object[] {\n \"[内置]布丁狗的订阅转换\",\n \"[内置]ACL4SSR_Online_Full\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/布丁狗的订阅转\" +\n \"换.yaml\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/ACL4SSR\" +\n \"_Online_Full.yaml\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/ACL4SSR\" +\n \"_Online_Full_WithIcon.yaml\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/添加直连规则.\" +\n \"yaml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/布丁狗的订阅转换.y\" +\n \"aml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/ACL4SSR_On\" +\n \"line_Full.yaml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/ACL4SSR_On\" +\n \"line_Full_WithIcon.yaml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/添加直连规则.yam\" +\n \"l\"});\n this.comboBox5.Location = new System.Drawing.Point(414, 73);\n this.comboBox5.Name = \"comboBox5\";\n this.comboBox5.Size = new System.Drawing.Size(275, 20);\n this.comboBox5.TabIndex = 24;\n this.comboBox5.SelectedIndexChanged += new System.EventHandler(this.comboBox5_SelectedIndexChanged);\n // \n // label19\n // \n this.label19.AutoSize = true;\n this.label19.Location = new System.Drawing.Point(260, 76);\n this.label19.Name = \"label19\";\n this.label19.Size = new System.Drawing.Size(149, 12);\n this.label19.TabIndex = 23;\n this.label19.Text = \"Clash订阅 覆写配置文件:\";\n // \n // comboBox3\n // \n this.comboBox3.FormattingEnabled = true;\n this.comboBox3.Items.AddRange(new object[] {\n \"自动选择\",\n \"1.github.010716.xyz\",\n \"113355.kabaka.xyz\",\n \"80888888.xyz\",\n \"aa.w0x7ce.eu\",\n \"acc.meiqer.com\",\n \"api-ghp.fjy.zone\",\n \"armg1.jyhk.tk\",\n \"armg2.jyhk.tk\",\n \"b.yesican.top\",\n \"bakht1.jsdelivr.fyi\",\n \"bakht2.jsdelivr.fyi\",\n \"bakht3.jsdelivr.fyi\",\n \"booster.ookkk.ggff.net\",\n \"c.gatepro.cn\",\n \"cc.ikakatoo.us\",\n \"ccgit1.5gyh.cf\",\n \"ccgit2.5gyh.cf\",\n \"cdn-gh.141888.xyz\",\n \"cfghproxy.165683.xyz\",\n \"chirophy.online\",\n \"choner.eu.org\",\n \"d.scyun.top\",\n \"daili.6dot.cn\",\n \"dh.guluy.top\",\n \"dh.jeblove.com\",\n \"dl.github.mirror.shalo.link\",\n \"dnsvip.uk\",\n \"docker.bkxhkoo.com\",\n \"docker.ppp.ac.cn\",\n \"down.avi.gs\",\n \"download.ojbk.one\",\n \"download.serein.cc\",\n \"f.shenbing.nyc.mn\",\n \"fastgithub.starryfun.icu\",\n \"file.justgame.top\",\n \"ft.v1k1.xin\",\n \"fuck-flow.nobige.cn\",\n \"g.108964.xyz\",\n \"g.blfrp.cn\",\n \"g.bravexist.cn\",\n \"g.down.0ms.net\",\n \"g.jscdn.cn\",\n \"g.yeyuqiufeng.cn\",\n \"gh.136361.xyz\",\n \"gh.13x.plus\",\n \"gh.19121912.xyz\",\n \"gh.193.gs\",\n \"gh.220106.xyz\",\n \"gh.222322.xyz\",\n \"gh.244224659.xyz\",\n \"gh.2i.gs\",\n \"gh.316688.xyz\",\n \"gh.321122.xyz\",\n \"gh.334433.xyz\",\n \"gh.39.al\",\n \"gh.518298.xyz\",\n \"gh.52099520.xyz\",\n \"gh.654535.xyz\",\n \"gh.777000.best\",\n \"gh.799154.xyz\",\n \"gh.860686.xyz\",\n \"gh.8p.gs\",\n \"gh.960980.xyz\",\n \"gh.accn.eu.org\",\n \"gh.amirrors.com\",\n \"gh.andiest.com\",\n \"gh.aurzex.top\",\n \"gh.avmine.com\",\n \"gh.b52m.cn\",\n \"gh.bhexo.cn\",\n \"gh.cdn.fullcone.cn\",\n \"gh.chewable.eu.org\",\n \"gh.chillwaytech.com\",\n \"gh.cnbattle.com\",\n \"gh.crond.dev\",\n \"gh.dev.438250.xyz\",\n \"gh.duang.io\",\n \"gh.duckcc.com\",\n \"gh.dwsy.link\",\n \"gh.ecdn.ip-ddns.com\",\n \"gh.flewsea.news\",\n \"gh.flewsea.pw\",\n \"gh.flyrr.cc\",\n \"gh.gongyi.tk\",\n \"gh.gorun.eu.org\",\n \"gh.gxb.pub\",\n \"gh.haloless.com\",\n \"gh.heshiheng.top\",\n \"gh.hitcs.cc\",\n \"gh.i3.pw\",\n \"gh.ibridge.eu.org\",\n \"gh.iinx.top\",\n \"gh.j8.work\",\n \"gh.jadelive.top\",\n \"gh.jscdn.cn\",\n \"gh.jxq.io\",\n \"gh.kejilion.pro\",\n \"gh.kemon.ai\",\n \"gh.kmxm.online\",\n \"gh.lib.cx\",\n \"gh.lkwplus.com\",\n \"gh.lux1983.com\",\n \"gh.luzy.top\",\n \"gh.lyh.moe\",\n \"gh.miaomiao.video\",\n \"gh.micedns.cloudns.org\",\n \"gh.mirror.190211.xyz\",\n \"gh.mirror.coolfeature.top\",\n \"gh.moetools.net\",\n \"gh.momonomi.xyz\",\n \"gh.mrskye.cn\",\n \"gh.mtx72.cc\",\n \"gh.nekhill.top\",\n \"gh.nekorect.eu.org\",\n \"gh.nextfuture.top\",\n \"gh.oevery.me\",\n \"gh.oneproxy.top\",\n \"gh.opsproxy.com\",\n \"gh.osspub.cn\",\n \"gh.padao.fun\",\n \"gh.prlrr.com\",\n \"gh.pylas.xyz\",\n \"gh.qptf.eu.org\",\n \"gh.qsd.onl\",\n \"gh.qsq.one\",\n \"gh.rem.asia\",\n \"gh.riye.de\",\n \"gh.scy.ink\",\n \"gh.someo.top\",\n \"gh.stanl.ee\",\n \"gh.stewitch.com\",\n \"gh.suite.eu.org\",\n \"gh.tbw.wiki\",\n \"gh.tou.lu\",\n \"gh.tryxd.cn\",\n \"gh.uclort.com\",\n \"gh.wglee.org\",\n \"gh.wowforever.xyz\",\n \"gh.wuuu.cc\",\n \"gh.wwang.de\",\n \"gh.wygg.us.kg\",\n \"gh.xbzza.cn\",\n \"gh.xda.plus\",\n \"gh.yahool.com.cn\",\n \"gh.yushum.com\",\n \"ghac.760710.xyz\",\n \"ghacc.cpuhk.eu.org\",\n \"ghb.wglee.org\",\n \"gh-boost.oneboy.app\",\n \"gh-deno.mocn.top\",\n \"ghfast.top\",\n \"ghjs.131412.eu.org\",\n \"ghp.618032.xyz\",\n \"ghp.9e6.site\",\n \"ghp.dnsplus.uk\",\n \"ghp.fit2.fun\",\n \"ghp.imc.re\",\n \"ghp.jokeme.top\",\n \"ghp.lanchonghai.com\",\n \"ghp.miaostay.com\",\n \"ghp.opendatahub.xyz\",\n \"ghp.pbren.com\",\n \"ghp.src.moe\",\n \"ghp.tryanks.com\",\n \"ghp.vatery.com\",\n \"ghp.xiaopan.ai\",\n \"ghp.ybot.xin\",\n \"ghp.yeye.f5.si\",\n \"ghproxy.0081024.xyz\",\n \"ghproxy.053000.xyz\",\n \"ghproxy.200502.xyz\",\n \"ghproxy.943689.xyz\",\n \"ghproxy.alltobid.cc\",\n \"ghproxy.amayakite.xyz\",\n \"ghproxy.bugungu.top\",\n \"gh-proxy.dorz.tech\",\n \"ghproxy.dsdog.tk\",\n \"ghproxy.ducknet.work\",\n \"ghproxy.gopher.ink\",\n \"ghproxy.gpnu.org\",\n \"ghproxy.hoshizukimio.top\",\n \"gh-proxy.iflyelf.com\",\n \"ghproxy.imoyuapp.win\",\n \"gh-proxy.jacksixth.top\",\n \"gh-proxy.jmper.me\",\n \"ghproxy.joylian.com\",\n \"gh-proxy.just520.top\",\n \"ghproxy.licardo.vip\",\n \"gh-proxy.mereith.com\",\n \"ghproxy.minge.dev\",\n \"ghproxy.missfuture.eu.org\",\n \"ghproxy.moweilong.com\",\n \"ghproxy.nanakorobi.com\",\n \"ghproxy.net\",\n \"gh-proxy.not.icu\",\n \"ghproxy.ownyuan.top\",\n \"gh-proxy.rxliuli.com\",\n \"ghproxy.sakuramoe.dev\",\n \"ghproxy.smallfawn.work\",\n \"ghproxy.sveir.xyz\",\n \"ghproxy.temoa.fun\",\n \"ghproxy.thefoxnet.com\",\n \"ghproxy.tracemouse.top\",\n \"ghproxy.txq.life\",\n \"ghproxy.viper.pub\",\n \"ghproxy.vyronlee-lab.com\",\n \"ghproxy.weizhiwen.net\",\n \"ghproxy.wjsphy.top\",\n \"ghproxy.workers.haoutil.com\",\n \"ghproxy.xiaohei-studio-chatgpt-proxy.com.cn\",\n \"gh-proxy.yuntao.me\",\n \"git.1999111.xyz\",\n \"git.22345678.xyz\",\n \"git.40609891.xyz\",\n \"git.5gyh.cf\",\n \"git.988896.xyz\",\n \"git.aaltozz.info\",\n \"git.acap.cc\",\n \"git.amoluo.win\",\n \"git.anye.in\",\n \"git.binbow.link\",\n \"git.blaow.cloudns.org\",\n \"git.closersyu.top\",\n \"git.ifso.site\",\n \"git.imvery.moe\",\n \"git.ixdd.de\",\n \"git.ldvx.de\",\n \"git.lincloud.pro\",\n \"git.liunasc.xyz\",\n \"git.llvho.com\",\n \"git.loushi.site\",\n \"git.lzzz.ink\",\n \"git.maomao.ovh\",\n \"git.mokoc.live\",\n \"git.niege.app\",\n \"git.nyar.work\",\n \"git.o8.cx\",\n \"git.outtw.com\",\n \"git.ppp.ac.cn\",\n \"git.repcz.link\",\n \"git.txaff.com\",\n \"git.verynb.org\",\n \"git.wsl.icu\",\n \"git.wyy.sh\",\n \"git.xiny.eu.org\",\n \"git.xuantan.icu\",\n \"git.zlong.eu.org\",\n \"git3.openapi.site\",\n \"git-clone.ccrui.dev\",\n \"github.08050611.xyz\",\n \"github.143760.xyz\",\n \"github.170011.xyz\",\n \"github.17263241.xyz\",\n \"github.180280.xyz\",\n \"github.197909.xyz\",\n \"github.19890821.xyz\",\n \"github.201068.xyz\",\n \"github.333033.xyz\",\n \"github.4240333.xyz\",\n \"github.564456.xyz\",\n \"github.732086.xyz\",\n \"github.776884.xyz\",\n \"github.789056.xyz\",\n \"github.818668.xyz\",\n \"github.8void.sbs\",\n \"github.9394961.xyz\",\n \"github.960118.xyz\",\n \"github.abyss.moe\",\n \"github.atzzz.com\",\n \"github.axcio.dns-dynamic.net\",\n \"github.boki.moe\",\n \"github.boringhex.top\",\n \"github.bullb.net\",\n \"github.c1g.top\",\n \"github.cf.xihale.top\",\n \"github.chasun.top\",\n \"github.chuancey.eu.org\",\n \"github.cnxiaobai.com\",\n \"github.computerqwq.top\",\n \"github.cswklt.top\",\n \"github.ctios.cn\",\n \"github.ddlink.asia\",\n \"github.dockerspeed.site\",\n \"github.eejsq.net\",\n \"github.ffffffff0x.com\",\n \"github.gdzja.site\",\n \"github.haodiy.xyz\",\n \"github.hhh.sd\",\n \"github.hi.edu.rs\",\n \"github.hostscc.top\",\n \"github.hx208.top\",\n \"github.ilxyz.xyz\",\n \"github.intellisensing.tech\",\n \"github.jerryliang.win\",\n \"github.jimmyshjj.top\",\n \"github.jinenyy.vip\",\n \"github.jscdn.cn\",\n \"github.kidos.top\",\n \"github.kuugo.top\",\n \"github.lao.plus\",\n \"github.mayx.eu.org\",\n \"github.mirror.qlnu-sec.cn\",\n \"github.mirror.vurl.eu.org\",\n \"github.mirrors.hikafeng.com\",\n \"github.mistudio.top\",\n \"github.orangbus.cn\",\n \"github.pipers.cn\",\n \"github.proxy.zerozone.tech\",\n \"github.pxy.lnsee.com\",\n \"github.quickso.net\",\n \"github.ruxi.org\",\n \"github.sagolu.top\",\n \"github.serein.cc\",\n \"github.snakexgc.com\",\n \"github.space520.eu.org\",\n \"github.sssss.work\",\n \"github.static.cv\",\n \"github.suyijun.top\",\n \"github.try255.com\",\n \"github.unipus.site\",\n \"github.verynb.org\",\n \"github.vipchanel.com\",\n \"github.widiazine.top\",\n \"github.workers.lv10.ren\",\n \"github.workersnail.com\",\n \"github.xin-yu.cloud\",\n \"github.xiongmx.com\",\n \"github.xwb009.xyz\",\n \"github.xxlab.tech\",\n \"github.xxqq.de\",\n \"github.xykcloud.com\",\n \"github.yeep6.eu.org\",\n \"github.ylyhtools.top\",\n \"github.yoloarea.com\",\n \"github.yunfile.fun\",\n \"github.zhaolele.top\",\n \"github.zhou2008.cn\",\n \"github.zhulin240520.buzz\",\n \"github.zyhmifan.top\",\n \"githubacc.caiaiwan.com\",\n \"githubapi.jjchizha.com\",\n \"githubgo.856798.xyz\",\n \"github-proxy.ai-lulu.top\",\n \"github-proxy.caoayu.top\",\n \"github-proxy.explorexd.uk\",\n \"github-proxy.fjiabinc.cn\",\n \"github-proxy.sharefree.site\",\n \"githubproxy.unix.do\",\n \"github-quick.1ms.dev\",\n \"github-raw-download.nekhill.top\",\n \"githubsg.lilyya.top\",\n \"gitproxy.mrhjx.cn\",\n \"gitproxy.ozoo.top\",\n \"godlike.ezpull.top\",\n \"gp.19841106.xyz\",\n \"gp.dahe.now.cc\",\n \"gp.daxei.now.cc\",\n \"g-p.loli.us\",\n \"gp.ownorigin.top\",\n \"gt.changqqq.xyz\",\n \"gxb.pub\",\n \"hay.uxio.cn\",\n \"hg.19840228.top\",\n \"hh.newhappy.cf\",\n \"hk.114914.xyz\",\n \"hub.12138.3653655.xyz\",\n \"hub.326998.xyz\",\n \"hub.885666.xyz\",\n \"hub.fnas64.xin\",\n \"hub.jeblove.com\",\n \"hub.naloong.de\",\n \"hub.vps.861020.xyz\",\n \"hub.vvn.me\",\n \"hub.why-ing.top\",\n \"hub.xjl.ch\",\n \"jh.ussh.net\",\n \"jias.ayanjiu.top\",\n \"jiasu.iwtriptqt1016.eu.org\",\n \"jiasughapi.lingjun.cc\",\n \"jiasuqi.167889.xyz\",\n \"jisuan.xyz\",\n \"js.wd666.cloudns.biz\",\n \"l0l0l.cc\",\n \"m.seafood.loan\",\n \"mc.cn.eu.org\",\n \"mdv.162899.xyz\",\n \"micromatrix.gq\",\n \"mip.cnzzla.com\",\n \"my.iiso.site\",\n \"my.losesw.live\",\n \"mygh.api.xiaomao.eu.org\",\n \"nav.253874.net\",\n \"nav.cxycsx.vip\",\n \"nav.gjcloak.xyz\",\n \"nav.hgd1999.com\",\n \"nav.hoiho.cn\",\n \"nav.syss.fun\",\n \"nav.tossp.com\",\n \"nav.wxapp.xyz\",\n \"nav.yyxw.tk\",\n \"navs.itmax.cn\",\n \"neoz.chat\",\n \"noad.keliyan.top\",\n \"node2.txq.life\",\n \"or.tianba.eu.org\",\n \"p.jackyu.cn\",\n \"privateghproxy.iil.im\",\n \"proxy.191027.xyz\",\n \"proxy.atoposs.com\",\n \"proxy.ccc8.vip\",\n \"proxy.dragontea.cc\",\n \"proxy.fakups.cn\",\n \"proxydl.lcayun.cn\",\n \"proxy-gh.1l1.icu\",\n \"q-github.cnxiaobai.com\",\n \"ql.l50.top\",\n \"raw.nmd.im\",\n \"rst.567812.xyz\",\n \"static.kaixinwu.vip\",\n \"static.yiwangmeng.com\",\n \"t.992699.xyz\",\n \"tpe.corpa.me\",\n \"tube.20140301.xyz\",\n \"vps.pansen626.com\",\n \"wfgithub.xiaonuomi.ie.eu.org\"});\n this.comboBox3.Location = new System.Drawing.Point(600, 19);\n this.comboBox3.Name = \"comboBox3\";\n this.comboBox3.Size = new System.Drawing.Size(170, 20);\n this.comboBox3.TabIndex = 21;\n this.comboBox3.Leave += new System.EventHandler(this.comboBox3_Leave);\n // \n // label10\n // \n this.label10.AutoSize = true;\n this.label10.Location = new System.Drawing.Point(505, 21);\n this.label10.Name = \"label10\";\n this.label10.Size = new System.Drawing.Size(89, 12);\n this.label10.TabIndex = 20;\n this.label10.Text = \"Github Proxy:\";\n // \n // comboBox2\n // \n this.comboBox2.FormattingEnabled = true;\n this.comboBox2.Items.AddRange(new object[] {\n \"https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases/download/v2.21.12/\" +\n \"Waifu2x-Extension-GUI-v2.21.12-Portable.7z\",\n \"https://github.com/2dust/v2rayN/releases/download/7.10.4/v2rayN-windows-64-deskto\" +\n \"p.zip\",\n \"https://github.com/VSCodium/vscodium/releases/download/1.98.0.25067/codium-1.98.0\" +\n \".25067-el9.aarch64.rpm\"});\n this.comboBox2.Location = new System.Drawing.Point(414, 45);\n this.comboBox2.Name = \"comboBox2\";\n this.comboBox2.Size = new System.Drawing.Size(275, 20);\n this.comboBox2.TabIndex = 19;\n this.comboBox2.Text = \"https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases/download/v2.21.12/\" +\n \"Waifu2x-Extension-GUI-v2.21.12-Portable.7z\";\n // \n // label9\n // \n this.label9.AutoSize = true;\n this.label9.Location = new System.Drawing.Point(344, 48);\n this.label9.Name = \"label9\";\n this.label9.Size = new System.Drawing.Size(65, 12);\n this.label9.TabIndex = 18;\n this.label9.Text = \"测速地址:\";\n // \n // progressBar1\n // \n this.progressBar1.Location = new System.Drawing.Point(13, 3);\n this.progressBar1.Name = \"progressBar1\";\n this.progressBar1.Size = new System.Drawing.Size(780, 3);\n this.progressBar1.TabIndex = 3;\n // \n // timer2\n // \n this.timer2.Interval = 2000;\n this.timer2.Tick += new System.EventHandler(this.timer2_Tick);\n // \n // groupBox4\n // \n this.groupBox4.Controls.Add(this.textBox4);\n this.groupBox4.Controls.Add(this.label13);\n this.groupBox4.Controls.Add(this.textBox3);\n this.groupBox4.Controls.Add(this.label12);\n this.groupBox4.Controls.Add(this.textBox2);\n this.groupBox4.Controls.Add(this.label11);\n this.groupBox4.Location = new System.Drawing.Point(13, 612);\n this.groupBox4.Name = \"groupBox4\";\n this.groupBox4.Size = new System.Drawing.Size(780, 51);\n this.groupBox4.TabIndex = 4;\n this.groupBox4.TabStop = false;\n this.groupBox4.Text = \"Gist 上传参数\";\n this.groupBox4.Visible = false;\n // \n // textBox4\n // \n this.textBox4.Location = new System.Drawing.Point(467, 18);\n this.textBox4.Name = \"textBox4\";\n this.textBox4.Size = new System.Drawing.Size(306, 21);\n this.textBox4.TabIndex = 5;\n // \n // label13\n // \n this.label13.AutoSize = true;\n this.label13.Location = new System.Drawing.Point(359, 21);\n this.label13.Name = \"label13\";\n this.label13.Size = new System.Drawing.Size(113, 12);\n this.label13.TabIndex = 4;\n this.label13.Text = \"API Mirror(可选):\";\n // \n // textBox3\n // \n this.textBox3.Location = new System.Drawing.Point(253, 18);\n this.textBox3.Name = \"textBox3\";\n this.textBox3.PasswordChar = '*';\n this.textBox3.Size = new System.Drawing.Size(100, 21);\n this.textBox3.TabIndex = 3;\n this.textBox3.Enter += new System.EventHandler(this.textBox3_Enter);\n this.textBox3.Leave += new System.EventHandler(this.textBox3_Leave);\n // \n // label12\n // \n this.label12.AutoSize = true;\n this.label12.Location = new System.Drawing.Point(168, 21);\n this.label12.Name = \"label12\";\n this.label12.Size = new System.Drawing.Size(89, 12);\n this.label12.TabIndex = 2;\n this.label12.Text = \"Github Token:\";\n // \n // textBox2\n // \n this.textBox2.Location = new System.Drawing.Point(62, 18);\n this.textBox2.Name = \"textBox2\";\n this.textBox2.Size = new System.Drawing.Size(100, 21);\n this.textBox2.TabIndex = 1;\n // \n // label11\n // \n this.label11.AutoSize = true;\n this.label11.Location = new System.Drawing.Point(7, 21);\n this.label11.Name = \"label11\";\n this.label11.Size = new System.Drawing.Size(59, 12);\n this.label11.TabIndex = 0;\n this.label11.Text = \"Gist ID:\";\n // \n // toolTip1\n // \n this.toolTip1.AutoPopDelay = 5000;\n this.toolTip1.InitialDelay = 500;\n this.toolTip1.ReshowDelay = 500;\n this.toolTip1.ShowAlways = true;\n // \n // groupBox5\n // \n this.groupBox5.Controls.Add(this.textBox6);\n this.groupBox5.Controls.Add(this.label15);\n this.groupBox5.Controls.Add(this.textBox7);\n this.groupBox5.Controls.Add(this.label16);\n this.groupBox5.Location = new System.Drawing.Point(13, 669);\n this.groupBox5.Name = \"groupBox5\";\n this.groupBox5.Size = new System.Drawing.Size(780, 51);\n this.groupBox5.TabIndex = 6;\n this.groupBox5.TabStop = false;\n this.groupBox5.Text = \"R2 上传参数\";\n this.groupBox5.Visible = false;\n // \n // textBox6\n // \n this.textBox6.Location = new System.Drawing.Point(467, 18);\n this.textBox6.Name = \"textBox6\";\n this.textBox6.PasswordChar = '*';\n this.textBox6.Size = new System.Drawing.Size(306, 21);\n this.textBox6.TabIndex = 3;\n this.textBox6.Text = \"1234567890\";\n this.textBox6.Enter += new System.EventHandler(this.textBox3_Enter);\n this.textBox6.Leave += new System.EventHandler(this.textBox3_Leave);\n // \n // label15\n // \n this.label15.AutoSize = true;\n this.label15.Location = new System.Drawing.Point(382, 21);\n this.label15.Name = \"label15\";\n this.label15.Size = new System.Drawing.Size(89, 12);\n this.label15.TabIndex = 2;\n this.label15.Text = \"Worker Token:\";\n // \n // textBox7\n // \n this.textBox7.Location = new System.Drawing.Point(88, 18);\n this.textBox7.Name = \"textBox7\";\n this.textBox7.Size = new System.Drawing.Size(285, 21);\n this.textBox7.TabIndex = 1;\n this.textBox7.Text = \"https://example.worker.dev\";\n this.textBox7.Leave += new System.EventHandler(this.textBox7_Leave);\n // \n // label16\n // \n this.label16.AutoSize = true;\n this.label16.Location = new System.Drawing.Point(7, 21);\n this.label16.Name = \"label16\";\n this.label16.Size = new System.Drawing.Size(77, 12);\n this.label16.TabIndex = 0;\n this.label16.Text = \"Worker URL:\";\n // \n // groupBox6\n // \n this.groupBox6.Controls.Add(this.textBox5);\n this.groupBox6.Controls.Add(this.label14);\n this.groupBox6.Controls.Add(this.textBox8);\n this.groupBox6.Controls.Add(this.label17);\n this.groupBox6.Controls.Add(this.textBox9);\n this.groupBox6.Controls.Add(this.label18);\n this.groupBox6.Location = new System.Drawing.Point(13, 726);\n this.groupBox6.Name = \"groupBox6\";\n this.groupBox6.Size = new System.Drawing.Size(780, 51);\n this.groupBox6.TabIndex = 6;\n this.groupBox6.TabStop = false;\n this.groupBox6.Text = \"Webdav 上传参数\";\n this.groupBox6.Visible = false;\n // \n // textBox5\n // \n this.textBox5.Location = new System.Drawing.Point(467, 18);\n this.textBox5.Name = \"textBox5\";\n this.textBox5.Size = new System.Drawing.Size(306, 21);\n this.textBox5.TabIndex = 5;\n this.textBox5.Text = \"https://example.com/dav/\";\n // \n // label14\n // \n this.label14.AutoSize = true;\n this.label14.Location = new System.Drawing.Point(382, 21);\n this.label14.Name = \"label14\";\n this.label14.Size = new System.Drawing.Size(77, 12);\n this.label14.TabIndex = 4;\n this.label14.Text = \"Webdav URL:\";\n // \n // textBox8\n // \n this.textBox8.Location = new System.Drawing.Point(257, 18);\n this.textBox8.Name = \"textBox8\";\n this.textBox8.PasswordChar = '*';\n this.textBox8.Size = new System.Drawing.Size(110, 21);\n this.textBox8.TabIndex = 3;\n this.textBox8.Text = \"admin\";\n this.textBox8.Enter += new System.EventHandler(this.textBox3_Enter);\n this.textBox8.Leave += new System.EventHandler(this.textBox3_Leave);\n // \n // label17\n // \n this.label17.AutoSize = true;\n this.label17.Location = new System.Drawing.Point(186, 21);\n this.label17.Name = \"label17\";\n this.label17.Size = new System.Drawing.Size(65, 12);\n this.label17.TabIndex = 2;\n this.label17.Text = \"Password:\";\n // \n // textBox9\n // \n this.textBox9.Location = new System.Drawing.Point(70, 18);\n this.textBox9.Name = \"textBox9\";\n this.textBox9.Size = new System.Drawing.Size(110, 21);\n this.textBox9.TabIndex = 1;\n this.textBox9.Text = \"admin\";\n // \n // label18\n // \n this.label18.AutoSize = true;\n this.label18.Location = new System.Drawing.Point(7, 21);\n this.label18.Name = \"label18\";\n this.label18.Size = new System.Drawing.Size(65, 12);\n this.label18.TabIndex = 0;\n this.label18.Text = \"Username:\";\n // \n // timer3\n // \n this.timer3.Interval = 86400000;\n this.timer3.Tick += new System.EventHandler(this.timer3_Tick);\n // \n // timer4\n // \n this.timer4.Interval = 1000;\n this.timer4.Tick += new System.EventHandler(this.timer4_Tick);\n // \n // Form1\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.AutoSize = true;\n this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\n this.ClientSize = new System.Drawing.Size(800, 784);\n this.Controls.Add(this.groupBox6);\n this.Controls.Add(this.groupBox5);\n this.Controls.Add(this.groupBox4);\n this.Controls.Add(this.groupBox3);\n this.Controls.Add(this.groupBox2);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.progressBar1);\n this.Icon = ((System.Drawing.Icon)(resources.GetObject(\"$this.Icon\")));\n this.MaximizeBox = false;\n this.Name = \"Form1\";\n this.Text = \"SubsCheck Win GUI\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown7)).EndInit();\n this.groupBox2.ResumeLayout(false);\n this.groupBox2.PerformLayout();\n this.groupBox3.ResumeLayout(false);\n this.groupBox3.PerformLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown8)).EndInit();\n this.groupBox4.ResumeLayout(false);\n this.groupBox4.PerformLayout();\n this.groupBox5.ResumeLayout(false);\n this.groupBox5.PerformLayout();\n this.groupBox6.ResumeLayout(false);\n this.groupBox6.PerformLayout();\n this.ResumeLayout(false);\n\n }\n\n #endregion\n\n private System.Windows.Forms.NotifyIcon notifyIcon1;\n private System.Windows.Forms.Timer timer1;\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.GroupBox groupBox2;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.GroupBox groupBox3;\n private System.Windows.Forms.Label label8;\n private System.Windows.Forms.Label label7;\n private System.Windows.Forms.Label label4;\n private System.Windows.Forms.Label label5;\n private System.Windows.Forms.Label label6;\n private System.Windows.Forms.Label label3;\n private System.Windows.Forms.Label label2;\n private System.Windows.Forms.Label label1;\n private System.Windows.Forms.NumericUpDown numericUpDown6;\n private System.Windows.Forms.NumericUpDown numericUpDown5;\n private System.Windows.Forms.NumericUpDown numericUpDown4;\n private System.Windows.Forms.NumericUpDown numericUpDown3;\n private System.Windows.Forms.NumericUpDown numericUpDown2;\n private System.Windows.Forms.NumericUpDown numericUpDown1;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.ComboBox comboBox1;\n private System.Windows.Forms.ComboBox comboBox2;\n private System.Windows.Forms.Label label9;\n private System.Windows.Forms.ComboBox comboBox3;\n private System.Windows.Forms.Label label10;\n private System.Windows.Forms.CheckBox checkBox1;\n private System.Windows.Forms.RichTextBox richTextBox1;\n private System.Windows.Forms.ProgressBar progressBar1;\n private System.Windows.Forms.Button button3;\n private System.Windows.Forms.Timer timer2;\n private System.Windows.Forms.GroupBox groupBox4;\n private System.Windows.Forms.TextBox textBox4;\n private System.Windows.Forms.Label label13;\n private System.Windows.Forms.TextBox textBox3;\n private System.Windows.Forms.Label label12;\n private System.Windows.Forms.TextBox textBox2;\n private System.Windows.Forms.Label label11;\n private System.Windows.Forms.ToolTip toolTip1;\n private System.Windows.Forms.GroupBox groupBox5;\n private System.Windows.Forms.TextBox textBox6;\n private System.Windows.Forms.Label label15;\n private System.Windows.Forms.TextBox textBox7;\n private System.Windows.Forms.Label label16;\n private System.Windows.Forms.GroupBox groupBox6;\n private System.Windows.Forms.TextBox textBox5;\n private System.Windows.Forms.Label label14;\n private System.Windows.Forms.TextBox textBox8;\n private System.Windows.Forms.Label label17;\n private System.Windows.Forms.TextBox textBox9;\n private System.Windows.Forms.Label label18;\n private System.Windows.Forms.Button button5;\n private System.Windows.Forms.ComboBox comboBox4;\n private System.Windows.Forms.NumericUpDown numericUpDown7;\n private System.Windows.Forms.Label label20;\n private System.Windows.Forms.Label label19;\n private System.Windows.Forms.ComboBox comboBox5;\n private System.Windows.Forms.CheckBox checkBox2;\n private System.Windows.Forms.Timer timer3;\n private System.Windows.Forms.Button button4;\n private System.Windows.Forms.NumericUpDown numericUpDown8;\n private System.Windows.Forms.CheckBox checkBox3;\n private System.Windows.Forms.TextBox textBox10;\n private System.Windows.Forms.CheckBox checkBox4;\n private System.Windows.Forms.Button button6;\n private System.Windows.Forms.Timer timer4;\n private System.Windows.Forms.Button button7;\n private System.Windows.Forms.TextBox textBox11;\n private System.Windows.Forms.LinkLabel linkLabel1;\n private System.Windows.Forms.Button button8;\n private System.Windows.Forms.CheckBox checkBox5;\n }\n}\n\n"], ["/SubsCheck-Win-GUI/about.Designer.cs", "namespace subs_check.win.gui\n{\n partial class about\n {\n /// \n /// Required designer variable.\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// Clean up any resources being used.\n /// \n /// true if managed resources should be disposed; otherwise, false.\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows Form Designer generated code\n\n /// \n /// Required method for Designer support - do not modify\n /// the contents of this method with the code editor.\n /// \n private void InitializeComponent()\n {\n System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(about));\n this.button1 = new System.Windows.Forms.Button();\n this.label1 = new System.Windows.Forms.Label();\n this.label2 = new System.Windows.Forms.Label();\n this.label3 = new System.Windows.Forms.Label();\n this.label5 = new System.Windows.Forms.Label();\n this.linkLabel1 = new System.Windows.Forms.LinkLabel();\n this.label6 = new System.Windows.Forms.Label();\n this.label7 = new System.Windows.Forms.Label();\n this.linkLabel2 = new System.Windows.Forms.LinkLabel();\n this.label8 = new System.Windows.Forms.Label();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.label13 = new System.Windows.Forms.Label();\n this.linkLabel4 = new System.Windows.Forms.LinkLabel();\n this.label12 = new System.Windows.Forms.Label();\n this.linkLabel3 = new System.Windows.Forms.LinkLabel();\n this.label11 = new System.Windows.Forms.Label();\n this.label10 = new System.Windows.Forms.Label();\n this.label9 = new System.Windows.Forms.Label();\n this.groupBox2 = new System.Windows.Forms.GroupBox();\n this.label14 = new System.Windows.Forms.Label();\n this.groupBox3 = new System.Windows.Forms.GroupBox();\n this.label15 = new System.Windows.Forms.Label();\n this.linkLabel8 = new System.Windows.Forms.LinkLabel();\n this.linkLabel6 = new System.Windows.Forms.LinkLabel();\n this.linkLabel5 = new System.Windows.Forms.LinkLabel();\n this.groupBox4 = new System.Windows.Forms.GroupBox();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.label4 = new System.Windows.Forms.Label();\n this.groupBox1.SuspendLayout();\n this.groupBox2.SuspendLayout();\n this.groupBox3.SuspendLayout();\n this.groupBox4.SuspendLayout();\n this.SuspendLayout();\n // \n // button1\n // \n this.button1.Location = new System.Drawing.Point(513, 619);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"确定\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // label1\n // \n this.label1.AutoSize = true;\n this.label1.Font = new System.Drawing.Font(\"微软雅黑\", 24.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.label1.Location = new System.Drawing.Point(10, 9);\n this.label1.Name = \"label1\";\n this.label1.Size = new System.Drawing.Size(354, 44);\n this.label1.TabIndex = 1;\n this.label1.Text = \"SubsCheck-Win-GUI\";\n // \n // label2\n // \n this.label2.AutoSize = true;\n this.label2.Location = new System.Drawing.Point(113, 19);\n this.label2.Name = \"label2\";\n this.label2.Size = new System.Drawing.Size(53, 12);\n this.label2.TabIndex = 2;\n this.label2.Text = \"未知版本\";\n // \n // label3\n // \n this.label3.AutoSize = true;\n this.label3.Location = new System.Drawing.Point(113, 119);\n this.label3.Name = \"label3\";\n this.label3.Size = new System.Drawing.Size(53, 12);\n this.label3.TabIndex = 3;\n this.label3.Text = \"未知版本\";\n // \n // label5\n // \n this.label5.AutoSize = true;\n this.label5.Location = new System.Drawing.Point(18, 119);\n this.label5.Name = \"label5\";\n this.label5.Size = new System.Drawing.Size(65, 12);\n this.label5.TabIndex = 5;\n this.label5.Text = \"内核版本:\";\n // \n // linkLabel1\n // \n this.linkLabel1.AutoSize = true;\n this.linkLabel1.Location = new System.Drawing.Point(113, 39);\n this.linkLabel1.Name = \"linkLabel1\";\n this.linkLabel1.Size = new System.Drawing.Size(257, 12);\n this.linkLabel1.TabIndex = 6;\n this.linkLabel1.TabStop = true;\n this.linkLabel1.Text = \"https://github.com/cmliu/SubsCheck-Win-GUI\";\n this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);\n // \n // label6\n // \n this.label6.AutoSize = true;\n this.label6.Location = new System.Drawing.Point(18, 139);\n this.label6.Name = \"label6\";\n this.label6.Size = new System.Drawing.Size(89, 12);\n this.label6.TabIndex = 8;\n this.label6.Text = \"内核项目地址:\";\n // \n // label7\n // \n this.label7.AutoSize = true;\n this.label7.Location = new System.Drawing.Point(18, 39);\n this.label7.Name = \"label7\";\n this.label7.Size = new System.Drawing.Size(65, 12);\n this.label7.TabIndex = 7;\n this.label7.Text = \"项目地址:\";\n // \n // linkLabel2\n // \n this.linkLabel2.AutoSize = true;\n this.linkLabel2.Location = new System.Drawing.Point(113, 139);\n this.linkLabel2.Name = \"linkLabel2\";\n this.linkLabel2.Size = new System.Drawing.Size(221, 12);\n this.linkLabel2.TabIndex = 9;\n this.linkLabel2.TabStop = true;\n this.linkLabel2.Text = \"https://github.com/beck-8/subs-check\";\n this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked);\n // \n // label8\n // \n this.label8.AutoSize = true;\n this.label8.Location = new System.Drawing.Point(18, 159);\n this.label8.Name = \"label8\";\n this.label8.Size = new System.Drawing.Size(317, 12);\n this.label8.TabIndex = 10;\n this.label8.Text = \"基于.NET Framework 4.7.2 开发 开源协议:MIT License\";\n // \n // groupBox1\n // \n this.groupBox1.Controls.Add(this.label4);\n this.groupBox1.Controls.Add(this.label13);\n this.groupBox1.Controls.Add(this.linkLabel4);\n this.groupBox1.Controls.Add(this.label12);\n this.groupBox1.Controls.Add(this.linkLabel3);\n this.groupBox1.Controls.Add(this.label11);\n this.groupBox1.Controls.Add(this.label10);\n this.groupBox1.Controls.Add(this.label9);\n this.groupBox1.Controls.Add(this.label8);\n this.groupBox1.Controls.Add(this.label2);\n this.groupBox1.Controls.Add(this.linkLabel2);\n this.groupBox1.Controls.Add(this.label3);\n this.groupBox1.Controls.Add(this.label6);\n this.groupBox1.Controls.Add(this.label5);\n this.groupBox1.Controls.Add(this.label7);\n this.groupBox1.Controls.Add(this.linkLabel1);\n this.groupBox1.Location = new System.Drawing.Point(12, 105);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(576, 183);\n this.groupBox1.TabIndex = 11;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"基本信息:\";\n // \n // label13\n // \n this.label13.AutoSize = true;\n this.label13.Location = new System.Drawing.Point(113, 59);\n this.label13.Name = \"label13\";\n this.label13.Size = new System.Drawing.Size(215, 12);\n this.label13.TabIndex = 17;\n this.label13.Text = \"CM 就是这么简单!就是这么方便!!!\";\n // \n // linkLabel4\n // \n this.linkLabel4.AutoSize = true;\n this.linkLabel4.Location = new System.Drawing.Point(113, 79);\n this.linkLabel4.Name = \"linkLabel4\";\n this.linkLabel4.Size = new System.Drawing.Size(47, 12);\n this.linkLabel4.TabIndex = 16;\n this.linkLabel4.TabStop = true;\n this.linkLabel4.Text = \"Youtube\";\n this.linkLabel4.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel4_LinkClicked);\n // \n // label12\n // \n this.label12.AutoSize = true;\n this.label12.Location = new System.Drawing.Point(18, 79);\n this.label12.Name = \"label12\";\n this.label12.Size = new System.Drawing.Size(65, 12);\n this.label12.TabIndex = 15;\n this.label12.Text = \"视频教程:\";\n // \n // linkLabel3\n // \n this.linkLabel3.AutoSize = true;\n this.linkLabel3.Location = new System.Drawing.Point(113, 99);\n this.linkLabel3.Name = \"linkLabel3\";\n this.linkLabel3.Size = new System.Drawing.Size(89, 12);\n this.linkLabel3.TabIndex = 14;\n this.linkLabel3.TabStop = true;\n this.linkLabel3.Text = \"Telegram交流群\";\n this.linkLabel3.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel3_LinkClicked);\n // \n // label11\n // \n this.label11.AutoSize = true;\n this.label11.Location = new System.Drawing.Point(18, 99);\n this.label11.Name = \"label11\";\n this.label11.Size = new System.Drawing.Size(65, 12);\n this.label11.TabIndex = 13;\n this.label11.Text = \"联系方式:\";\n // \n // label10\n // \n this.label10.AutoSize = true;\n this.label10.Location = new System.Drawing.Point(18, 59);\n this.label10.Name = \"label10\";\n this.label10.Size = new System.Drawing.Size(53, 12);\n this.label10.TabIndex = 12;\n this.label10.Text = \"开发者:\";\n // \n // label9\n // \n this.label9.AutoSize = true;\n this.label9.Location = new System.Drawing.Point(18, 19);\n this.label9.Name = \"label9\";\n this.label9.Size = new System.Drawing.Size(65, 12);\n this.label9.TabIndex = 11;\n this.label9.Text = \"当前版本:\";\n // \n // groupBox2\n // \n this.groupBox2.Controls.Add(this.label14);\n this.groupBox2.Location = new System.Drawing.Point(12, 58);\n this.groupBox2.Name = \"groupBox2\";\n this.groupBox2.Size = new System.Drawing.Size(576, 41);\n this.groupBox2.TabIndex = 12;\n this.groupBox2.TabStop = false;\n this.groupBox2.Text = \"软件简介:\";\n // \n // label14\n // \n this.label14.AutoSize = true;\n this.label14.Location = new System.Drawing.Point(18, 19);\n this.label14.Name = \"label14\";\n this.label14.Size = new System.Drawing.Size(365, 12);\n this.label14.TabIndex = 0;\n this.label14.Text = \"节点测速与订阅管理工具,可帮助用户测试、筛选和管理网络节点。\";\n // \n // groupBox3\n // \n this.groupBox3.Controls.Add(this.label15);\n this.groupBox3.Controls.Add(this.linkLabel8);\n this.groupBox3.Controls.Add(this.linkLabel6);\n this.groupBox3.Controls.Add(this.linkLabel5);\n this.groupBox3.Location = new System.Drawing.Point(12, 294);\n this.groupBox3.Name = \"groupBox3\";\n this.groupBox3.Size = new System.Drawing.Size(576, 43);\n this.groupBox3.TabIndex = 13;\n this.groupBox3.TabStop = false;\n this.groupBox3.Text = \"诚挚感谢下列开源项目及其维护者为软件开发提供的支持(排名不分先后,未能及时列出也会心存感激)\";\n // \n // label15\n // \n this.label15.AutoSize = true;\n this.label15.Location = new System.Drawing.Point(201, 19);\n this.label15.Name = \"label15\";\n this.label15.Size = new System.Drawing.Size(65, 12);\n this.label15.TabIndex = 19;\n this.label15.Text = \"ChatGPT 等\";\n // \n // linkLabel8\n // \n this.linkLabel8.AutoSize = true;\n this.linkLabel8.Location = new System.Drawing.Point(136, 19);\n this.linkLabel8.Name = \"linkLabel8\";\n this.linkLabel8.Size = new System.Drawing.Size(59, 12);\n this.linkLabel8.TabIndex = 20;\n this.linkLabel8.TabStop = true;\n this.linkLabel8.Text = \"Sub-Store\";\n this.linkLabel8.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel8_LinkClicked);\n // \n // linkLabel6\n // \n this.linkLabel6.AutoSize = true;\n this.linkLabel6.Location = new System.Drawing.Point(65, 19);\n this.linkLabel6.Name = \"linkLabel6\";\n this.linkLabel6.Size = new System.Drawing.Size(65, 12);\n this.linkLabel6.TabIndex = 19;\n this.linkLabel6.TabStop = true;\n this.linkLabel6.Text = \"bestruirui\";\n this.linkLabel6.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel6_LinkClicked);\n // \n // linkLabel5\n // \n this.linkLabel5.AutoSize = true;\n this.linkLabel5.Location = new System.Drawing.Point(18, 19);\n this.linkLabel5.Name = \"linkLabel5\";\n this.linkLabel5.Size = new System.Drawing.Size(41, 12);\n this.linkLabel5.TabIndex = 18;\n this.linkLabel5.TabStop = true;\n this.linkLabel5.Text = \"beck-8\";\n this.linkLabel5.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel5_LinkClicked);\n // \n // groupBox4\n // \n this.groupBox4.Controls.Add(this.textBox1);\n this.groupBox4.Location = new System.Drawing.Point(12, 343);\n this.groupBox4.Name = \"groupBox4\";\n this.groupBox4.Size = new System.Drawing.Size(576, 270);\n this.groupBox4.TabIndex = 14;\n this.groupBox4.TabStop = false;\n this.groupBox4.Text = \"使用条款 与 免责声明\";\n // \n // textBox1\n // \n this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;\n this.textBox1.Location = new System.Drawing.Point(6, 20);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ReadOnly = true;\n this.textBox1.Size = new System.Drawing.Size(564, 244);\n this.textBox1.TabIndex = 0;\n this.textBox1.Text = resources.GetString(\"textBox1.Text\");\n // \n // label4\n // \n this.label4.AutoSize = true;\n this.label4.Location = new System.Drawing.Point(166, 79);\n this.label4.Name = \"label4\";\n this.label4.Size = new System.Drawing.Size(390, 12);\n this.label4.TabIndex = 18;\n this.label4.Text = \"公益项目!请给我一个免费的点赞和订阅!ヾ(≧∇≦*)ゝ万分感谢!!!\";\n // \n // about\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.AutoSize = true;\n this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\n this.ClientSize = new System.Drawing.Size(598, 651);\n this.Controls.Add(this.groupBox4);\n this.Controls.Add(this.button1);\n this.Controls.Add(this.groupBox3);\n this.Controls.Add(this.groupBox2);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.label1);\n this.MaximizeBox = false;\n this.MinimizeBox = false;\n this.Name = \"about\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"关于 SubsCheck Win GUI\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.groupBox2.ResumeLayout(false);\n this.groupBox2.PerformLayout();\n this.groupBox3.ResumeLayout(false);\n this.groupBox3.PerformLayout();\n this.groupBox4.ResumeLayout(false);\n this.groupBox4.PerformLayout();\n this.ResumeLayout(false);\n this.PerformLayout();\n\n }\n\n #endregion\n\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.Label label1;\n private System.Windows.Forms.Label label2;\n private System.Windows.Forms.Label label3;\n private System.Windows.Forms.Label label5;\n private System.Windows.Forms.LinkLabel linkLabel1;\n private System.Windows.Forms.Label label6;\n private System.Windows.Forms.Label label7;\n private System.Windows.Forms.LinkLabel linkLabel2;\n private System.Windows.Forms.Label label8;\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.LinkLabel linkLabel3;\n private System.Windows.Forms.Label label11;\n private System.Windows.Forms.Label label10;\n private System.Windows.Forms.Label label9;\n private System.Windows.Forms.LinkLabel linkLabel4;\n private System.Windows.Forms.Label label12;\n private System.Windows.Forms.Label label13;\n private System.Windows.Forms.GroupBox groupBox2;\n private System.Windows.Forms.Label label14;\n private System.Windows.Forms.GroupBox groupBox3;\n private System.Windows.Forms.LinkLabel linkLabel6;\n private System.Windows.Forms.LinkLabel linkLabel5;\n private System.Windows.Forms.Label label15;\n private System.Windows.Forms.LinkLabel linkLabel8;\n private System.Windows.Forms.GroupBox groupBox4;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.Label label4;\n }\n}"], ["/SubsCheck-Win-GUI/EditURLs.Designer.cs", "namespace subs_check.win.gui\n{\n partial class EditURLs\n {\n /// \n /// Required designer variable.\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// Clean up any resources being used.\n /// \n /// true if managed resources should be disposed; otherwise, false.\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows Form Designer generated code\n\n /// \n /// Required method for Designer support - do not modify\n /// the contents of this method with the code editor.\n /// \n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n this.button1 = new System.Windows.Forms.Button();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.button2 = new System.Windows.Forms.Button();\n this.button3 = new System.Windows.Forms.Button();\n this.button4 = new System.Windows.Forms.Button();\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.SuspendLayout();\n // \n // button1\n // \n this.button1.Font = new System.Drawing.Font(\"宋体\", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.button1.Location = new System.Drawing.Point(12, 415);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"保存\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // textBox1\n // \n this.textBox1.Location = new System.Drawing.Point(12, 12);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both;\n this.textBox1.Size = new System.Drawing.Size(776, 397);\n this.textBox1.TabIndex = 1;\n // \n // button2\n // \n this.button2.Enabled = false;\n this.button2.Location = new System.Drawing.Point(174, 415);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"等待获取\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n // \n // button3\n // \n this.button3.Location = new System.Drawing.Point(93, 415);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 3;\n this.button3.Text = \"去重\";\n this.button3.UseVisualStyleBackColor = true;\n this.button3.Click += new System.EventHandler(this.button3_Click);\n // \n // button4\n // \n this.button4.Location = new System.Drawing.Point(713, 415);\n this.button4.Name = \"button4\";\n this.button4.Size = new System.Drawing.Size(75, 23);\n this.button4.TabIndex = 4;\n this.button4.Text = \"返回\";\n this.button4.UseVisualStyleBackColor = true;\n this.button4.Click += new System.EventHandler(this.button4_Click);\n // \n // timer1\n // \n this.timer1.Tick += new System.EventHandler(this.timer1_Tick);\n // \n // comboBox1\n // \n this.comboBox1.FormattingEnabled = true;\n this.comboBox1.Location = new System.Drawing.Point(255, 418);\n this.comboBox1.Name = \"comboBox1\";\n this.comboBox1.Size = new System.Drawing.Size(120, 20);\n this.comboBox1.TabIndex = 22;\n this.comboBox1.Visible = false;\n // \n // EditURLs\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.ClientSize = new System.Drawing.Size(800, 450);\n this.Controls.Add(this.comboBox1);\n this.Controls.Add(this.button4);\n this.Controls.Add(this.button3);\n this.Controls.Add(this.button2);\n this.Controls.Add(this.textBox1);\n this.Controls.Add(this.button1);\n this.MinimizeBox = false;\n this.Name = \"EditURLs\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"编辑 节点池订阅链接\";\n this.ResumeLayout(false);\n this.PerformLayout();\n\n }\n\n #endregion\n\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.Button button3;\n private System.Windows.Forms.Button button4;\n private System.Windows.Forms.Timer timer1;\n private System.Windows.Forms.ComboBox comboBox1;\n }\n}"], ["/SubsCheck-Win-GUI/CheckUpdates.Designer.cs", "namespace subs_check.win.gui\n{\n partial class CheckUpdates\n {\n /// \n /// Required designer variable.\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// Clean up any resources being used.\n /// \n /// true if managed resources should be disposed; otherwise, false.\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows Form Designer generated code\n\n /// \n /// Required method for Designer support - do not modify\n /// the contents of this method with the code editor.\n /// \n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.label4 = new System.Windows.Forms.Label();\n this.label3 = new System.Windows.Forms.Label();\n this.button1 = new System.Windows.Forms.Button();\n this.label2 = new System.Windows.Forms.Label();\n this.label1 = new System.Windows.Forms.Label();\n this.groupBox2 = new System.Windows.Forms.GroupBox();\n this.label5 = new System.Windows.Forms.Label();\n this.label6 = new System.Windows.Forms.Label();\n this.button2 = new System.Windows.Forms.Button();\n this.label7 = new System.Windows.Forms.Label();\n this.label8 = new System.Windows.Forms.Label();\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.groupBox1.SuspendLayout();\n this.groupBox2.SuspendLayout();\n this.SuspendLayout();\n // \n // groupBox1\n // \n this.groupBox1.Controls.Add(this.label4);\n this.groupBox1.Controls.Add(this.label3);\n this.groupBox1.Controls.Add(this.button1);\n this.groupBox1.Controls.Add(this.label2);\n this.groupBox1.Controls.Add(this.label1);\n this.groupBox1.Location = new System.Drawing.Point(12, 12);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(144, 89);\n this.groupBox1.TabIndex = 0;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"SubsCheck Win GUI\";\n // \n // label4\n // \n this.label4.AutoSize = true;\n this.label4.Location = new System.Drawing.Point(77, 37);\n this.label4.Name = \"label4\";\n this.label4.Size = new System.Drawing.Size(53, 12);\n this.label4.TabIndex = 4;\n this.label4.Text = \"v0.0.0.0\";\n // \n // label3\n // \n this.label3.AutoSize = true;\n this.label3.Location = new System.Drawing.Point(77, 17);\n this.label3.Name = \"label3\";\n this.label3.Size = new System.Drawing.Size(53, 12);\n this.label3.TabIndex = 3;\n this.label3.Text = \"v0.0.0.0\";\n // \n // button1\n // \n this.button1.Enabled = false;\n this.button1.Location = new System.Drawing.Point(8, 57);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(122, 23);\n this.button1.TabIndex = 2;\n this.button1.Text = \"正在获取版本\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // label2\n // \n this.label2.AutoSize = true;\n this.label2.Location = new System.Drawing.Point(10, 37);\n this.label2.Name = \"label2\";\n this.label2.Size = new System.Drawing.Size(65, 12);\n this.label2.TabIndex = 1;\n this.label2.Text = \"当前版本:\";\n // \n // label1\n // \n this.label1.AutoSize = true;\n this.label1.Location = new System.Drawing.Point(10, 17);\n this.label1.Name = \"label1\";\n this.label1.Size = new System.Drawing.Size(65, 12);\n this.label1.TabIndex = 0;\n this.label1.Text = \"最新版本:\";\n // \n // groupBox2\n // \n this.groupBox2.Controls.Add(this.label5);\n this.groupBox2.Controls.Add(this.label6);\n this.groupBox2.Controls.Add(this.button2);\n this.groupBox2.Controls.Add(this.label7);\n this.groupBox2.Controls.Add(this.label8);\n this.groupBox2.Location = new System.Drawing.Point(162, 12);\n this.groupBox2.Name = \"groupBox2\";\n this.groupBox2.Size = new System.Drawing.Size(144, 89);\n this.groupBox2.TabIndex = 5;\n this.groupBox2.TabStop = false;\n this.groupBox2.Text = \"Subs-Check 内核\";\n // \n // label5\n // \n this.label5.AutoSize = true;\n this.label5.Location = new System.Drawing.Point(77, 37);\n this.label5.Name = \"label5\";\n this.label5.Size = new System.Drawing.Size(53, 12);\n this.label5.TabIndex = 4;\n this.label5.Text = \"v0.0.0.0\";\n // \n // label6\n // \n this.label6.AutoSize = true;\n this.label6.Location = new System.Drawing.Point(77, 17);\n this.label6.Name = \"label6\";\n this.label6.Size = new System.Drawing.Size(53, 12);\n this.label6.TabIndex = 3;\n this.label6.Text = \"正在获取\";\n // \n // button2\n // \n this.button2.Enabled = false;\n this.button2.Location = new System.Drawing.Point(8, 57);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(122, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"正在获取版本\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n // \n // label7\n // \n this.label7.AutoSize = true;\n this.label7.Location = new System.Drawing.Point(10, 37);\n this.label7.Name = \"label7\";\n this.label7.Size = new System.Drawing.Size(65, 12);\n this.label7.TabIndex = 1;\n this.label7.Text = \"当前版本:\";\n // \n // label8\n // \n this.label8.AutoSize = true;\n this.label8.Location = new System.Drawing.Point(10, 17);\n this.label8.Name = \"label8\";\n this.label8.Size = new System.Drawing.Size(65, 12);\n this.label8.TabIndex = 0;\n this.label8.Text = \"最新版本:\";\n // \n // timer1\n // \n this.timer1.Tick += new System.EventHandler(this.timer1_Tick);\n // \n // comboBox1\n // \n this.comboBox1.FormattingEnabled = true;\n this.comboBox1.Location = new System.Drawing.Point(12, 107);\n this.comboBox1.Name = \"comboBox1\";\n this.comboBox1.Size = new System.Drawing.Size(294, 20);\n this.comboBox1.TabIndex = 23;\n this.comboBox1.Visible = false;\n // \n // CheckUpdates\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.AutoSize = true;\n this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\n this.ClientSize = new System.Drawing.Size(319, 138);\n this.Controls.Add(this.comboBox1);\n this.Controls.Add(this.groupBox2);\n this.Controls.Add(this.groupBox1);\n this.MaximizeBox = false;\n this.MinimizeBox = false;\n this.Name = \"CheckUpdates\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"检查更新\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.groupBox2.ResumeLayout(false);\n this.groupBox2.PerformLayout();\n this.ResumeLayout(false);\n\n }\n\n #endregion\n\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.Label label4;\n private System.Windows.Forms.Label label3;\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.Label label2;\n private System.Windows.Forms.Label label1;\n private System.Windows.Forms.GroupBox groupBox2;\n private System.Windows.Forms.Label label5;\n private System.Windows.Forms.Label label6;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.Label label7;\n private System.Windows.Forms.Label label8;\n private System.Windows.Forms.Timer timer1;\n private System.Windows.Forms.ComboBox comboBox1;\n }\n}"], ["/SubsCheck-Win-GUI/Properties/Resources.Designer.cs", "//------------------------------------------------------------------------------\n// \n// 此代码由工具生成。\n// 运行时版本:4.0.30319.42000\n//\n// 对此文件的更改可能会导致不正确的行为,并且如果\n// 重新生成代码,这些更改将会丢失。\n// \n//------------------------------------------------------------------------------\n\nnamespace subs_check.win.gui.Properties {\n using System;\n \n \n /// \n /// 一个强类型的资源类,用于查找本地化的字符串等。\n /// \n // 此类是由 StronglyTypedResourceBuilder\n // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。\n // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen\n // (以 /str 作为命令选项),或重新生成 VS 项目。\n [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Resources.Tools.StronglyTypedResourceBuilder\", \"17.0.0.0\")]\n [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\n internal class Resources {\n \n private static global::System.Resources.ResourceManager resourceMan;\n \n private static global::System.Globalization.CultureInfo resourceCulture;\n \n [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\n internal Resources() {\n }\n \n /// \n /// 返回此类使用的缓存的 ResourceManager 实例。\n /// \n [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n internal static global::System.Resources.ResourceManager ResourceManager {\n get {\n if (object.ReferenceEquals(resourceMan, null)) {\n global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(\"subs_check.win.gui.Properties.Resources\", typeof(Resources).Assembly);\n resourceMan = temp;\n }\n return resourceMan;\n }\n }\n \n /// \n /// 重写当前线程的 CurrentUICulture 属性,对\n /// 使用此强类型资源类的所有资源查找执行重写。\n /// \n [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n internal static global::System.Globalization.CultureInfo Culture {\n get {\n return resourceCulture;\n }\n set {\n resourceCulture = value;\n }\n }\n \n /// \n /// 查找 System.Byte[] 类型的本地化资源。\n /// \n internal static byte[] going {\n get {\n object obj = ResourceManager.GetObject(\"going\", resourceCulture);\n return ((byte[])(obj));\n }\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/Properties/Settings.Designer.cs", "//------------------------------------------------------------------------------\n// \n// 此代码由工具生成。\n// 运行时版本:4.0.30319.42000\n//\n// 对此文件的更改可能会导致不正确的行为,并且如果\n// 重新生成代码,这些更改将会丢失。\n// \n//------------------------------------------------------------------------------\n\nnamespace subs_check.win.gui.Properties {\n \n \n [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\n [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator\", \"17.13.0.0\")]\n internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {\n \n private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));\n \n public static Settings Default {\n get {\n return defaultInstance;\n }\n }\n }\n}\n"]], "task_instance_info": {"created_time": "2025-08-20 18:31:17", "created_task_model": "DeepSeek-R1", "class_skeleton": "public\npartial\nclass\nMoreYAML\n: Form\n{\nstring 初始化;\npublic MoreYAML () {}\nprivate void LoadMoreYamlConfig () {}\nprivate void button2_Click (object sender, EventArgs e) {}\nprivate void linkLabel1_LinkClicked (object sender, LinkLabelLinkClickedEventArgs e) {}\nprivate void button1_Click (object sender, EventArgs e) {}\nprivate bool IsValidYaml (string yamlContent) {}\nprivate void button3_Click (object sender, EventArgs e) {}\n}", "code_description": "This code segment functions to: Provide a user interface for editing and validating YAML configuration files with capabilities to load initial content, reset modifications, and persist changes after format verification."}, "inference_content": {"inference_model": "DeepSeek-R1", "inference_result": "```c_sharp\n[TASK_BEGIN]\npublic partial class MoreYAML : Form\n{\n string 初始化;\n \n public MoreYAML()\n {\n InitializeComponent();\n LoadMoreYamlConfig();\n }\n\n private void LoadMoreYamlConfig()\n {\n try\n {\n 初始化 = File.ReadAllText(\"config/more.yaml\");\n }\n catch\n {\n 初始化 = \"# Default YAML configuration\";\n }\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n this.DialogResult = DialogResult.Cancel;\n this.Close();\n }\n\n private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(new ProcessStartInfo(\"https://yaml.org/spec/1.2.2/\") { UseShellExecute = true });\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n if(IsValidYaml(初始化))\n {\n this.DialogResult = DialogResult.OK;\n this.Close();\n }\n else\n {\n MessageBox.Show(\"Invalid YAML format!\");\n }\n }\n\n private bool IsValidYaml(string yamlContent)\n {\n try\n {\n var yaml = new YamlDotNet.Serialization.Deserializer();\n yaml.Deserialize(yamlContent);\n return true;\n }\n catch\n {\n return false;\n }\n }\n\n private void button3_Click(object sender, EventArgs e)\n {\n try\n {\n var tempPath = Path.GetTempFileName();\n File.WriteAllText(tempPath, 初始化);\n Process.Start(\"notepad.exe\", tempPath);\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"Error opening editor: {ex.Message}\");\n }\n }\n}\n[TASK_END]\n```", "inference_time": "2025-08-20 18-31-52"}, "editdistance_info": {"edit_distance": 19.1045, "calculate_time": "2025-08-20 18:31:52", "true_code_clean": "public partial class MoreYAML : Form\n {\n string 初始化;\n public MoreYAML()\n {\n InitializeComponent();\n textBox1.UseWaitCursor = false;\n 初始化 = textBox1.Text;\n groupBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;\n textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;\n linkLabel1.Anchor = AnchorStyles.Top | AnchorStyles.Right;\n button1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;\n button3.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;\n button2.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;\n LoadMoreYamlConfig();\n }\n private void LoadMoreYamlConfig()\n {\n try\n {\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string configFolderPath = System.IO.Path.Combine(executablePath, \"config\");\n string moreYamlFilePath = System.IO.Path.Combine(configFolderPath, \"more.yaml\");\n if (System.IO.File.Exists(moreYamlFilePath))\n {\n string yamlContent = System.IO.File.ReadAllText(moreYamlFilePath, Encoding.UTF8);\n textBox1.Text = yamlContent;\n }\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"读取配置文件时发生错误:{ex.Message}\", \"提示\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n }\n private void button2_Click(object sender, EventArgs e)\n {\n this.Close();\n }\n private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https:\n }\n private void button1_Click(object sender, EventArgs e)\n {\n try\n {\n if (!IsValidYaml(textBox1.Text))\n {\n MessageBox.Show(\"输入的内容不符合YAML格式,请检查后重试!\", \"格式错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Warning);\n return;\n }\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string configFolderPath = System.IO.Path.Combine(executablePath, \"config\");\n string moreYamlFilePath = System.IO.Path.Combine(configFolderPath, \"more.yaml\");\n if (!System.IO.Directory.Exists(configFolderPath))\n {\n System.IO.Directory.CreateDirectory(configFolderPath);\n }\n System.IO.File.WriteAllText(moreYamlFilePath, textBox1.Text, Encoding.UTF8);\n this.DialogResult = DialogResult.OK;\n this.Close();\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"保存配置文件时发生错误:{ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n private bool IsValidYaml(string yamlContent)\n {\n if (string.IsNullOrWhiteSpace(yamlContent))\n return true; \n try\n {\n var deserializer = new YamlDotNet.Serialization.Deserializer();\n deserializer.Deserialize(yamlContent);\n return true;\n }\n catch (YamlDotNet.Core.YamlException)\n {\n return false;\n }\n catch (Exception)\n {\n return false;\n }\n }\n private void button3_Click(object sender, EventArgs e)\n {\n textBox1.Text = 初始化;\n }\n }", "predict_code_clean": "public partial class MoreYAML : Form\n{\n string 初始化;\n public MoreYAML()\n {\n InitializeComponent();\n LoadMoreYamlConfig();\n }\n private void LoadMoreYamlConfig()\n {\n try\n {\n 初始化 = File.ReadAllText(\"config/more.yaml\");\n }\n catch\n {\n 初始化 = \"# Default YAML configuration\";\n }\n }\n private void button2_Click(object sender, EventArgs e)\n {\n this.DialogResult = DialogResult.Cancel;\n this.Close();\n }\n private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(new ProcessStartInfo(\"https:\n }\n private void button1_Click(object sender, EventArgs e)\n {\n if(IsValidYaml(初始化))\n {\n this.DialogResult = DialogResult.OK;\n this.Close();\n }\n else\n {\n MessageBox.Show(\"Invalid YAML format!\");\n }\n }\n private bool IsValidYaml(string yamlContent)\n {\n try\n {\n var yaml = new YamlDotNet.Serialization.Deserializer();\n yaml.Deserialize(yamlContent);\n return true;\n }\n catch\n {\n return false;\n }\n }\n private void button3_Click(object sender, EventArgs e)\n {\n try\n {\n var tempPath = Path.GetTempFileName();\n File.WriteAllText(tempPath, 初始化);\n Process.Start(\"notepad.exe\", tempPath);\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"Error opening editor: {ex.Message}\");\n }\n }\n}"}} {"repo_name": "SubsCheck-Win-GUI", "file_name": "/SubsCheck-Win-GUI/EditURLs.Designer.cs", "inference_info": {"prefix_code": "namespace subs_check.win.gui\n{\n ", "suffix_code": "\n}", "middle_code": "partial class EditURLs\n {\n private System.ComponentModel.IContainer components = null;\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n #region Windows Form Designer generated code\n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n this.button1 = new System.Windows.Forms.Button();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.button2 = new System.Windows.Forms.Button();\n this.button3 = new System.Windows.Forms.Button();\n this.button4 = new System.Windows.Forms.Button();\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.SuspendLayout();\n this.button1.Font = new System.Drawing.Font(\"宋体\", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.button1.Location = new System.Drawing.Point(12, 415);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"保存\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n this.textBox1.Location = new System.Drawing.Point(12, 12);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both;\n this.textBox1.Size = new System.Drawing.Size(776, 397);\n this.textBox1.TabIndex = 1;\n this.button2.Enabled = false;\n this.button2.Location = new System.Drawing.Point(174, 415);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"等待获取\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n this.button3.Location = new System.Drawing.Point(93, 415);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 3;\n this.button3.Text = \"去重\";\n this.button3.UseVisualStyleBackColor = true;\n this.button3.Click += new System.EventHandler(this.button3_Click);\n this.button4.Location = new System.Drawing.Point(713, 415);\n this.button4.Name = \"button4\";\n this.button4.Size = new System.Drawing.Size(75, 23);\n this.button4.TabIndex = 4;\n this.button4.Text = \"返回\";\n this.button4.UseVisualStyleBackColor = true;\n this.button4.Click += new System.EventHandler(this.button4_Click);\n this.timer1.Tick += new System.EventHandler(this.timer1_Tick);\n this.comboBox1.FormattingEnabled = true;\n this.comboBox1.Location = new System.Drawing.Point(255, 418);\n this.comboBox1.Name = \"comboBox1\";\n this.comboBox1.Size = new System.Drawing.Size(120, 20);\n this.comboBox1.TabIndex = 22;\n this.comboBox1.Visible = false;\n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.ClientSize = new System.Drawing.Size(800, 450);\n this.Controls.Add(this.comboBox1);\n this.Controls.Add(this.button4);\n this.Controls.Add(this.button3);\n this.Controls.Add(this.button2);\n this.Controls.Add(this.textBox1);\n this.Controls.Add(this.button1);\n this.MinimizeBox = false;\n this.Name = \"EditURLs\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"编辑 节点池订阅链接\";\n this.ResumeLayout(false);\n this.PerformLayout();\n }\n #endregion\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.Button button3;\n private System.Windows.Forms.Button button4;\n private System.Windows.Forms.Timer timer1;\n private System.Windows.Forms.ComboBox comboBox1;\n }", "code_description": null, "fill_type": "CLASS_TYPE", "language_type": "c_sharp", "sub_task_type": null}, "context_code": [["/SubsCheck-Win-GUI/MoreYAML.Designer.cs", "namespace subs_check.win.gui\n{\n partial class MoreYAML\n {\n /// \n /// Required designer variable.\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// Clean up any resources being used.\n /// \n /// true if managed resources should be disposed; otherwise, false.\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows Form Designer generated code\n\n /// \n /// Required method for Designer support - do not modify\n /// the contents of this method with the code editor.\n /// \n private void InitializeComponent()\n {\n System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MoreYAML));\n this.button1 = new System.Windows.Forms.Button();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.button2 = new System.Windows.Forms.Button();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.linkLabel1 = new System.Windows.Forms.LinkLabel();\n this.button3 = new System.Windows.Forms.Button();\n this.groupBox1.SuspendLayout();\n this.SuspendLayout();\n // \n // button1\n // \n this.button1.Font = new System.Drawing.Font(\"宋体\", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.button1.Location = new System.Drawing.Point(12, 415);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"保存\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // groupBox1\n // \n this.groupBox1.Controls.Add(this.linkLabel1);\n this.groupBox1.Controls.Add(this.textBox1);\n this.groupBox1.Location = new System.Drawing.Point(12, 12);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(776, 397);\n this.groupBox1.TabIndex = 1;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"YAML\";\n // \n // button2\n // \n this.button2.Location = new System.Drawing.Point(713, 415);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"返回\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n // \n // textBox1\n // \n this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox1.Font = new System.Drawing.Font(\"微软雅黑\", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.textBox1.Location = new System.Drawing.Point(6, 13);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;\n this.textBox1.Size = new System.Drawing.Size(764, 378);\n this.textBox1.TabIndex = 0;\n this.textBox1.Text = resources.GetString(\"textBox1.Text\");\n this.textBox1.UseWaitCursor = true;\n // \n // linkLabel1\n // \n this.linkLabel1.AutoSize = true;\n this.linkLabel1.Location = new System.Drawing.Point(585, 0);\n this.linkLabel1.Name = \"linkLabel1\";\n this.linkLabel1.Size = new System.Drawing.Size(191, 12);\n this.linkLabel1.TabIndex = 1;\n this.linkLabel1.TabStop = true;\n this.linkLabel1.Text = \"更多请参考 config.yaml 参数文档\";\n this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);\n // \n // button3\n // \n this.button3.Location = new System.Drawing.Point(93, 415);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 3;\n this.button3.Text = \"重置\";\n this.button3.UseVisualStyleBackColor = true;\n this.button3.Click += new System.EventHandler(this.button3_Click);\n // \n // MoreYAML\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.ClientSize = new System.Drawing.Size(800, 450);\n this.Controls.Add(this.button3);\n this.Controls.Add(this.button2);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.button1);\n this.MaximizeBox = false;\n this.MinimizeBox = false;\n this.Name = \"MoreYAML\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"编辑 补充参数\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.ResumeLayout(false);\n\n }\n\n #endregion\n\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.LinkLabel linkLabel1;\n private System.Windows.Forms.Button button3;\n }\n}"], ["/SubsCheck-Win-GUI/CheckUpdates.Designer.cs", "namespace subs_check.win.gui\n{\n partial class CheckUpdates\n {\n /// \n /// Required designer variable.\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// Clean up any resources being used.\n /// \n /// true if managed resources should be disposed; otherwise, false.\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows Form Designer generated code\n\n /// \n /// Required method for Designer support - do not modify\n /// the contents of this method with the code editor.\n /// \n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.label4 = new System.Windows.Forms.Label();\n this.label3 = new System.Windows.Forms.Label();\n this.button1 = new System.Windows.Forms.Button();\n this.label2 = new System.Windows.Forms.Label();\n this.label1 = new System.Windows.Forms.Label();\n this.groupBox2 = new System.Windows.Forms.GroupBox();\n this.label5 = new System.Windows.Forms.Label();\n this.label6 = new System.Windows.Forms.Label();\n this.button2 = new System.Windows.Forms.Button();\n this.label7 = new System.Windows.Forms.Label();\n this.label8 = new System.Windows.Forms.Label();\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.groupBox1.SuspendLayout();\n this.groupBox2.SuspendLayout();\n this.SuspendLayout();\n // \n // groupBox1\n // \n this.groupBox1.Controls.Add(this.label4);\n this.groupBox1.Controls.Add(this.label3);\n this.groupBox1.Controls.Add(this.button1);\n this.groupBox1.Controls.Add(this.label2);\n this.groupBox1.Controls.Add(this.label1);\n this.groupBox1.Location = new System.Drawing.Point(12, 12);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(144, 89);\n this.groupBox1.TabIndex = 0;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"SubsCheck Win GUI\";\n // \n // label4\n // \n this.label4.AutoSize = true;\n this.label4.Location = new System.Drawing.Point(77, 37);\n this.label4.Name = \"label4\";\n this.label4.Size = new System.Drawing.Size(53, 12);\n this.label4.TabIndex = 4;\n this.label4.Text = \"v0.0.0.0\";\n // \n // label3\n // \n this.label3.AutoSize = true;\n this.label3.Location = new System.Drawing.Point(77, 17);\n this.label3.Name = \"label3\";\n this.label3.Size = new System.Drawing.Size(53, 12);\n this.label3.TabIndex = 3;\n this.label3.Text = \"v0.0.0.0\";\n // \n // button1\n // \n this.button1.Enabled = false;\n this.button1.Location = new System.Drawing.Point(8, 57);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(122, 23);\n this.button1.TabIndex = 2;\n this.button1.Text = \"正在获取版本\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // label2\n // \n this.label2.AutoSize = true;\n this.label2.Location = new System.Drawing.Point(10, 37);\n this.label2.Name = \"label2\";\n this.label2.Size = new System.Drawing.Size(65, 12);\n this.label2.TabIndex = 1;\n this.label2.Text = \"当前版本:\";\n // \n // label1\n // \n this.label1.AutoSize = true;\n this.label1.Location = new System.Drawing.Point(10, 17);\n this.label1.Name = \"label1\";\n this.label1.Size = new System.Drawing.Size(65, 12);\n this.label1.TabIndex = 0;\n this.label1.Text = \"最新版本:\";\n // \n // groupBox2\n // \n this.groupBox2.Controls.Add(this.label5);\n this.groupBox2.Controls.Add(this.label6);\n this.groupBox2.Controls.Add(this.button2);\n this.groupBox2.Controls.Add(this.label7);\n this.groupBox2.Controls.Add(this.label8);\n this.groupBox2.Location = new System.Drawing.Point(162, 12);\n this.groupBox2.Name = \"groupBox2\";\n this.groupBox2.Size = new System.Drawing.Size(144, 89);\n this.groupBox2.TabIndex = 5;\n this.groupBox2.TabStop = false;\n this.groupBox2.Text = \"Subs-Check 内核\";\n // \n // label5\n // \n this.label5.AutoSize = true;\n this.label5.Location = new System.Drawing.Point(77, 37);\n this.label5.Name = \"label5\";\n this.label5.Size = new System.Drawing.Size(53, 12);\n this.label5.TabIndex = 4;\n this.label5.Text = \"v0.0.0.0\";\n // \n // label6\n // \n this.label6.AutoSize = true;\n this.label6.Location = new System.Drawing.Point(77, 17);\n this.label6.Name = \"label6\";\n this.label6.Size = new System.Drawing.Size(53, 12);\n this.label6.TabIndex = 3;\n this.label6.Text = \"正在获取\";\n // \n // button2\n // \n this.button2.Enabled = false;\n this.button2.Location = new System.Drawing.Point(8, 57);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(122, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"正在获取版本\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n // \n // label7\n // \n this.label7.AutoSize = true;\n this.label7.Location = new System.Drawing.Point(10, 37);\n this.label7.Name = \"label7\";\n this.label7.Size = new System.Drawing.Size(65, 12);\n this.label7.TabIndex = 1;\n this.label7.Text = \"当前版本:\";\n // \n // label8\n // \n this.label8.AutoSize = true;\n this.label8.Location = new System.Drawing.Point(10, 17);\n this.label8.Name = \"label8\";\n this.label8.Size = new System.Drawing.Size(65, 12);\n this.label8.TabIndex = 0;\n this.label8.Text = \"最新版本:\";\n // \n // timer1\n // \n this.timer1.Tick += new System.EventHandler(this.timer1_Tick);\n // \n // comboBox1\n // \n this.comboBox1.FormattingEnabled = true;\n this.comboBox1.Location = new System.Drawing.Point(12, 107);\n this.comboBox1.Name = \"comboBox1\";\n this.comboBox1.Size = new System.Drawing.Size(294, 20);\n this.comboBox1.TabIndex = 23;\n this.comboBox1.Visible = false;\n // \n // CheckUpdates\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.AutoSize = true;\n this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\n this.ClientSize = new System.Drawing.Size(319, 138);\n this.Controls.Add(this.comboBox1);\n this.Controls.Add(this.groupBox2);\n this.Controls.Add(this.groupBox1);\n this.MaximizeBox = false;\n this.MinimizeBox = false;\n this.Name = \"CheckUpdates\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"检查更新\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.groupBox2.ResumeLayout(false);\n this.groupBox2.PerformLayout();\n this.ResumeLayout(false);\n\n }\n\n #endregion\n\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.Label label4;\n private System.Windows.Forms.Label label3;\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.Label label2;\n private System.Windows.Forms.Label label1;\n private System.Windows.Forms.GroupBox groupBox2;\n private System.Windows.Forms.Label label5;\n private System.Windows.Forms.Label label6;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.Label label7;\n private System.Windows.Forms.Label label8;\n private System.Windows.Forms.Timer timer1;\n private System.Windows.Forms.ComboBox comboBox1;\n }\n}"], ["/SubsCheck-Win-GUI/Form1.Designer.cs", "namespace subs_check.win.gui\n{\n partial class Form1\n {\n /// \n /// 必需的设计器变量。\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// 清理所有正在使用的资源。\n /// \n /// 如果应释放托管资源,为 true;否则为 false。\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows 窗体设计器生成的代码\n\n /// \n /// 设计器支持所需的方法 - 不要修改\n /// 使用代码编辑器修改此方法的内容。\n /// \n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));\n this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.checkBox5 = new System.Windows.Forms.CheckBox();\n this.textBox11 = new System.Windows.Forms.TextBox();\n this.button7 = new System.Windows.Forms.Button();\n this.button6 = new System.Windows.Forms.Button();\n this.comboBox4 = new System.Windows.Forms.ComboBox();\n this.button3 = new System.Windows.Forms.Button();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.numericUpDown4 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown3 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();\n this.label7 = new System.Windows.Forms.Label();\n this.label6 = new System.Windows.Forms.Label();\n this.label3 = new System.Windows.Forms.Label();\n this.label2 = new System.Windows.Forms.Label();\n this.label1 = new System.Windows.Forms.Label();\n this.button2 = new System.Windows.Forms.Button();\n this.button1 = new System.Windows.Forms.Button();\n this.label8 = new System.Windows.Forms.Label();\n this.numericUpDown6 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown5 = new System.Windows.Forms.NumericUpDown();\n this.label4 = new System.Windows.Forms.Label();\n this.label5 = new System.Windows.Forms.Label();\n this.numericUpDown7 = new System.Windows.Forms.NumericUpDown();\n this.label20 = new System.Windows.Forms.Label();\n this.groupBox2 = new System.Windows.Forms.GroupBox();\n this.linkLabel1 = new System.Windows.Forms.LinkLabel();\n this.button5 = new System.Windows.Forms.Button();\n this.richTextBox1 = new System.Windows.Forms.RichTextBox();\n this.groupBox3 = new System.Windows.Forms.GroupBox();\n this.button8 = new System.Windows.Forms.Button();\n this.textBox10 = new System.Windows.Forms.TextBox();\n this.checkBox4 = new System.Windows.Forms.CheckBox();\n this.numericUpDown8 = new System.Windows.Forms.NumericUpDown();\n this.checkBox3 = new System.Windows.Forms.CheckBox();\n this.button4 = new System.Windows.Forms.Button();\n this.checkBox1 = new System.Windows.Forms.CheckBox();\n this.checkBox2 = new System.Windows.Forms.CheckBox();\n this.comboBox5 = new System.Windows.Forms.ComboBox();\n this.label19 = new System.Windows.Forms.Label();\n this.comboBox3 = new System.Windows.Forms.ComboBox();\n this.label10 = new System.Windows.Forms.Label();\n this.comboBox2 = new System.Windows.Forms.ComboBox();\n this.label9 = new System.Windows.Forms.Label();\n this.progressBar1 = new System.Windows.Forms.ProgressBar();\n this.timer2 = new System.Windows.Forms.Timer(this.components);\n this.groupBox4 = new System.Windows.Forms.GroupBox();\n this.textBox4 = new System.Windows.Forms.TextBox();\n this.label13 = new System.Windows.Forms.Label();\n this.textBox3 = new System.Windows.Forms.TextBox();\n this.label12 = new System.Windows.Forms.Label();\n this.textBox2 = new System.Windows.Forms.TextBox();\n this.label11 = new System.Windows.Forms.Label();\n this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);\n this.groupBox5 = new System.Windows.Forms.GroupBox();\n this.textBox6 = new System.Windows.Forms.TextBox();\n this.label15 = new System.Windows.Forms.Label();\n this.textBox7 = new System.Windows.Forms.TextBox();\n this.label16 = new System.Windows.Forms.Label();\n this.groupBox6 = new System.Windows.Forms.GroupBox();\n this.textBox5 = new System.Windows.Forms.TextBox();\n this.label14 = new System.Windows.Forms.Label();\n this.textBox8 = new System.Windows.Forms.TextBox();\n this.label17 = new System.Windows.Forms.Label();\n this.textBox9 = new System.Windows.Forms.TextBox();\n this.label18 = new System.Windows.Forms.Label();\n this.timer3 = new System.Windows.Forms.Timer(this.components);\n this.timer4 = new System.Windows.Forms.Timer(this.components);\n this.groupBox1.SuspendLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown7)).BeginInit();\n this.groupBox2.SuspendLayout();\n this.groupBox3.SuspendLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown8)).BeginInit();\n this.groupBox4.SuspendLayout();\n this.groupBox5.SuspendLayout();\n this.groupBox6.SuspendLayout();\n this.SuspendLayout();\n // \n // notifyIcon1\n // \n this.notifyIcon1.BalloonTipTitle = \"Subs-Check\";\n this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject(\"notifyIcon1.Icon\")));\n this.notifyIcon1.Text = \"Subs-Check:未运行\";\n this.notifyIcon1.Visible = true;\n this.notifyIcon1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon1_MouseClick);\n // \n // timer1\n // \n this.timer1.Enabled = true;\n this.timer1.Interval = 1;\n this.timer1.Tick += new System.EventHandler(this.timer1_Tick);\n // \n // groupBox1\n // \n this.groupBox1.Controls.Add(this.checkBox5);\n this.groupBox1.Controls.Add(this.textBox11);\n this.groupBox1.Controls.Add(this.button7);\n this.groupBox1.Controls.Add(this.button6);\n this.groupBox1.Controls.Add(this.comboBox4);\n this.groupBox1.Controls.Add(this.button3);\n this.groupBox1.Controls.Add(this.textBox1);\n this.groupBox1.Controls.Add(this.comboBox1);\n this.groupBox1.Controls.Add(this.numericUpDown4);\n this.groupBox1.Controls.Add(this.numericUpDown3);\n this.groupBox1.Controls.Add(this.numericUpDown2);\n this.groupBox1.Controls.Add(this.numericUpDown1);\n this.groupBox1.Controls.Add(this.label7);\n this.groupBox1.Controls.Add(this.label6);\n this.groupBox1.Controls.Add(this.label3);\n this.groupBox1.Controls.Add(this.label2);\n this.groupBox1.Controls.Add(this.label1);\n this.groupBox1.Controls.Add(this.button2);\n this.groupBox1.Controls.Add(this.button1);\n this.groupBox1.Controls.Add(this.label8);\n this.groupBox1.Location = new System.Drawing.Point(13, 13);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(174, 484);\n this.groupBox1.TabIndex = 0;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"参数设置\";\n // \n // checkBox5\n // \n this.checkBox5.AutoSize = true;\n this.checkBox5.Location = new System.Drawing.Point(91, 428);\n this.checkBox5.Name = \"checkBox5\";\n this.checkBox5.Size = new System.Drawing.Size(72, 16);\n this.checkBox5.TabIndex = 30;\n this.checkBox5.Text = \"开机自启\";\n this.checkBox5.UseVisualStyleBackColor = true;\n this.checkBox5.CheckedChanged += new System.EventHandler(this.checkBox5_CheckedChanged);\n // \n // textBox11\n // \n this.textBox11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox11.Location = new System.Drawing.Point(9, 343);\n this.textBox11.Name = \"textBox11\";\n this.textBox11.Size = new System.Drawing.Size(154, 21);\n this.textBox11.TabIndex = 21;\n this.textBox11.Text = \"0 */2 * * *\";\n this.textBox11.Visible = false;\n this.textBox11.DoubleClick += new System.EventHandler(this.切换cron表达式);\n this.textBox11.Leave += new System.EventHandler(this.textBox11_Leave);\n // \n // button7\n // \n this.button7.Enabled = false;\n this.button7.Location = new System.Drawing.Point(7, 399);\n this.button7.Name = \"button7\";\n this.button7.Size = new System.Drawing.Size(75, 23);\n this.button7.TabIndex = 30;\n this.button7.Text = \"🔀未启动\";\n this.button7.UseVisualStyleBackColor = true;\n this.button7.Click += new System.EventHandler(this.button7_Click);\n // \n // button6\n // \n this.button6.Enabled = false;\n this.button6.Location = new System.Drawing.Point(88, 399);\n this.button6.Name = \"button6\";\n this.button6.Size = new System.Drawing.Size(75, 23);\n this.button6.TabIndex = 29;\n this.button6.Text = \"访问WebUI\";\n this.button6.UseVisualStyleBackColor = true;\n this.button6.Click += new System.EventHandler(this.button6_Click);\n // \n // comboBox4\n // \n this.comboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\n this.comboBox4.FormattingEnabled = true;\n this.comboBox4.Items.AddRange(new object[] {\n \"通用订阅\",\n \"Clash\"});\n this.comboBox4.Location = new System.Drawing.Point(8, 372);\n this.comboBox4.Name = \"comboBox4\";\n this.comboBox4.Size = new System.Drawing.Size(74, 20);\n this.comboBox4.TabIndex = 19;\n // \n // button3\n // \n this.button3.Enabled = false;\n this.button3.Location = new System.Drawing.Point(88, 370);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 18;\n this.button3.Text = \"复制订阅\";\n this.button3.UseVisualStyleBackColor = true;\n this.button3.Click += new System.EventHandler(this.button3_Click);\n // \n // textBox1\n // \n this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox1.Location = new System.Drawing.Point(9, 179);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ReadOnly = true;\n this.textBox1.Size = new System.Drawing.Size(154, 185);\n this.textBox1.TabIndex = 17;\n this.textBox1.Text = resources.GetString(\"textBox1.Text\");\n this.textBox1.WordWrap = false;\n this.textBox1.Click += new System.EventHandler(this.textBox1_DoubleClick);\n this.textBox1.DoubleClick += new System.EventHandler(this.textBox1_DoubleClick);\n // \n // comboBox1\n // \n this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\n this.comboBox1.FormattingEnabled = true;\n this.comboBox1.Items.AddRange(new object[] {\n \"本地\",\n \"gist\",\n \"r2\",\n \"webdav\"});\n this.comboBox1.Location = new System.Drawing.Point(105, 135);\n this.comboBox1.Name = \"comboBox1\";\n this.comboBox1.Size = new System.Drawing.Size(58, 20);\n this.comboBox1.TabIndex = 16;\n this.comboBox1.TextChanged += new System.EventHandler(this.comboBox1_TextChanged);\n // \n // numericUpDown4\n // \n this.numericUpDown4.Location = new System.Drawing.Point(105, 106);\n this.numericUpDown4.Maximum = new decimal(new int[] {\n 20480,\n 0,\n 0,\n 0});\n this.numericUpDown4.Minimum = new decimal(new int[] {\n 128,\n 0,\n 0,\n 0});\n this.numericUpDown4.Name = \"numericUpDown4\";\n this.numericUpDown4.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown4.TabIndex = 13;\n this.numericUpDown4.Value = new decimal(new int[] {\n 1024,\n 0,\n 0,\n 0});\n this.numericUpDown4.ValueChanged += new System.EventHandler(this.numericUpDown4_ValueChanged);\n // \n // numericUpDown3\n // \n this.numericUpDown3.Location = new System.Drawing.Point(105, 77);\n this.numericUpDown3.Maximum = new decimal(new int[] {\n 10000,\n 0,\n 0,\n 0});\n this.numericUpDown3.Minimum = new decimal(new int[] {\n 1000,\n 0,\n 0,\n 0});\n this.numericUpDown3.Name = \"numericUpDown3\";\n this.numericUpDown3.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown3.TabIndex = 12;\n this.numericUpDown3.Value = new decimal(new int[] {\n 5000,\n 0,\n 0,\n 0});\n this.numericUpDown3.ValueChanged += new System.EventHandler(this.numericUpDown3_ValueChanged);\n // \n // numericUpDown2\n // \n this.numericUpDown2.Location = new System.Drawing.Point(105, 48);\n this.numericUpDown2.Maximum = new decimal(new int[] {\n 1440,\n 0,\n 0,\n 0});\n this.numericUpDown2.Minimum = new decimal(new int[] {\n 30,\n 0,\n 0,\n 0});\n this.numericUpDown2.Name = \"numericUpDown2\";\n this.numericUpDown2.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown2.TabIndex = 11;\n this.numericUpDown2.Value = new decimal(new int[] {\n 120,\n 0,\n 0,\n 0});\n this.numericUpDown2.DoubleClick += new System.EventHandler(this.切换cron表达式);\n // \n // numericUpDown1\n // \n this.numericUpDown1.Location = new System.Drawing.Point(105, 19);\n this.numericUpDown1.Maximum = new decimal(new int[] {\n 1024,\n 0,\n 0,\n 0});\n this.numericUpDown1.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown1.Name = \"numericUpDown1\";\n this.numericUpDown1.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown1.TabIndex = 10;\n this.numericUpDown1.Value = new decimal(new int[] {\n 32,\n 0,\n 0,\n 0});\n this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);\n // \n // label7\n // \n this.label7.AutoSize = true;\n this.label7.Location = new System.Drawing.Point(7, 137);\n this.label7.Name = \"label7\";\n this.label7.Size = new System.Drawing.Size(65, 12);\n this.label7.TabIndex = 8;\n this.label7.Text = \"保存方法:\";\n // \n // label6\n // \n this.label6.AutoSize = true;\n this.label6.Location = new System.Drawing.Point(7, 108);\n this.label6.Name = \"label6\";\n this.label6.Size = new System.Drawing.Size(101, 12);\n this.label6.TabIndex = 5;\n this.label6.Text = \"测速下限(KB/s):\";\n // \n // label3\n // \n this.label3.AutoSize = true;\n this.label3.Location = new System.Drawing.Point(7, 79);\n this.label3.Name = \"label3\";\n this.label3.Size = new System.Drawing.Size(101, 12);\n this.label3.TabIndex = 4;\n this.label3.Text = \"超时时间(毫秒):\";\n // \n // label2\n // \n this.label2.AutoSize = true;\n this.label2.Location = new System.Drawing.Point(7, 50);\n this.label2.Name = \"label2\";\n this.label2.Size = new System.Drawing.Size(101, 12);\n this.label2.TabIndex = 3;\n this.label2.Text = \"检查间隔(分钟):\";\n this.label2.DoubleClick += new System.EventHandler(this.切换cron表达式);\n // \n // label1\n // \n this.label1.AutoSize = true;\n this.label1.Location = new System.Drawing.Point(7, 21);\n this.label1.Name = \"label1\";\n this.label1.Size = new System.Drawing.Size(77, 12);\n this.label1.TabIndex = 2;\n this.label1.Text = \"并发线程数:\";\n // \n // button2\n // \n this.button2.Location = new System.Drawing.Point(88, 450);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 1;\n this.button2.Text = \"高级设置∧\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n // \n // button1\n // \n this.button1.Font = new System.Drawing.Font(\"宋体\", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.button1.Location = new System.Drawing.Point(7, 428);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 45);\n this.button1.TabIndex = 0;\n this.button1.Text = \"▶️ 启动\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // label8\n // \n this.label8.AutoSize = true;\n this.label8.Location = new System.Drawing.Point(7, 164);\n this.label8.Name = \"label8\";\n this.label8.Size = new System.Drawing.Size(161, 12);\n this.label8.TabIndex = 9;\n this.label8.Text = \"节点池订阅链接(点击编辑):\";\n this.label8.Click += new System.EventHandler(this.textBox1_DoubleClick);\n // \n // numericUpDown6\n // \n this.numericUpDown6.Location = new System.Drawing.Point(281, 19);\n this.numericUpDown6.Maximum = new decimal(new int[] {\n 65535,\n 0,\n 0,\n 0});\n this.numericUpDown6.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown6.Name = \"numericUpDown6\";\n this.numericUpDown6.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown6.TabIndex = 15;\n this.numericUpDown6.Value = new decimal(new int[] {\n 8199,\n 0,\n 0,\n 0});\n this.numericUpDown6.ValueChanged += new System.EventHandler(this.numericUpDown6_ValueChanged);\n // \n // numericUpDown5\n // \n this.numericUpDown5.Location = new System.Drawing.Point(281, 45);\n this.numericUpDown5.Maximum = new decimal(new int[] {\n 10,\n 0,\n 0,\n 0});\n this.numericUpDown5.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown5.Name = \"numericUpDown5\";\n this.numericUpDown5.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown5.TabIndex = 14;\n this.numericUpDown5.Value = new decimal(new int[] {\n 10,\n 0,\n 0,\n 0});\n // \n // label4\n // \n this.label4.AutoSize = true;\n this.label4.Location = new System.Drawing.Point(191, 21);\n this.label4.Name = \"label4\";\n this.label4.Size = new System.Drawing.Size(89, 12);\n this.label4.TabIndex = 7;\n this.label4.Text = \"HTTP服务端口:\";\n // \n // label5\n // \n this.label5.AutoSize = true;\n this.label5.Location = new System.Drawing.Point(191, 48);\n this.label5.Name = \"label5\";\n this.label5.Size = new System.Drawing.Size(89, 12);\n this.label5.TabIndex = 6;\n this.label5.Text = \"测速时间(秒):\";\n // \n // numericUpDown7\n // \n this.numericUpDown7.Location = new System.Drawing.Point(441, 19);\n this.numericUpDown7.Maximum = new decimal(new int[] {\n 65535,\n 0,\n 0,\n 0});\n this.numericUpDown7.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown7.Name = \"numericUpDown7\";\n this.numericUpDown7.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown7.TabIndex = 21;\n this.numericUpDown7.Value = new decimal(new int[] {\n 8299,\n 0,\n 0,\n 0});\n this.numericUpDown7.ValueChanged += new System.EventHandler(this.numericUpDown6_ValueChanged);\n // \n // label20\n // \n this.label20.AutoSize = true;\n this.label20.Location = new System.Drawing.Point(345, 21);\n this.label20.Name = \"label20\";\n this.label20.Size = new System.Drawing.Size(95, 12);\n this.label20.TabIndex = 20;\n this.label20.Text = \"Sub-Store端口:\";\n // \n // groupBox2\n // \n this.groupBox2.Controls.Add(this.linkLabel1);\n this.groupBox2.Controls.Add(this.button5);\n this.groupBox2.Controls.Add(this.richTextBox1);\n this.groupBox2.Location = new System.Drawing.Point(193, 13);\n this.groupBox2.Name = \"groupBox2\";\n this.groupBox2.Size = new System.Drawing.Size(600, 484);\n this.groupBox2.TabIndex = 1;\n this.groupBox2.TabStop = false;\n this.groupBox2.Text = \"实时日志\";\n // \n // linkLabel1\n // \n this.linkLabel1.AutoSize = true;\n this.linkLabel1.Location = new System.Drawing.Point(460, 2);\n this.linkLabel1.Name = \"linkLabel1\";\n this.linkLabel1.Size = new System.Drawing.Size(137, 12);\n this.linkLabel1.TabIndex = 21;\n this.linkLabel1.TabStop = true;\n this.linkLabel1.Text = \"关于 SubsCheck Win GUI\";\n this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);\n // \n // button5\n // \n this.button5.Location = new System.Drawing.Point(515, 450);\n this.button5.Name = \"button5\";\n this.button5.Size = new System.Drawing.Size(75, 23);\n this.button5.TabIndex = 20;\n this.button5.Text = \"更新内核\";\n this.button5.UseVisualStyleBackColor = true;\n this.button5.Visible = false;\n this.button5.Click += new System.EventHandler(this.button5_Click);\n // \n // richTextBox1\n // \n this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;\n this.richTextBox1.Location = new System.Drawing.Point(3, 17);\n this.richTextBox1.Name = \"richTextBox1\";\n this.richTextBox1.ReadOnly = true;\n this.richTextBox1.Size = new System.Drawing.Size(594, 464);\n this.richTextBox1.TabIndex = 0;\n this.richTextBox1.Text = \"\";\n this.richTextBox1.DoubleClick += new System.EventHandler(this.richTextBox1_DoubleClick);\n // \n // groupBox3\n // \n this.groupBox3.Controls.Add(this.button8);\n this.groupBox3.Controls.Add(this.textBox10);\n this.groupBox3.Controls.Add(this.checkBox4);\n this.groupBox3.Controls.Add(this.numericUpDown8);\n this.groupBox3.Controls.Add(this.checkBox3);\n this.groupBox3.Controls.Add(this.button4);\n this.groupBox3.Controls.Add(this.checkBox1);\n this.groupBox3.Controls.Add(this.numericUpDown6);\n this.groupBox3.Controls.Add(this.checkBox2);\n this.groupBox3.Controls.Add(this.numericUpDown5);\n this.groupBox3.Controls.Add(this.comboBox5);\n this.groupBox3.Controls.Add(this.label19);\n this.groupBox3.Controls.Add(this.comboBox3);\n this.groupBox3.Controls.Add(this.label10);\n this.groupBox3.Controls.Add(this.label4);\n this.groupBox3.Controls.Add(this.comboBox2);\n this.groupBox3.Controls.Add(this.label9);\n this.groupBox3.Controls.Add(this.label5);\n this.groupBox3.Controls.Add(this.numericUpDown7);\n this.groupBox3.Controls.Add(this.label20);\n this.groupBox3.Location = new System.Drawing.Point(13, 503);\n this.groupBox3.Name = \"groupBox3\";\n this.groupBox3.Size = new System.Drawing.Size(780, 103);\n this.groupBox3.TabIndex = 2;\n this.groupBox3.TabStop = false;\n this.groupBox3.Text = \"高级设置\";\n this.groupBox3.Visible = false;\n // \n // button8\n // \n this.button8.Location = new System.Drawing.Point(695, 43);\n this.button8.Name = \"button8\";\n this.button8.Size = new System.Drawing.Size(75, 23);\n this.button8.TabIndex = 29;\n this.button8.Text = \"补充参数\";\n this.button8.UseVisualStyleBackColor = true;\n this.button8.Click += new System.EventHandler(this.button8_Click);\n // \n // textBox10\n // \n this.textBox10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox10.Enabled = false;\n this.textBox10.Location = new System.Drawing.Point(141, 73);\n this.textBox10.Name = \"textBox10\";\n this.textBox10.PasswordChar = '*';\n this.textBox10.Size = new System.Drawing.Size(110, 21);\n this.textBox10.TabIndex = 6;\n this.textBox10.Text = \"admin\";\n this.textBox10.Enter += new System.EventHandler(this.textBox10_Enter);\n this.textBox10.Leave += new System.EventHandler(this.textBox10_Leave);\n // \n // checkBox4\n // \n this.checkBox4.AutoSize = true;\n this.checkBox4.Location = new System.Drawing.Point(9, 75);\n this.checkBox4.Name = \"checkBox4\";\n this.checkBox4.Size = new System.Drawing.Size(138, 16);\n this.checkBox4.TabIndex = 28;\n this.checkBox4.Text = \"启用WebUI API密钥:\";\n this.checkBox4.UseVisualStyleBackColor = true;\n this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox4_CheckedChanged);\n // \n // numericUpDown8\n // \n this.numericUpDown8.Enabled = false;\n this.numericUpDown8.Location = new System.Drawing.Point(122, 45);\n this.numericUpDown8.Maximum = new decimal(new int[] {\n 65535,\n 0,\n 0,\n 0});\n this.numericUpDown8.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown8.Name = \"numericUpDown8\";\n this.numericUpDown8.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown8.TabIndex = 22;\n this.numericUpDown8.Value = new decimal(new int[] {\n 100,\n 0,\n 0,\n 0});\n // \n // checkBox3\n // \n this.checkBox3.AutoSize = true;\n this.checkBox3.Location = new System.Drawing.Point(9, 48);\n this.checkBox3.Name = \"checkBox3\";\n this.checkBox3.Size = new System.Drawing.Size(108, 16);\n this.checkBox3.TabIndex = 27;\n this.checkBox3.Text = \"节点保存数目:\";\n this.checkBox3.UseVisualStyleBackColor = true;\n this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged);\n // \n // button4\n // \n this.button4.Location = new System.Drawing.Point(695, 71);\n this.button4.Name = \"button4\";\n this.button4.Size = new System.Drawing.Size(75, 23);\n this.button4.TabIndex = 26;\n this.button4.Text = \"检查更新\";\n this.button4.UseVisualStyleBackColor = true;\n this.button4.Click += new System.EventHandler(this.button4_Click);\n // \n // checkBox1\n // \n this.checkBox1.AutoSize = true;\n this.checkBox1.Checked = true;\n this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;\n this.checkBox1.Location = new System.Drawing.Point(9, 20);\n this.checkBox1.Name = \"checkBox1\";\n this.checkBox1.Size = new System.Drawing.Size(96, 16);\n this.checkBox1.TabIndex = 22;\n this.checkBox1.Text = \"节点地址查询\";\n this.checkBox1.UseVisualStyleBackColor = true;\n this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);\n // \n // checkBox2\n // \n this.checkBox2.AutoSize = true;\n this.checkBox2.Location = new System.Drawing.Point(106, 20);\n this.checkBox2.Name = \"checkBox2\";\n this.checkBox2.Size = new System.Drawing.Size(84, 16);\n this.checkBox2.TabIndex = 25;\n this.checkBox2.Text = \"流媒体检测\";\n this.checkBox2.UseVisualStyleBackColor = true;\n this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);\n // \n // comboBox5\n // \n this.comboBox5.FormattingEnabled = true;\n this.comboBox5.Items.AddRange(new object[] {\n \"[内置]布丁狗的订阅转换\",\n \"[内置]ACL4SSR_Online_Full\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/布丁狗的订阅转\" +\n \"换.yaml\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/ACL4SSR\" +\n \"_Online_Full.yaml\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/ACL4SSR\" +\n \"_Online_Full_WithIcon.yaml\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/添加直连规则.\" +\n \"yaml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/布丁狗的订阅转换.y\" +\n \"aml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/ACL4SSR_On\" +\n \"line_Full.yaml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/ACL4SSR_On\" +\n \"line_Full_WithIcon.yaml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/添加直连规则.yam\" +\n \"l\"});\n this.comboBox5.Location = new System.Drawing.Point(414, 73);\n this.comboBox5.Name = \"comboBox5\";\n this.comboBox5.Size = new System.Drawing.Size(275, 20);\n this.comboBox5.TabIndex = 24;\n this.comboBox5.SelectedIndexChanged += new System.EventHandler(this.comboBox5_SelectedIndexChanged);\n // \n // label19\n // \n this.label19.AutoSize = true;\n this.label19.Location = new System.Drawing.Point(260, 76);\n this.label19.Name = \"label19\";\n this.label19.Size = new System.Drawing.Size(149, 12);\n this.label19.TabIndex = 23;\n this.label19.Text = \"Clash订阅 覆写配置文件:\";\n // \n // comboBox3\n // \n this.comboBox3.FormattingEnabled = true;\n this.comboBox3.Items.AddRange(new object[] {\n \"自动选择\",\n \"1.github.010716.xyz\",\n \"113355.kabaka.xyz\",\n \"80888888.xyz\",\n \"aa.w0x7ce.eu\",\n \"acc.meiqer.com\",\n \"api-ghp.fjy.zone\",\n \"armg1.jyhk.tk\",\n \"armg2.jyhk.tk\",\n \"b.yesican.top\",\n \"bakht1.jsdelivr.fyi\",\n \"bakht2.jsdelivr.fyi\",\n \"bakht3.jsdelivr.fyi\",\n \"booster.ookkk.ggff.net\",\n \"c.gatepro.cn\",\n \"cc.ikakatoo.us\",\n \"ccgit1.5gyh.cf\",\n \"ccgit2.5gyh.cf\",\n \"cdn-gh.141888.xyz\",\n \"cfghproxy.165683.xyz\",\n \"chirophy.online\",\n \"choner.eu.org\",\n \"d.scyun.top\",\n \"daili.6dot.cn\",\n \"dh.guluy.top\",\n \"dh.jeblove.com\",\n \"dl.github.mirror.shalo.link\",\n \"dnsvip.uk\",\n \"docker.bkxhkoo.com\",\n \"docker.ppp.ac.cn\",\n \"down.avi.gs\",\n \"download.ojbk.one\",\n \"download.serein.cc\",\n \"f.shenbing.nyc.mn\",\n \"fastgithub.starryfun.icu\",\n \"file.justgame.top\",\n \"ft.v1k1.xin\",\n \"fuck-flow.nobige.cn\",\n \"g.108964.xyz\",\n \"g.blfrp.cn\",\n \"g.bravexist.cn\",\n \"g.down.0ms.net\",\n \"g.jscdn.cn\",\n \"g.yeyuqiufeng.cn\",\n \"gh.136361.xyz\",\n \"gh.13x.plus\",\n \"gh.19121912.xyz\",\n \"gh.193.gs\",\n \"gh.220106.xyz\",\n \"gh.222322.xyz\",\n \"gh.244224659.xyz\",\n \"gh.2i.gs\",\n \"gh.316688.xyz\",\n \"gh.321122.xyz\",\n \"gh.334433.xyz\",\n \"gh.39.al\",\n \"gh.518298.xyz\",\n \"gh.52099520.xyz\",\n \"gh.654535.xyz\",\n \"gh.777000.best\",\n \"gh.799154.xyz\",\n \"gh.860686.xyz\",\n \"gh.8p.gs\",\n \"gh.960980.xyz\",\n \"gh.accn.eu.org\",\n \"gh.amirrors.com\",\n \"gh.andiest.com\",\n \"gh.aurzex.top\",\n \"gh.avmine.com\",\n \"gh.b52m.cn\",\n \"gh.bhexo.cn\",\n \"gh.cdn.fullcone.cn\",\n \"gh.chewable.eu.org\",\n \"gh.chillwaytech.com\",\n \"gh.cnbattle.com\",\n \"gh.crond.dev\",\n \"gh.dev.438250.xyz\",\n \"gh.duang.io\",\n \"gh.duckcc.com\",\n \"gh.dwsy.link\",\n \"gh.ecdn.ip-ddns.com\",\n \"gh.flewsea.news\",\n \"gh.flewsea.pw\",\n \"gh.flyrr.cc\",\n \"gh.gongyi.tk\",\n \"gh.gorun.eu.org\",\n \"gh.gxb.pub\",\n \"gh.haloless.com\",\n \"gh.heshiheng.top\",\n \"gh.hitcs.cc\",\n \"gh.i3.pw\",\n \"gh.ibridge.eu.org\",\n \"gh.iinx.top\",\n \"gh.j8.work\",\n \"gh.jadelive.top\",\n \"gh.jscdn.cn\",\n \"gh.jxq.io\",\n \"gh.kejilion.pro\",\n \"gh.kemon.ai\",\n \"gh.kmxm.online\",\n \"gh.lib.cx\",\n \"gh.lkwplus.com\",\n \"gh.lux1983.com\",\n \"gh.luzy.top\",\n \"gh.lyh.moe\",\n \"gh.miaomiao.video\",\n \"gh.micedns.cloudns.org\",\n \"gh.mirror.190211.xyz\",\n \"gh.mirror.coolfeature.top\",\n \"gh.moetools.net\",\n \"gh.momonomi.xyz\",\n \"gh.mrskye.cn\",\n \"gh.mtx72.cc\",\n \"gh.nekhill.top\",\n \"gh.nekorect.eu.org\",\n \"gh.nextfuture.top\",\n \"gh.oevery.me\",\n \"gh.oneproxy.top\",\n \"gh.opsproxy.com\",\n \"gh.osspub.cn\",\n \"gh.padao.fun\",\n \"gh.prlrr.com\",\n \"gh.pylas.xyz\",\n \"gh.qptf.eu.org\",\n \"gh.qsd.onl\",\n \"gh.qsq.one\",\n \"gh.rem.asia\",\n \"gh.riye.de\",\n \"gh.scy.ink\",\n \"gh.someo.top\",\n \"gh.stanl.ee\",\n \"gh.stewitch.com\",\n \"gh.suite.eu.org\",\n \"gh.tbw.wiki\",\n \"gh.tou.lu\",\n \"gh.tryxd.cn\",\n \"gh.uclort.com\",\n \"gh.wglee.org\",\n \"gh.wowforever.xyz\",\n \"gh.wuuu.cc\",\n \"gh.wwang.de\",\n \"gh.wygg.us.kg\",\n \"gh.xbzza.cn\",\n \"gh.xda.plus\",\n \"gh.yahool.com.cn\",\n \"gh.yushum.com\",\n \"ghac.760710.xyz\",\n \"ghacc.cpuhk.eu.org\",\n \"ghb.wglee.org\",\n \"gh-boost.oneboy.app\",\n \"gh-deno.mocn.top\",\n \"ghfast.top\",\n \"ghjs.131412.eu.org\",\n \"ghp.618032.xyz\",\n \"ghp.9e6.site\",\n \"ghp.dnsplus.uk\",\n \"ghp.fit2.fun\",\n \"ghp.imc.re\",\n \"ghp.jokeme.top\",\n \"ghp.lanchonghai.com\",\n \"ghp.miaostay.com\",\n \"ghp.opendatahub.xyz\",\n \"ghp.pbren.com\",\n \"ghp.src.moe\",\n \"ghp.tryanks.com\",\n \"ghp.vatery.com\",\n \"ghp.xiaopan.ai\",\n \"ghp.ybot.xin\",\n \"ghp.yeye.f5.si\",\n \"ghproxy.0081024.xyz\",\n \"ghproxy.053000.xyz\",\n \"ghproxy.200502.xyz\",\n \"ghproxy.943689.xyz\",\n \"ghproxy.alltobid.cc\",\n \"ghproxy.amayakite.xyz\",\n \"ghproxy.bugungu.top\",\n \"gh-proxy.dorz.tech\",\n \"ghproxy.dsdog.tk\",\n \"ghproxy.ducknet.work\",\n \"ghproxy.gopher.ink\",\n \"ghproxy.gpnu.org\",\n \"ghproxy.hoshizukimio.top\",\n \"gh-proxy.iflyelf.com\",\n \"ghproxy.imoyuapp.win\",\n \"gh-proxy.jacksixth.top\",\n \"gh-proxy.jmper.me\",\n \"ghproxy.joylian.com\",\n \"gh-proxy.just520.top\",\n \"ghproxy.licardo.vip\",\n \"gh-proxy.mereith.com\",\n \"ghproxy.minge.dev\",\n \"ghproxy.missfuture.eu.org\",\n \"ghproxy.moweilong.com\",\n \"ghproxy.nanakorobi.com\",\n \"ghproxy.net\",\n \"gh-proxy.not.icu\",\n \"ghproxy.ownyuan.top\",\n \"gh-proxy.rxliuli.com\",\n \"ghproxy.sakuramoe.dev\",\n \"ghproxy.smallfawn.work\",\n \"ghproxy.sveir.xyz\",\n \"ghproxy.temoa.fun\",\n \"ghproxy.thefoxnet.com\",\n \"ghproxy.tracemouse.top\",\n \"ghproxy.txq.life\",\n \"ghproxy.viper.pub\",\n \"ghproxy.vyronlee-lab.com\",\n \"ghproxy.weizhiwen.net\",\n \"ghproxy.wjsphy.top\",\n \"ghproxy.workers.haoutil.com\",\n \"ghproxy.xiaohei-studio-chatgpt-proxy.com.cn\",\n \"gh-proxy.yuntao.me\",\n \"git.1999111.xyz\",\n \"git.22345678.xyz\",\n \"git.40609891.xyz\",\n \"git.5gyh.cf\",\n \"git.988896.xyz\",\n \"git.aaltozz.info\",\n \"git.acap.cc\",\n \"git.amoluo.win\",\n \"git.anye.in\",\n \"git.binbow.link\",\n \"git.blaow.cloudns.org\",\n \"git.closersyu.top\",\n \"git.ifso.site\",\n \"git.imvery.moe\",\n \"git.ixdd.de\",\n \"git.ldvx.de\",\n \"git.lincloud.pro\",\n \"git.liunasc.xyz\",\n \"git.llvho.com\",\n \"git.loushi.site\",\n \"git.lzzz.ink\",\n \"git.maomao.ovh\",\n \"git.mokoc.live\",\n \"git.niege.app\",\n \"git.nyar.work\",\n \"git.o8.cx\",\n \"git.outtw.com\",\n \"git.ppp.ac.cn\",\n \"git.repcz.link\",\n \"git.txaff.com\",\n \"git.verynb.org\",\n \"git.wsl.icu\",\n \"git.wyy.sh\",\n \"git.xiny.eu.org\",\n \"git.xuantan.icu\",\n \"git.zlong.eu.org\",\n \"git3.openapi.site\",\n \"git-clone.ccrui.dev\",\n \"github.08050611.xyz\",\n \"github.143760.xyz\",\n \"github.170011.xyz\",\n \"github.17263241.xyz\",\n \"github.180280.xyz\",\n \"github.197909.xyz\",\n \"github.19890821.xyz\",\n \"github.201068.xyz\",\n \"github.333033.xyz\",\n \"github.4240333.xyz\",\n \"github.564456.xyz\",\n \"github.732086.xyz\",\n \"github.776884.xyz\",\n \"github.789056.xyz\",\n \"github.818668.xyz\",\n \"github.8void.sbs\",\n \"github.9394961.xyz\",\n \"github.960118.xyz\",\n \"github.abyss.moe\",\n \"github.atzzz.com\",\n \"github.axcio.dns-dynamic.net\",\n \"github.boki.moe\",\n \"github.boringhex.top\",\n \"github.bullb.net\",\n \"github.c1g.top\",\n \"github.cf.xihale.top\",\n \"github.chasun.top\",\n \"github.chuancey.eu.org\",\n \"github.cnxiaobai.com\",\n \"github.computerqwq.top\",\n \"github.cswklt.top\",\n \"github.ctios.cn\",\n \"github.ddlink.asia\",\n \"github.dockerspeed.site\",\n \"github.eejsq.net\",\n \"github.ffffffff0x.com\",\n \"github.gdzja.site\",\n \"github.haodiy.xyz\",\n \"github.hhh.sd\",\n \"github.hi.edu.rs\",\n \"github.hostscc.top\",\n \"github.hx208.top\",\n \"github.ilxyz.xyz\",\n \"github.intellisensing.tech\",\n \"github.jerryliang.win\",\n \"github.jimmyshjj.top\",\n \"github.jinenyy.vip\",\n \"github.jscdn.cn\",\n \"github.kidos.top\",\n \"github.kuugo.top\",\n \"github.lao.plus\",\n \"github.mayx.eu.org\",\n \"github.mirror.qlnu-sec.cn\",\n \"github.mirror.vurl.eu.org\",\n \"github.mirrors.hikafeng.com\",\n \"github.mistudio.top\",\n \"github.orangbus.cn\",\n \"github.pipers.cn\",\n \"github.proxy.zerozone.tech\",\n \"github.pxy.lnsee.com\",\n \"github.quickso.net\",\n \"github.ruxi.org\",\n \"github.sagolu.top\",\n \"github.serein.cc\",\n \"github.snakexgc.com\",\n \"github.space520.eu.org\",\n \"github.sssss.work\",\n \"github.static.cv\",\n \"github.suyijun.top\",\n \"github.try255.com\",\n \"github.unipus.site\",\n \"github.verynb.org\",\n \"github.vipchanel.com\",\n \"github.widiazine.top\",\n \"github.workers.lv10.ren\",\n \"github.workersnail.com\",\n \"github.xin-yu.cloud\",\n \"github.xiongmx.com\",\n \"github.xwb009.xyz\",\n \"github.xxlab.tech\",\n \"github.xxqq.de\",\n \"github.xykcloud.com\",\n \"github.yeep6.eu.org\",\n \"github.ylyhtools.top\",\n \"github.yoloarea.com\",\n \"github.yunfile.fun\",\n \"github.zhaolele.top\",\n \"github.zhou2008.cn\",\n \"github.zhulin240520.buzz\",\n \"github.zyhmifan.top\",\n \"githubacc.caiaiwan.com\",\n \"githubapi.jjchizha.com\",\n \"githubgo.856798.xyz\",\n \"github-proxy.ai-lulu.top\",\n \"github-proxy.caoayu.top\",\n \"github-proxy.explorexd.uk\",\n \"github-proxy.fjiabinc.cn\",\n \"github-proxy.sharefree.site\",\n \"githubproxy.unix.do\",\n \"github-quick.1ms.dev\",\n \"github-raw-download.nekhill.top\",\n \"githubsg.lilyya.top\",\n \"gitproxy.mrhjx.cn\",\n \"gitproxy.ozoo.top\",\n \"godlike.ezpull.top\",\n \"gp.19841106.xyz\",\n \"gp.dahe.now.cc\",\n \"gp.daxei.now.cc\",\n \"g-p.loli.us\",\n \"gp.ownorigin.top\",\n \"gt.changqqq.xyz\",\n \"gxb.pub\",\n \"hay.uxio.cn\",\n \"hg.19840228.top\",\n \"hh.newhappy.cf\",\n \"hk.114914.xyz\",\n \"hub.12138.3653655.xyz\",\n \"hub.326998.xyz\",\n \"hub.885666.xyz\",\n \"hub.fnas64.xin\",\n \"hub.jeblove.com\",\n \"hub.naloong.de\",\n \"hub.vps.861020.xyz\",\n \"hub.vvn.me\",\n \"hub.why-ing.top\",\n \"hub.xjl.ch\",\n \"jh.ussh.net\",\n \"jias.ayanjiu.top\",\n \"jiasu.iwtriptqt1016.eu.org\",\n \"jiasughapi.lingjun.cc\",\n \"jiasuqi.167889.xyz\",\n \"jisuan.xyz\",\n \"js.wd666.cloudns.biz\",\n \"l0l0l.cc\",\n \"m.seafood.loan\",\n \"mc.cn.eu.org\",\n \"mdv.162899.xyz\",\n \"micromatrix.gq\",\n \"mip.cnzzla.com\",\n \"my.iiso.site\",\n \"my.losesw.live\",\n \"mygh.api.xiaomao.eu.org\",\n \"nav.253874.net\",\n \"nav.cxycsx.vip\",\n \"nav.gjcloak.xyz\",\n \"nav.hgd1999.com\",\n \"nav.hoiho.cn\",\n \"nav.syss.fun\",\n \"nav.tossp.com\",\n \"nav.wxapp.xyz\",\n \"nav.yyxw.tk\",\n \"navs.itmax.cn\",\n \"neoz.chat\",\n \"noad.keliyan.top\",\n \"node2.txq.life\",\n \"or.tianba.eu.org\",\n \"p.jackyu.cn\",\n \"privateghproxy.iil.im\",\n \"proxy.191027.xyz\",\n \"proxy.atoposs.com\",\n \"proxy.ccc8.vip\",\n \"proxy.dragontea.cc\",\n \"proxy.fakups.cn\",\n \"proxydl.lcayun.cn\",\n \"proxy-gh.1l1.icu\",\n \"q-github.cnxiaobai.com\",\n \"ql.l50.top\",\n \"raw.nmd.im\",\n \"rst.567812.xyz\",\n \"static.kaixinwu.vip\",\n \"static.yiwangmeng.com\",\n \"t.992699.xyz\",\n \"tpe.corpa.me\",\n \"tube.20140301.xyz\",\n \"vps.pansen626.com\",\n \"wfgithub.xiaonuomi.ie.eu.org\"});\n this.comboBox3.Location = new System.Drawing.Point(600, 19);\n this.comboBox3.Name = \"comboBox3\";\n this.comboBox3.Size = new System.Drawing.Size(170, 20);\n this.comboBox3.TabIndex = 21;\n this.comboBox3.Leave += new System.EventHandler(this.comboBox3_Leave);\n // \n // label10\n // \n this.label10.AutoSize = true;\n this.label10.Location = new System.Drawing.Point(505, 21);\n this.label10.Name = \"label10\";\n this.label10.Size = new System.Drawing.Size(89, 12);\n this.label10.TabIndex = 20;\n this.label10.Text = \"Github Proxy:\";\n // \n // comboBox2\n // \n this.comboBox2.FormattingEnabled = true;\n this.comboBox2.Items.AddRange(new object[] {\n \"https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases/download/v2.21.12/\" +\n \"Waifu2x-Extension-GUI-v2.21.12-Portable.7z\",\n \"https://github.com/2dust/v2rayN/releases/download/7.10.4/v2rayN-windows-64-deskto\" +\n \"p.zip\",\n \"https://github.com/VSCodium/vscodium/releases/download/1.98.0.25067/codium-1.98.0\" +\n \".25067-el9.aarch64.rpm\"});\n this.comboBox2.Location = new System.Drawing.Point(414, 45);\n this.comboBox2.Name = \"comboBox2\";\n this.comboBox2.Size = new System.Drawing.Size(275, 20);\n this.comboBox2.TabIndex = 19;\n this.comboBox2.Text = \"https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases/download/v2.21.12/\" +\n \"Waifu2x-Extension-GUI-v2.21.12-Portable.7z\";\n // \n // label9\n // \n this.label9.AutoSize = true;\n this.label9.Location = new System.Drawing.Point(344, 48);\n this.label9.Name = \"label9\";\n this.label9.Size = new System.Drawing.Size(65, 12);\n this.label9.TabIndex = 18;\n this.label9.Text = \"测速地址:\";\n // \n // progressBar1\n // \n this.progressBar1.Location = new System.Drawing.Point(13, 3);\n this.progressBar1.Name = \"progressBar1\";\n this.progressBar1.Size = new System.Drawing.Size(780, 3);\n this.progressBar1.TabIndex = 3;\n // \n // timer2\n // \n this.timer2.Interval = 2000;\n this.timer2.Tick += new System.EventHandler(this.timer2_Tick);\n // \n // groupBox4\n // \n this.groupBox4.Controls.Add(this.textBox4);\n this.groupBox4.Controls.Add(this.label13);\n this.groupBox4.Controls.Add(this.textBox3);\n this.groupBox4.Controls.Add(this.label12);\n this.groupBox4.Controls.Add(this.textBox2);\n this.groupBox4.Controls.Add(this.label11);\n this.groupBox4.Location = new System.Drawing.Point(13, 612);\n this.groupBox4.Name = \"groupBox4\";\n this.groupBox4.Size = new System.Drawing.Size(780, 51);\n this.groupBox4.TabIndex = 4;\n this.groupBox4.TabStop = false;\n this.groupBox4.Text = \"Gist 上传参数\";\n this.groupBox4.Visible = false;\n // \n // textBox4\n // \n this.textBox4.Location = new System.Drawing.Point(467, 18);\n this.textBox4.Name = \"textBox4\";\n this.textBox4.Size = new System.Drawing.Size(306, 21);\n this.textBox4.TabIndex = 5;\n // \n // label13\n // \n this.label13.AutoSize = true;\n this.label13.Location = new System.Drawing.Point(359, 21);\n this.label13.Name = \"label13\";\n this.label13.Size = new System.Drawing.Size(113, 12);\n this.label13.TabIndex = 4;\n this.label13.Text = \"API Mirror(可选):\";\n // \n // textBox3\n // \n this.textBox3.Location = new System.Drawing.Point(253, 18);\n this.textBox3.Name = \"textBox3\";\n this.textBox3.PasswordChar = '*';\n this.textBox3.Size = new System.Drawing.Size(100, 21);\n this.textBox3.TabIndex = 3;\n this.textBox3.Enter += new System.EventHandler(this.textBox3_Enter);\n this.textBox3.Leave += new System.EventHandler(this.textBox3_Leave);\n // \n // label12\n // \n this.label12.AutoSize = true;\n this.label12.Location = new System.Drawing.Point(168, 21);\n this.label12.Name = \"label12\";\n this.label12.Size = new System.Drawing.Size(89, 12);\n this.label12.TabIndex = 2;\n this.label12.Text = \"Github Token:\";\n // \n // textBox2\n // \n this.textBox2.Location = new System.Drawing.Point(62, 18);\n this.textBox2.Name = \"textBox2\";\n this.textBox2.Size = new System.Drawing.Size(100, 21);\n this.textBox2.TabIndex = 1;\n // \n // label11\n // \n this.label11.AutoSize = true;\n this.label11.Location = new System.Drawing.Point(7, 21);\n this.label11.Name = \"label11\";\n this.label11.Size = new System.Drawing.Size(59, 12);\n this.label11.TabIndex = 0;\n this.label11.Text = \"Gist ID:\";\n // \n // toolTip1\n // \n this.toolTip1.AutoPopDelay = 5000;\n this.toolTip1.InitialDelay = 500;\n this.toolTip1.ReshowDelay = 500;\n this.toolTip1.ShowAlways = true;\n // \n // groupBox5\n // \n this.groupBox5.Controls.Add(this.textBox6);\n this.groupBox5.Controls.Add(this.label15);\n this.groupBox5.Controls.Add(this.textBox7);\n this.groupBox5.Controls.Add(this.label16);\n this.groupBox5.Location = new System.Drawing.Point(13, 669);\n this.groupBox5.Name = \"groupBox5\";\n this.groupBox5.Size = new System.Drawing.Size(780, 51);\n this.groupBox5.TabIndex = 6;\n this.groupBox5.TabStop = false;\n this.groupBox5.Text = \"R2 上传参数\";\n this.groupBox5.Visible = false;\n // \n // textBox6\n // \n this.textBox6.Location = new System.Drawing.Point(467, 18);\n this.textBox6.Name = \"textBox6\";\n this.textBox6.PasswordChar = '*';\n this.textBox6.Size = new System.Drawing.Size(306, 21);\n this.textBox6.TabIndex = 3;\n this.textBox6.Text = \"1234567890\";\n this.textBox6.Enter += new System.EventHandler(this.textBox3_Enter);\n this.textBox6.Leave += new System.EventHandler(this.textBox3_Leave);\n // \n // label15\n // \n this.label15.AutoSize = true;\n this.label15.Location = new System.Drawing.Point(382, 21);\n this.label15.Name = \"label15\";\n this.label15.Size = new System.Drawing.Size(89, 12);\n this.label15.TabIndex = 2;\n this.label15.Text = \"Worker Token:\";\n // \n // textBox7\n // \n this.textBox7.Location = new System.Drawing.Point(88, 18);\n this.textBox7.Name = \"textBox7\";\n this.textBox7.Size = new System.Drawing.Size(285, 21);\n this.textBox7.TabIndex = 1;\n this.textBox7.Text = \"https://example.worker.dev\";\n this.textBox7.Leave += new System.EventHandler(this.textBox7_Leave);\n // \n // label16\n // \n this.label16.AutoSize = true;\n this.label16.Location = new System.Drawing.Point(7, 21);\n this.label16.Name = \"label16\";\n this.label16.Size = new System.Drawing.Size(77, 12);\n this.label16.TabIndex = 0;\n this.label16.Text = \"Worker URL:\";\n // \n // groupBox6\n // \n this.groupBox6.Controls.Add(this.textBox5);\n this.groupBox6.Controls.Add(this.label14);\n this.groupBox6.Controls.Add(this.textBox8);\n this.groupBox6.Controls.Add(this.label17);\n this.groupBox6.Controls.Add(this.textBox9);\n this.groupBox6.Controls.Add(this.label18);\n this.groupBox6.Location = new System.Drawing.Point(13, 726);\n this.groupBox6.Name = \"groupBox6\";\n this.groupBox6.Size = new System.Drawing.Size(780, 51);\n this.groupBox6.TabIndex = 6;\n this.groupBox6.TabStop = false;\n this.groupBox6.Text = \"Webdav 上传参数\";\n this.groupBox6.Visible = false;\n // \n // textBox5\n // \n this.textBox5.Location = new System.Drawing.Point(467, 18);\n this.textBox5.Name = \"textBox5\";\n this.textBox5.Size = new System.Drawing.Size(306, 21);\n this.textBox5.TabIndex = 5;\n this.textBox5.Text = \"https://example.com/dav/\";\n // \n // label14\n // \n this.label14.AutoSize = true;\n this.label14.Location = new System.Drawing.Point(382, 21);\n this.label14.Name = \"label14\";\n this.label14.Size = new System.Drawing.Size(77, 12);\n this.label14.TabIndex = 4;\n this.label14.Text = \"Webdav URL:\";\n // \n // textBox8\n // \n this.textBox8.Location = new System.Drawing.Point(257, 18);\n this.textBox8.Name = \"textBox8\";\n this.textBox8.PasswordChar = '*';\n this.textBox8.Size = new System.Drawing.Size(110, 21);\n this.textBox8.TabIndex = 3;\n this.textBox8.Text = \"admin\";\n this.textBox8.Enter += new System.EventHandler(this.textBox3_Enter);\n this.textBox8.Leave += new System.EventHandler(this.textBox3_Leave);\n // \n // label17\n // \n this.label17.AutoSize = true;\n this.label17.Location = new System.Drawing.Point(186, 21);\n this.label17.Name = \"label17\";\n this.label17.Size = new System.Drawing.Size(65, 12);\n this.label17.TabIndex = 2;\n this.label17.Text = \"Password:\";\n // \n // textBox9\n // \n this.textBox9.Location = new System.Drawing.Point(70, 18);\n this.textBox9.Name = \"textBox9\";\n this.textBox9.Size = new System.Drawing.Size(110, 21);\n this.textBox9.TabIndex = 1;\n this.textBox9.Text = \"admin\";\n // \n // label18\n // \n this.label18.AutoSize = true;\n this.label18.Location = new System.Drawing.Point(7, 21);\n this.label18.Name = \"label18\";\n this.label18.Size = new System.Drawing.Size(65, 12);\n this.label18.TabIndex = 0;\n this.label18.Text = \"Username:\";\n // \n // timer3\n // \n this.timer3.Interval = 86400000;\n this.timer3.Tick += new System.EventHandler(this.timer3_Tick);\n // \n // timer4\n // \n this.timer4.Interval = 1000;\n this.timer4.Tick += new System.EventHandler(this.timer4_Tick);\n // \n // Form1\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.AutoSize = true;\n this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\n this.ClientSize = new System.Drawing.Size(800, 784);\n this.Controls.Add(this.groupBox6);\n this.Controls.Add(this.groupBox5);\n this.Controls.Add(this.groupBox4);\n this.Controls.Add(this.groupBox3);\n this.Controls.Add(this.groupBox2);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.progressBar1);\n this.Icon = ((System.Drawing.Icon)(resources.GetObject(\"$this.Icon\")));\n this.MaximizeBox = false;\n this.Name = \"Form1\";\n this.Text = \"SubsCheck Win GUI\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown7)).EndInit();\n this.groupBox2.ResumeLayout(false);\n this.groupBox2.PerformLayout();\n this.groupBox3.ResumeLayout(false);\n this.groupBox3.PerformLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown8)).EndInit();\n this.groupBox4.ResumeLayout(false);\n this.groupBox4.PerformLayout();\n this.groupBox5.ResumeLayout(false);\n this.groupBox5.PerformLayout();\n this.groupBox6.ResumeLayout(false);\n this.groupBox6.PerformLayout();\n this.ResumeLayout(false);\n\n }\n\n #endregion\n\n private System.Windows.Forms.NotifyIcon notifyIcon1;\n private System.Windows.Forms.Timer timer1;\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.GroupBox groupBox2;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.GroupBox groupBox3;\n private System.Windows.Forms.Label label8;\n private System.Windows.Forms.Label label7;\n private System.Windows.Forms.Label label4;\n private System.Windows.Forms.Label label5;\n private System.Windows.Forms.Label label6;\n private System.Windows.Forms.Label label3;\n private System.Windows.Forms.Label label2;\n private System.Windows.Forms.Label label1;\n private System.Windows.Forms.NumericUpDown numericUpDown6;\n private System.Windows.Forms.NumericUpDown numericUpDown5;\n private System.Windows.Forms.NumericUpDown numericUpDown4;\n private System.Windows.Forms.NumericUpDown numericUpDown3;\n private System.Windows.Forms.NumericUpDown numericUpDown2;\n private System.Windows.Forms.NumericUpDown numericUpDown1;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.ComboBox comboBox1;\n private System.Windows.Forms.ComboBox comboBox2;\n private System.Windows.Forms.Label label9;\n private System.Windows.Forms.ComboBox comboBox3;\n private System.Windows.Forms.Label label10;\n private System.Windows.Forms.CheckBox checkBox1;\n private System.Windows.Forms.RichTextBox richTextBox1;\n private System.Windows.Forms.ProgressBar progressBar1;\n private System.Windows.Forms.Button button3;\n private System.Windows.Forms.Timer timer2;\n private System.Windows.Forms.GroupBox groupBox4;\n private System.Windows.Forms.TextBox textBox4;\n private System.Windows.Forms.Label label13;\n private System.Windows.Forms.TextBox textBox3;\n private System.Windows.Forms.Label label12;\n private System.Windows.Forms.TextBox textBox2;\n private System.Windows.Forms.Label label11;\n private System.Windows.Forms.ToolTip toolTip1;\n private System.Windows.Forms.GroupBox groupBox5;\n private System.Windows.Forms.TextBox textBox6;\n private System.Windows.Forms.Label label15;\n private System.Windows.Forms.TextBox textBox7;\n private System.Windows.Forms.Label label16;\n private System.Windows.Forms.GroupBox groupBox6;\n private System.Windows.Forms.TextBox textBox5;\n private System.Windows.Forms.Label label14;\n private System.Windows.Forms.TextBox textBox8;\n private System.Windows.Forms.Label label17;\n private System.Windows.Forms.TextBox textBox9;\n private System.Windows.Forms.Label label18;\n private System.Windows.Forms.Button button5;\n private System.Windows.Forms.ComboBox comboBox4;\n private System.Windows.Forms.NumericUpDown numericUpDown7;\n private System.Windows.Forms.Label label20;\n private System.Windows.Forms.Label label19;\n private System.Windows.Forms.ComboBox comboBox5;\n private System.Windows.Forms.CheckBox checkBox2;\n private System.Windows.Forms.Timer timer3;\n private System.Windows.Forms.Button button4;\n private System.Windows.Forms.NumericUpDown numericUpDown8;\n private System.Windows.Forms.CheckBox checkBox3;\n private System.Windows.Forms.TextBox textBox10;\n private System.Windows.Forms.CheckBox checkBox4;\n private System.Windows.Forms.Button button6;\n private System.Windows.Forms.Timer timer4;\n private System.Windows.Forms.Button button7;\n private System.Windows.Forms.TextBox textBox11;\n private System.Windows.Forms.LinkLabel linkLabel1;\n private System.Windows.Forms.Button button8;\n private System.Windows.Forms.CheckBox checkBox5;\n }\n}\n\n"], ["/SubsCheck-Win-GUI/about.Designer.cs", "namespace subs_check.win.gui\n{\n partial class about\n {\n /// \n /// Required designer variable.\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// Clean up any resources being used.\n /// \n /// true if managed resources should be disposed; otherwise, false.\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows Form Designer generated code\n\n /// \n /// Required method for Designer support - do not modify\n /// the contents of this method with the code editor.\n /// \n private void InitializeComponent()\n {\n System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(about));\n this.button1 = new System.Windows.Forms.Button();\n this.label1 = new System.Windows.Forms.Label();\n this.label2 = new System.Windows.Forms.Label();\n this.label3 = new System.Windows.Forms.Label();\n this.label5 = new System.Windows.Forms.Label();\n this.linkLabel1 = new System.Windows.Forms.LinkLabel();\n this.label6 = new System.Windows.Forms.Label();\n this.label7 = new System.Windows.Forms.Label();\n this.linkLabel2 = new System.Windows.Forms.LinkLabel();\n this.label8 = new System.Windows.Forms.Label();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.label13 = new System.Windows.Forms.Label();\n this.linkLabel4 = new System.Windows.Forms.LinkLabel();\n this.label12 = new System.Windows.Forms.Label();\n this.linkLabel3 = new System.Windows.Forms.LinkLabel();\n this.label11 = new System.Windows.Forms.Label();\n this.label10 = new System.Windows.Forms.Label();\n this.label9 = new System.Windows.Forms.Label();\n this.groupBox2 = new System.Windows.Forms.GroupBox();\n this.label14 = new System.Windows.Forms.Label();\n this.groupBox3 = new System.Windows.Forms.GroupBox();\n this.label15 = new System.Windows.Forms.Label();\n this.linkLabel8 = new System.Windows.Forms.LinkLabel();\n this.linkLabel6 = new System.Windows.Forms.LinkLabel();\n this.linkLabel5 = new System.Windows.Forms.LinkLabel();\n this.groupBox4 = new System.Windows.Forms.GroupBox();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.label4 = new System.Windows.Forms.Label();\n this.groupBox1.SuspendLayout();\n this.groupBox2.SuspendLayout();\n this.groupBox3.SuspendLayout();\n this.groupBox4.SuspendLayout();\n this.SuspendLayout();\n // \n // button1\n // \n this.button1.Location = new System.Drawing.Point(513, 619);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"确定\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // label1\n // \n this.label1.AutoSize = true;\n this.label1.Font = new System.Drawing.Font(\"微软雅黑\", 24.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.label1.Location = new System.Drawing.Point(10, 9);\n this.label1.Name = \"label1\";\n this.label1.Size = new System.Drawing.Size(354, 44);\n this.label1.TabIndex = 1;\n this.label1.Text = \"SubsCheck-Win-GUI\";\n // \n // label2\n // \n this.label2.AutoSize = true;\n this.label2.Location = new System.Drawing.Point(113, 19);\n this.label2.Name = \"label2\";\n this.label2.Size = new System.Drawing.Size(53, 12);\n this.label2.TabIndex = 2;\n this.label2.Text = \"未知版本\";\n // \n // label3\n // \n this.label3.AutoSize = true;\n this.label3.Location = new System.Drawing.Point(113, 119);\n this.label3.Name = \"label3\";\n this.label3.Size = new System.Drawing.Size(53, 12);\n this.label3.TabIndex = 3;\n this.label3.Text = \"未知版本\";\n // \n // label5\n // \n this.label5.AutoSize = true;\n this.label5.Location = new System.Drawing.Point(18, 119);\n this.label5.Name = \"label5\";\n this.label5.Size = new System.Drawing.Size(65, 12);\n this.label5.TabIndex = 5;\n this.label5.Text = \"内核版本:\";\n // \n // linkLabel1\n // \n this.linkLabel1.AutoSize = true;\n this.linkLabel1.Location = new System.Drawing.Point(113, 39);\n this.linkLabel1.Name = \"linkLabel1\";\n this.linkLabel1.Size = new System.Drawing.Size(257, 12);\n this.linkLabel1.TabIndex = 6;\n this.linkLabel1.TabStop = true;\n this.linkLabel1.Text = \"https://github.com/cmliu/SubsCheck-Win-GUI\";\n this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);\n // \n // label6\n // \n this.label6.AutoSize = true;\n this.label6.Location = new System.Drawing.Point(18, 139);\n this.label6.Name = \"label6\";\n this.label6.Size = new System.Drawing.Size(89, 12);\n this.label6.TabIndex = 8;\n this.label6.Text = \"内核项目地址:\";\n // \n // label7\n // \n this.label7.AutoSize = true;\n this.label7.Location = new System.Drawing.Point(18, 39);\n this.label7.Name = \"label7\";\n this.label7.Size = new System.Drawing.Size(65, 12);\n this.label7.TabIndex = 7;\n this.label7.Text = \"项目地址:\";\n // \n // linkLabel2\n // \n this.linkLabel2.AutoSize = true;\n this.linkLabel2.Location = new System.Drawing.Point(113, 139);\n this.linkLabel2.Name = \"linkLabel2\";\n this.linkLabel2.Size = new System.Drawing.Size(221, 12);\n this.linkLabel2.TabIndex = 9;\n this.linkLabel2.TabStop = true;\n this.linkLabel2.Text = \"https://github.com/beck-8/subs-check\";\n this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked);\n // \n // label8\n // \n this.label8.AutoSize = true;\n this.label8.Location = new System.Drawing.Point(18, 159);\n this.label8.Name = \"label8\";\n this.label8.Size = new System.Drawing.Size(317, 12);\n this.label8.TabIndex = 10;\n this.label8.Text = \"基于.NET Framework 4.7.2 开发 开源协议:MIT License\";\n // \n // groupBox1\n // \n this.groupBox1.Controls.Add(this.label4);\n this.groupBox1.Controls.Add(this.label13);\n this.groupBox1.Controls.Add(this.linkLabel4);\n this.groupBox1.Controls.Add(this.label12);\n this.groupBox1.Controls.Add(this.linkLabel3);\n this.groupBox1.Controls.Add(this.label11);\n this.groupBox1.Controls.Add(this.label10);\n this.groupBox1.Controls.Add(this.label9);\n this.groupBox1.Controls.Add(this.label8);\n this.groupBox1.Controls.Add(this.label2);\n this.groupBox1.Controls.Add(this.linkLabel2);\n this.groupBox1.Controls.Add(this.label3);\n this.groupBox1.Controls.Add(this.label6);\n this.groupBox1.Controls.Add(this.label5);\n this.groupBox1.Controls.Add(this.label7);\n this.groupBox1.Controls.Add(this.linkLabel1);\n this.groupBox1.Location = new System.Drawing.Point(12, 105);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(576, 183);\n this.groupBox1.TabIndex = 11;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"基本信息:\";\n // \n // label13\n // \n this.label13.AutoSize = true;\n this.label13.Location = new System.Drawing.Point(113, 59);\n this.label13.Name = \"label13\";\n this.label13.Size = new System.Drawing.Size(215, 12);\n this.label13.TabIndex = 17;\n this.label13.Text = \"CM 就是这么简单!就是这么方便!!!\";\n // \n // linkLabel4\n // \n this.linkLabel4.AutoSize = true;\n this.linkLabel4.Location = new System.Drawing.Point(113, 79);\n this.linkLabel4.Name = \"linkLabel4\";\n this.linkLabel4.Size = new System.Drawing.Size(47, 12);\n this.linkLabel4.TabIndex = 16;\n this.linkLabel4.TabStop = true;\n this.linkLabel4.Text = \"Youtube\";\n this.linkLabel4.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel4_LinkClicked);\n // \n // label12\n // \n this.label12.AutoSize = true;\n this.label12.Location = new System.Drawing.Point(18, 79);\n this.label12.Name = \"label12\";\n this.label12.Size = new System.Drawing.Size(65, 12);\n this.label12.TabIndex = 15;\n this.label12.Text = \"视频教程:\";\n // \n // linkLabel3\n // \n this.linkLabel3.AutoSize = true;\n this.linkLabel3.Location = new System.Drawing.Point(113, 99);\n this.linkLabel3.Name = \"linkLabel3\";\n this.linkLabel3.Size = new System.Drawing.Size(89, 12);\n this.linkLabel3.TabIndex = 14;\n this.linkLabel3.TabStop = true;\n this.linkLabel3.Text = \"Telegram交流群\";\n this.linkLabel3.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel3_LinkClicked);\n // \n // label11\n // \n this.label11.AutoSize = true;\n this.label11.Location = new System.Drawing.Point(18, 99);\n this.label11.Name = \"label11\";\n this.label11.Size = new System.Drawing.Size(65, 12);\n this.label11.TabIndex = 13;\n this.label11.Text = \"联系方式:\";\n // \n // label10\n // \n this.label10.AutoSize = true;\n this.label10.Location = new System.Drawing.Point(18, 59);\n this.label10.Name = \"label10\";\n this.label10.Size = new System.Drawing.Size(53, 12);\n this.label10.TabIndex = 12;\n this.label10.Text = \"开发者:\";\n // \n // label9\n // \n this.label9.AutoSize = true;\n this.label9.Location = new System.Drawing.Point(18, 19);\n this.label9.Name = \"label9\";\n this.label9.Size = new System.Drawing.Size(65, 12);\n this.label9.TabIndex = 11;\n this.label9.Text = \"当前版本:\";\n // \n // groupBox2\n // \n this.groupBox2.Controls.Add(this.label14);\n this.groupBox2.Location = new System.Drawing.Point(12, 58);\n this.groupBox2.Name = \"groupBox2\";\n this.groupBox2.Size = new System.Drawing.Size(576, 41);\n this.groupBox2.TabIndex = 12;\n this.groupBox2.TabStop = false;\n this.groupBox2.Text = \"软件简介:\";\n // \n // label14\n // \n this.label14.AutoSize = true;\n this.label14.Location = new System.Drawing.Point(18, 19);\n this.label14.Name = \"label14\";\n this.label14.Size = new System.Drawing.Size(365, 12);\n this.label14.TabIndex = 0;\n this.label14.Text = \"节点测速与订阅管理工具,可帮助用户测试、筛选和管理网络节点。\";\n // \n // groupBox3\n // \n this.groupBox3.Controls.Add(this.label15);\n this.groupBox3.Controls.Add(this.linkLabel8);\n this.groupBox3.Controls.Add(this.linkLabel6);\n this.groupBox3.Controls.Add(this.linkLabel5);\n this.groupBox3.Location = new System.Drawing.Point(12, 294);\n this.groupBox3.Name = \"groupBox3\";\n this.groupBox3.Size = new System.Drawing.Size(576, 43);\n this.groupBox3.TabIndex = 13;\n this.groupBox3.TabStop = false;\n this.groupBox3.Text = \"诚挚感谢下列开源项目及其维护者为软件开发提供的支持(排名不分先后,未能及时列出也会心存感激)\";\n // \n // label15\n // \n this.label15.AutoSize = true;\n this.label15.Location = new System.Drawing.Point(201, 19);\n this.label15.Name = \"label15\";\n this.label15.Size = new System.Drawing.Size(65, 12);\n this.label15.TabIndex = 19;\n this.label15.Text = \"ChatGPT 等\";\n // \n // linkLabel8\n // \n this.linkLabel8.AutoSize = true;\n this.linkLabel8.Location = new System.Drawing.Point(136, 19);\n this.linkLabel8.Name = \"linkLabel8\";\n this.linkLabel8.Size = new System.Drawing.Size(59, 12);\n this.linkLabel8.TabIndex = 20;\n this.linkLabel8.TabStop = true;\n this.linkLabel8.Text = \"Sub-Store\";\n this.linkLabel8.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel8_LinkClicked);\n // \n // linkLabel6\n // \n this.linkLabel6.AutoSize = true;\n this.linkLabel6.Location = new System.Drawing.Point(65, 19);\n this.linkLabel6.Name = \"linkLabel6\";\n this.linkLabel6.Size = new System.Drawing.Size(65, 12);\n this.linkLabel6.TabIndex = 19;\n this.linkLabel6.TabStop = true;\n this.linkLabel6.Text = \"bestruirui\";\n this.linkLabel6.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel6_LinkClicked);\n // \n // linkLabel5\n // \n this.linkLabel5.AutoSize = true;\n this.linkLabel5.Location = new System.Drawing.Point(18, 19);\n this.linkLabel5.Name = \"linkLabel5\";\n this.linkLabel5.Size = new System.Drawing.Size(41, 12);\n this.linkLabel5.TabIndex = 18;\n this.linkLabel5.TabStop = true;\n this.linkLabel5.Text = \"beck-8\";\n this.linkLabel5.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel5_LinkClicked);\n // \n // groupBox4\n // \n this.groupBox4.Controls.Add(this.textBox1);\n this.groupBox4.Location = new System.Drawing.Point(12, 343);\n this.groupBox4.Name = \"groupBox4\";\n this.groupBox4.Size = new System.Drawing.Size(576, 270);\n this.groupBox4.TabIndex = 14;\n this.groupBox4.TabStop = false;\n this.groupBox4.Text = \"使用条款 与 免责声明\";\n // \n // textBox1\n // \n this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;\n this.textBox1.Location = new System.Drawing.Point(6, 20);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ReadOnly = true;\n this.textBox1.Size = new System.Drawing.Size(564, 244);\n this.textBox1.TabIndex = 0;\n this.textBox1.Text = resources.GetString(\"textBox1.Text\");\n // \n // label4\n // \n this.label4.AutoSize = true;\n this.label4.Location = new System.Drawing.Point(166, 79);\n this.label4.Name = \"label4\";\n this.label4.Size = new System.Drawing.Size(390, 12);\n this.label4.TabIndex = 18;\n this.label4.Text = \"公益项目!请给我一个免费的点赞和订阅!ヾ(≧∇≦*)ゝ万分感谢!!!\";\n // \n // about\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.AutoSize = true;\n this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\n this.ClientSize = new System.Drawing.Size(598, 651);\n this.Controls.Add(this.groupBox4);\n this.Controls.Add(this.button1);\n this.Controls.Add(this.groupBox3);\n this.Controls.Add(this.groupBox2);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.label1);\n this.MaximizeBox = false;\n this.MinimizeBox = false;\n this.Name = \"about\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"关于 SubsCheck Win GUI\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.groupBox2.ResumeLayout(false);\n this.groupBox2.PerformLayout();\n this.groupBox3.ResumeLayout(false);\n this.groupBox3.PerformLayout();\n this.groupBox4.ResumeLayout(false);\n this.groupBox4.PerformLayout();\n this.ResumeLayout(false);\n this.PerformLayout();\n\n }\n\n #endregion\n\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.Label label1;\n private System.Windows.Forms.Label label2;\n private System.Windows.Forms.Label label3;\n private System.Windows.Forms.Label label5;\n private System.Windows.Forms.LinkLabel linkLabel1;\n private System.Windows.Forms.Label label6;\n private System.Windows.Forms.Label label7;\n private System.Windows.Forms.LinkLabel linkLabel2;\n private System.Windows.Forms.Label label8;\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.LinkLabel linkLabel3;\n private System.Windows.Forms.Label label11;\n private System.Windows.Forms.Label label10;\n private System.Windows.Forms.Label label9;\n private System.Windows.Forms.LinkLabel linkLabel4;\n private System.Windows.Forms.Label label12;\n private System.Windows.Forms.Label label13;\n private System.Windows.Forms.GroupBox groupBox2;\n private System.Windows.Forms.Label label14;\n private System.Windows.Forms.GroupBox groupBox3;\n private System.Windows.Forms.LinkLabel linkLabel6;\n private System.Windows.Forms.LinkLabel linkLabel5;\n private System.Windows.Forms.Label label15;\n private System.Windows.Forms.LinkLabel linkLabel8;\n private System.Windows.Forms.GroupBox groupBox4;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.Label label4;\n }\n}"], ["/SubsCheck-Win-GUI/Form1.cs", "using Newtonsoft.Json.Linq;\nusing System;\nusing System.Collections.Generic;\nusing System.Data;\nusing System.Diagnostics;\nusing System.Drawing;\nusing System.IO;\nusing System.IO.Compression;\nusing System.Linq;\nusing System.Net.Http;\nusing System.Net.NetworkInformation;\nusing System.Runtime.InteropServices;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\n\nnamespace subs_check.win.gui\n{\n public partial class Form1: Form\n {\n //string 版本号;\n string 标题;\n private Process subsCheckProcess = null;\n string nodeInfo;//进度\n private Icon originalNotifyIcon; // 保存原始图标\n private ToolStripMenuItem startMenuItem;\n private ToolStripMenuItem stopMenuItem;\n string githubProxyURL = \"\";\n int run = 0;\n string 当前subsCheck版本号 = \"未知版本\";\n string 当前GUI版本号 = \"未知版本\";\n string 最新GUI版本号 = \"未知版本\";\n private string nextCheckTime = null;// 用于存储下次检查时间\n string WebUIapiKey = \"CMLiussss\";\n int downloading = 0;\n public Form1()\n {\n InitializeComponent();\n originalNotifyIcon = notifyIcon1.Icon;\n\n toolTip1.SetToolTip(numericUpDown1, \"并发线程数:推荐 宽带峰值/50M。\");\n toolTip1.SetToolTip(numericUpDown2, \"检查间隔时间(分钟):放置后台的时候,下次自动测速的间隔时间。\\n\\n 双击切换 使用「cron表达式」\");\n toolTip1.SetToolTip(label2, \"检查间隔时间(分钟):放置后台的时候,下次自动测速的间隔时间。\\n\\n 双击切换 使用「cron表达式」\");\n\n toolTip1.SetToolTip(numericUpDown3, \"超时时间(毫秒):节点的最大延迟。\");\n toolTip1.SetToolTip(numericUpDown4, \"最低测速结果舍弃(KB/s)。\");\n toolTip1.SetToolTip(numericUpDown5, \"下载测试时间(s):与下载链接大小相关,默认最大测试10s。\");\n toolTip1.SetToolTip(numericUpDown6, \"本地监听端口:用于直接返回测速结果的节点信息,方便 Sub-Store 实现订阅转换。\");\n toolTip1.SetToolTip(numericUpDown7, \"Sub-Store监听端口:用于订阅订阅转换。\\n注意:除非你知道你在干什么,否则不要将你的 Sub-Store 暴露到公网,否则可能会被滥用\");\n toolTip1.SetToolTip(textBox1, \"节点池订阅地址:支持 Link、Base64、Clash 格式的订阅链接。\");\n toolTip1.SetToolTip(checkBox1, \"以节点IP查询位置重命名节点。\\n质量差的节点可能造成IP查询失败,造成整体检查速度稍微变慢。\");\n toolTip1.SetToolTip(checkBox2, \"是否开启流媒体检测,其中IP欺诈依赖'节点地址查询',内核版本需要 v2.0.8 以上\\n\\n示例:美国1 | ⬇️ 5.6MB/s |0%|Netflix|Disney|Openai\\n风控值:0% (使用ping0.cc标准)\\n流媒体解锁:Netflix、Disney、Openai\");\n toolTip1.SetToolTip(comboBox3, \"GitHub 代理:代理订阅 GitHub raw 节点池。\");\n toolTip1.SetToolTip(comboBox2, \"测速地址:注意 并发数*节点速度<最大网速 否则测速结果不准确\\n尽量不要使用Speedtest,Cloudflare提供的下载链接,因为很多节点屏蔽测速网站。\");\n toolTip1.SetToolTip(textBox7, \"将测速结果推送到Worker的地址。\");\n toolTip1.SetToolTip(textBox6, \"Worker令牌。\");\n toolTip1.SetToolTip(comboBox1, \"测速结果的保存方法。\");\n toolTip1.SetToolTip(textBox2, \"Gist ID:注意!非Github用户名!\");\n toolTip1.SetToolTip(textBox3, \"Github TOKEN\");\n \n toolTip1.SetToolTip(comboBox4, \"通用订阅:内置了Sub-Store程序,自适应订阅格式。\\nClash订阅:带规则的 Mihomo、Clash 订阅格式。\");\n toolTip1.SetToolTip(comboBox5, \"生成带规则的 Clash 订阅所需的覆写规则文件\");\n\n toolTip1.SetToolTip(checkBox3, \"保存几个成功的节点,不选代表不限制,内核版本需要 v2.1.0 以上\\n如果你的并发数量超过这个参数,那么成功的结果可能会大于这个数值\");\n toolTip1.SetToolTip(numericUpDown8, \"保存几个成功的节点,不选代表不限制,内核版本需要 v2.1.0 以上\\n如果你的并发数量超过这个参数,那么成功的结果可能会大于这个数值\");\n\n toolTip1.SetToolTip(textBox11, \"支持标准cron表达式,如:\\n 0 */2 * * * 表示每2小时的整点执行\\n 0 0 */2 * * 表示每2天的0点执行\\n 0 0 1 * * 表示每月1日0点执行\\n */30 * * * * 表示每30分钟执行一次\\n\\n 双击切换 使用「分钟倒计时」\");\n\n toolTip1.SetToolTip(checkBox5, \"开机启动:勾选后,程序将在Windows启动时自动运行\");\n // 设置通知图标的上下文菜单\n SetupNotifyIconContextMenu();\n }\n\n private void SetupNotifyIconContextMenu()\n {\n // 创建上下文菜单\n ContextMenuStrip contextMenu = new ContextMenuStrip();\n\n // 创建\"▶️ 启动\"菜单项\n startMenuItem = new ToolStripMenuItem(\"启动\");\n startMenuItem.Click += (sender, e) =>\n {\n if (button1.Text == \"▶️ 启动\")\n {\n button1_Click(sender, e);\n }\n };\n\n // 创建\"⏹️ 停止\"菜单项\n stopMenuItem = new ToolStripMenuItem(\"停止\");\n stopMenuItem.Click += (sender, e) =>\n {\n if (button1.Text == \"⏹️ 停止\")\n {\n button1_Click(sender, e);\n }\n };\n stopMenuItem.Enabled = false; // 初始状态下禁用\n\n // 创建\"退出\"菜单项\n ToolStripMenuItem exitMenuItem = new ToolStripMenuItem(\"退出\");\n exitMenuItem.Click += async (sender, e) =>\n {\n try\n {\n // 如果程序正在运行,先停止它\n if (subsCheckProcess != null && !subsCheckProcess.HasExited)\n {\n await KillNodeProcessAsync();\n StopSubsCheckProcess();\n }\n\n // 确保通知图标被移除\n notifyIcon1.Visible = false;\n\n // 使用更直接的退出方式\n Environment.Exit(0);\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"退出程序时发生错误: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n\n // 如果仍然失败,尝试强制退出\n System.Diagnostics.Process.GetCurrentProcess().Kill();\n }\n };\n\n // 将菜单项添加到上下文菜单\n contextMenu.Items.Add(startMenuItem);\n contextMenu.Items.Add(stopMenuItem);\n contextMenu.Items.Add(new ToolStripSeparator()); // 分隔线\n contextMenu.Items.Add(exitMenuItem);\n\n // 将上下文菜单分配给通知图标\n notifyIcon1.ContextMenuStrip = contextMenu;\n\n // 确保通知图标可见\n notifyIcon1.Visible = true;\n }\n\n protected override void OnFormClosing(FormClosingEventArgs e)\n {\n if (e.CloseReason == CloseReason.UserClosing)\n {\n // 取消关闭操作\n e.Cancel = true;\n // 调用隐藏窗口方法\n 隐藏窗口();\n }\n }\n\n private async void timer1_Tick(object sender, EventArgs e)//初始化\n {\n timer1.Enabled = false;\n if (button2.Text == \"高级设置∧\") button2_Click(sender, e);\n // 检查并创建config文件夹\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string configFolderPath = System.IO.Path.Combine(executablePath, \"config\");\n if (!System.IO.Directory.Exists(configFolderPath))\n {\n // 文件不存在,可以给用户反馈\n string 免责声明 = \"SubsCheck-Win-GUI 项目仅供教育、研究和安全测试目的而设计和开发。本项目旨在为安全研究人员、学术界人士及技术爱好者提供一个探索和实践网络通信技术的工具。\\r\\n在下载和使用本项目代码时,使用者必须严格遵守其所适用的法律和规定。使用者有责任确保其行为符合所在地区的法律框架、规章制度及其他相关规定。\\r\\n\\r\\n使用条款\\r\\n\\r\\n教育与研究用途:本软件仅可用于网络技术和编程领域的学习、研究和安全测试。\\r\\n禁止非法使用:严禁将 SubsCheck-Win-GUI 用于任何非法活动或违反使用者所在地区法律法规的行为。\\r\\n使用时限:基于学习和研究目的,建议用户在完成研究或学习后,或在安装后的24小时内,删除本软件及所有相关文件。\\r\\n免责声明:SubsCheck-Win-GUI 的创建者和贡献者不对因使用或滥用本软件而导致的任何损害或法律问题负责。\\r\\n用户责任:用户对使用本软件的方式以及由此产生的任何后果完全负责。\\r\\n无技术支持:本软件的创建者不提供任何技术支持或使用协助。\\r\\n知情同意:使用 SubsCheck-Win-GUI 即表示您已阅读并理解本免责声明,并同意受其条款的约束。\\r\\n\\r\\n请记住:本软件的主要目的是促进学习、研究和安全测试。创作者不支持或认可任何其他用途。使用者应当在合法和负责任的前提下使用本工具。\\r\\n\\r\\n同意以上条款请点击\\\"是 / Yes\\\",否则程序将退出。\";\n\n // 显示带有 \"同意\" 和 \"拒绝\" 选项的对话框\n DialogResult result = MessageBox.Show(免责声明, \"SubsCheck-Win-GUI 免责声明\", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\n\n // 如果用户点击 \"拒绝\" (对应于 No 按钮)\n if (result == DialogResult.No)\n {\n // 退出程序\n Environment.Exit(0); // 立即退出程序\n }\n System.IO.Directory.CreateDirectory(configFolderPath);\n }\n\n FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location);\n 当前GUI版本号 = \"v\" + myFileVersionInfo.FileVersion;\n 最新GUI版本号 = 当前GUI版本号;\n 标题 = \"SubsCheck Win GUI \" + 当前GUI版本号;\n this.Text = 标题;// + \" TG:CMLiussss BY:CM喂饭 干货满满\";\n comboBox1.Text = \"本地\";\n comboBox4.Text = \"通用订阅\";\n ReadConfig();\n\n if (CheckCommandLineParameter(\"-auto\"))\n {\n Log(\"检测到开机启动,准备执行任务...\");\n button1_Click(this, EventArgs.Empty);\n this.Hide();\n notifyIcon1.Visible = true;\n } else await CheckGitHubVersionAsync();\n }\n\n private async Task CheckGitHubVersionAsync()\n {\n try\n {\n // 首先检查是否有网络连接\n if (!IsNetworkAvailable())\n {\n return; // 静默返回,不显示错误\n }\n\n var result = await 获取版本号(\"https://api.github.com/repos/cmliu/SubsCheck-Win-GUI/releases/latest\");\n if (result.Item1 != \"未知版本\") \n {\n string latestVersion = result.Item1;\n if (latestVersion != 当前GUI版本号)\n {\n 最新GUI版本号 = latestVersion;\n 标题 = \"SubsCheck Win GUI \" + 当前GUI版本号 + $\" 发现新版本: {最新GUI版本号} 请及时更新!\";\n this.Text = 标题;\n }\n }\n }\n catch\n {\n // 静默处理任何其他异常\n return;\n }\n }\n\n // 添加检查网络连接的辅助方法\n private bool IsNetworkAvailable()\n {\n try\n {\n return NetworkInterface.GetIsNetworkAvailable();\n }\n catch\n {\n return false; // 如果无法检查网络状态,假设网络不可用\n }\n }\n\n private async void ReadConfig()//读取配置文件\n {\n checkBox5.CheckedChanged -= checkBox5_CheckedChanged;// 临时移除事件处理器,防止触发事件\n try\n {\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string configFilePath = Path.Combine(executablePath, \"config\", \"config.yaml\");\n\n if (File.Exists(configFilePath))\n {\n // 读取YAML文件内容\n string yamlContent = File.ReadAllText(configFilePath);\n\n // 使用YamlDotNet解析YAML\n var deserializer = new YamlDotNet.Serialization.Deserializer();\n var config = deserializer.Deserialize>(yamlContent);\n\n // 使用新函数获取整数值并设置UI控件\n int? concurrentValue = 读取config整数(config, \"concurrent\");\n if (concurrentValue.HasValue) numericUpDown1.Value = concurrentValue.Value;\n\n int? checkIntervalValue = 读取config整数(config, \"check-interval\");\n if (checkIntervalValue.HasValue) numericUpDown2.Value = checkIntervalValue.Value;\n\n int? timeoutValue = 读取config整数(config, \"timeout\");\n if (timeoutValue.HasValue) numericUpDown3.Value = timeoutValue.Value;\n\n int? minspeedValue = 读取config整数(config, \"min-speed\");\n if (minspeedValue.HasValue) numericUpDown4.Value = minspeedValue.Value;\n\n int? downloadtimeoutValue = 读取config整数(config, \"download-timeout\");\n if (downloadtimeoutValue.HasValue) numericUpDown5.Value = downloadtimeoutValue.Value;\n\n string speedTestUrl = 读取config字符串(config, \"speed-test-url\");\n if (speedTestUrl != null) comboBox2.Text = speedTestUrl;\n\n string savemethod = 读取config字符串(config, \"save-method\");\n if (savemethod != null)\n {\n if (savemethod == \"local\") comboBox1.Text = \"本地\";\n else comboBox1.Text = savemethod;\n }\n\n string listenport = 读取config字符串(config, \"listen-port\");\n if (listenport != null)\n {\n // 查找最后一个冒号的位置\n int colonIndex = listenport.LastIndexOf(':');\n if (colonIndex >= 0 && colonIndex < listenport.Length - 1)\n {\n // 提取冒号后面的部分作为端口号\n string portStr = listenport.Substring(colonIndex + 1);\n if (decimal.TryParse(portStr, out decimal port))\n {\n numericUpDown6.Value = port;\n }\n }\n }\n\n /*\n int? substoreport = 读取config整数(config, \"sub-store-port\");\n if (substoreport.HasValue) numericUpDown7.Value = substoreport.Value;\n */\n\n string substoreport = 读取config字符串(config, \"sub-store-port\");\n if (substoreport != null)\n {\n // 查找最后一个冒号的位置\n int colonIndex = substoreport.LastIndexOf(':');\n if (colonIndex >= 0 && colonIndex < substoreport.Length - 1)\n {\n // 提取冒号后面的部分作为端口号\n string portStr = substoreport.Substring(colonIndex + 1);\n if (decimal.TryParse(portStr, out decimal port))\n {\n numericUpDown7.Value = port;\n }\n }\n }\n\n string githubproxy = 读取config字符串(config, \"githubproxy\");\n if (githubproxy != null) comboBox3.Text = githubproxy;\n\n const string githubRawPrefix = \"https://raw.githubusercontent.com/\";\n\n string mihomoOverwriteUrl = 读取config字符串(config, \"mihomo-overwrite-url\");\n int mihomoOverwriteUrlIndex = mihomoOverwriteUrl.IndexOf(githubRawPrefix);\n if (mihomoOverwriteUrl != null)\n {\n if (mihomoOverwriteUrl.Contains(\"http://127.0.0\"))\n {\n if (mihomoOverwriteUrl.EndsWith(\"bdg.yaml\", StringComparison.OrdinalIgnoreCase))\n {\n comboBox5.Text = \"[内置]布丁狗的订阅转换\";\n await ProcessComboBox5Selection();\n }\n else if (mihomoOverwriteUrl.EndsWith(\"ACL4SSR_Online_Full.yaml\", StringComparison.OrdinalIgnoreCase))\n {\n comboBox5.Text = \"[内置]ACL4SSR_Online_Full\";\n await ProcessComboBox5Selection();\n }\n }\n else if (mihomoOverwriteUrlIndex > 0) comboBox5.Text = mihomoOverwriteUrl.Substring(mihomoOverwriteUrlIndex);\n else comboBox5.Text = mihomoOverwriteUrl;\n }\n\n // 处理URLs,检查是否包含GitHub raw链接\n List subUrls = 读取config列表(config, \"sub-urls\");\n if (subUrls != null && subUrls.Count > 0)\n {\n // 创建一个新的过滤后的列表\n var filteredUrls = new List();\n\n for (int i = 0; i < subUrls.Count; i++)\n {\n // 排除本地URL\n string localUrlPattern = $\"http://127.0.0.1:{numericUpDown6.Value}/all.yaml\";\n if (!subUrls[i].Equals(localUrlPattern, StringComparison.OrdinalIgnoreCase))\n {\n // 处理GitHub raw链接\n int index = subUrls[i].IndexOf(githubRawPrefix);\n if (index > 0) // 如果找到且不在字符串开头\n {\n // 只保留从githubRawPrefix开始的部分\n filteredUrls.Add(subUrls[i].Substring(index));\n }\n else\n {\n // 如果不是GitHub链接,直接添加\n filteredUrls.Add(subUrls[i]);\n }\n }\n }\n\n // 将过滤后的列表中的每个URL放在单独的行上\n textBox1.Text = string.Join(Environment.NewLine, filteredUrls);\n }\n\n string renamenode = 读取config字符串(config, \"rename-node\");\n if (renamenode != null && renamenode == \"true\") checkBox1.Checked = true;\n else checkBox1.Checked = false;\n\n string mediacheck = 读取config字符串(config, \"media-check\");\n if (mediacheck != null && mediacheck == \"true\") checkBox2.Checked = true;\n else checkBox2.Checked = false;\n\n string githubgistid = 读取config字符串(config, \"github-gist-id\");\n if (githubgistid != null) textBox2.Text = githubgistid;\n string githubtoken = 读取config字符串(config, \"github-token\");\n if (githubtoken != null) textBox3.Text = githubtoken;\n\n string githubapimirror = 读取config字符串(config, \"github-api-mirror\");\n if (githubapimirror != null) textBox4.Text = githubapimirror;\n\n string workerurl = 读取config字符串(config, \"worker-url\");\n if (workerurl != null) textBox7.Text = workerurl;\n string workertoken = 读取config字符串(config, \"worker-token\");\n if (workertoken != null) textBox6.Text = workertoken;\n\n string webdavusername = 读取config字符串(config, \"webdav-username\");\n if (webdavusername != null) textBox9.Text = webdavusername;\n string webdavpassword = 读取config字符串(config, \"webdav-password\");\n if (webdavpassword != null) textBox8.Text = webdavpassword;\n string webdavurl = 读取config字符串(config, \"webdav-url\");\n if (webdavurl != null) textBox5.Text = webdavurl;\n\n string subscheckversion = 读取config字符串(config, \"subscheck-version\");\n if (subscheckversion != null) 当前subsCheck版本号 = subscheckversion;\n\n int? successlimit = 读取config整数(config, \"success-limit\");\n if (successlimit.HasValue)\n {\n if (successlimit.Value == 0)\n {\n checkBox3.Checked = false;\n numericUpDown8.Enabled = false;\n }\n else\n {\n checkBox3.Checked = true;\n numericUpDown8.Enabled = true;\n numericUpDown8.Value = successlimit.Value;\n }\n }\n\n string enablewebui = 读取config字符串(config, \"enable-web-ui\");\n if (enablewebui != null && enablewebui == \"true\") checkBox4.Checked = true;\n else checkBox4.Checked = false;\n\n string apikey = 读取config字符串(config, \"api-key\");\n if (apikey != null)\n {\n if (apikey == GetComputerNameMD5())\n {\n checkBox4.Checked = false;\n string oldapikey = 读取config字符串(config, \"old-api-key\");\n if (oldapikey != null)\n {\n textBox10.Text = oldapikey;\n }\n else\n {\n textBox10.PasswordChar = '\\0';\n textBox10.Text = \"请输入密钥\";\n textBox10.ForeColor = Color.Gray;\n }\n }\n else\n {\n textBox10.Text = apikey;\n }\n }\n\n string cronexpression = 读取config字符串(config, \"cron-expression\");\n if (cronexpression != null)\n {\n textBox11.Text = cronexpression;\n string cronDescription = GetCronExpressionDescription(textBox11.Text);\n textBox11.Location = new Point(9, 48);\n textBox11.Visible = true;\n label2.Visible = false;\n numericUpDown2.Visible = false;\n }\n\n string guiauto = 读取config字符串(config, \"gui-auto\");\n if (guiauto != null && guiauto == \"true\") checkBox5.Checked = true;\n else checkBox5.Checked = false;\n }\n else\n {\n comboBox3.Text = \"自动选择\";\n comboBox5.Text = \"[内置]布丁狗的订阅转换\";\n }\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"读取配置文件时发生错误: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n checkBox5.CheckedChanged += checkBox5_CheckedChanged;// 重新绑定事件处理器\n }\n\n private int? 读取config整数(Dictionary config, string fieldName)\n {\n // 检查是否存在指定字段且不为null\n if (config.ContainsKey(fieldName) && config[fieldName] != null)\n {\n int value;\n if (int.TryParse(config[fieldName].ToString(), out value))\n return value;\n }\n return null;\n }\n\n private string 读取config字符串(Dictionary config, string fieldName)\n {\n // 检查是否存在指定字段且不为null\n if (config.ContainsKey(fieldName) && config[fieldName] != null)\n {\n return config[fieldName].ToString();\n }\n return null;\n }\n\n private List 读取config列表(Dictionary config, string fieldName)\n {\n // 检查是否存在指定字段且不为null\n if (config.ContainsKey(fieldName) && config[fieldName] != null)\n {\n // 尝试将对象转换为列表\n if (config[fieldName] is List listItems)\n {\n return listItems.Select(item => item?.ToString()).Where(s => !string.IsNullOrEmpty(s)).ToList();\n }\n }\n return null;\n }\n\n private async Task SaveConfig(bool githubProxyCheck = true)//保存配置文件\n {\n try\n {\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string configFilePath = Path.Combine(executablePath, \"config\", \"config.yaml\");\n\n // 创建配置字典\n var config = new Dictionary();\n\n // 从UI控件获取值并添加到字典中\n config[\"concurrent\"] = (int)numericUpDown1.Value;\n config[\"check-interval\"] = (int)numericUpDown2.Value;\n if (textBox11.Visible) config[\"cron-expression\"] = textBox11.Text;\n config[\"timeout\"] = (int)numericUpDown3.Value;\n config[\"min-speed\"] = (int)numericUpDown4.Value;\n config[\"download-timeout\"] = (int)numericUpDown5.Value;\n\n if (!string.IsNullOrEmpty(comboBox2.Text)) config[\"speed-test-url\"] = comboBox2.Text;\n\n // 保存save-method,将\"本地\"转换为\"local\"\n config[\"save-method\"] = comboBox1.Text == \"本地\" ? \"local\" : comboBox1.Text;\n\n // 保存gist参数\n config[\"github-gist-id\"] = textBox2.Text;\n config[\"github-token\"] = textBox3.Text;\n\n config[\"github-api-mirror\"] = textBox4.Text;\n\n // 保存r2参数\n config[\"worker-url\"] = textBox7.Text;\n config[\"worker-token\"] = textBox6.Text;\n\n // 保存webdav参数\n config[\"webdav-username\"] = textBox9.Text;\n config[\"webdav-password\"] = textBox8.Text;\n config[\"webdav-url\"] = textBox5.Text;\n\n // 保存enable-web-ui\n config[\"enable-web-ui\"] = true;\n\n // 保存listen-port\n if (checkBox4.Checked) \n {\n WebUIapiKey = textBox10.Text;\n config[\"listen-port\"] = $@\":{numericUpDown6.Value}\";\n }\n else\n {\n WebUIapiKey = GetComputerNameMD5();\n config[\"listen-port\"] = $@\"127.0.0.1:{numericUpDown6.Value}\";\n if (textBox10.Text != \"请输入密钥\") config[\"old-api-key\"] = textBox10.Text;\n }\n config[\"api-key\"] = WebUIapiKey;\n\n // 保存sub-store-port\n config[\"sub-store-port\"] = $@\":{numericUpDown7.Value}\";\n\n string githubRawPrefix = \"https://raw.githubusercontent.com/\";\n if (githubProxyCheck)\n {\n // 检查并处理 GitHub Raw URLs\n if (comboBox3.Text == \"自动选择\")\n {\n // 创建不包含\"自动选择\"的代理列表\n List proxyItems = new List();\n for (int j = 0; j < comboBox3.Items.Count; j++)\n {\n string proxyItem = comboBox3.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n\n // 随机打乱列表顺序\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n\n // 异步检测可用代理\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n }\n }\n\n if (comboBox3.Text != \"自动选择\") githubProxyURL = $\"https://{comboBox3.Text}/\";\n config[\"githubproxy\"] = comboBox3.Text;\n config[\"github-proxy\"] = githubProxyURL;\n\n // 保存sub-urls列表\n List subUrls = new List();\n string allyamlFilePath = System.IO.Path.Combine(executablePath, \"output\", \"all.yaml\");\n if (System.IO.File.Exists(allyamlFilePath))\n {\n subUrls.Add($\"http://127.0.0.1:{numericUpDown6.Value}/all.yaml\");\n Log(\"已加载上次测试结果。\");\n }\n\n if (!string.IsNullOrEmpty(textBox1.Text))\n {\n subUrls.AddRange(textBox1.Text.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList());\n // 处理URLs\n for (int i = 0; i < subUrls.Count; i++)\n {\n if (subUrls[i].StartsWith(githubRawPrefix) && !string.IsNullOrEmpty(githubProxyURL))\n {\n // 替换为代理 URL 格式\n //subUrls[i] = githubProxyURL + githubRawPrefix + subUrls[i].Substring(githubRawPrefix.Length);\n // 使用subs-check内置github-proxy参数\n subUrls[i] = githubRawPrefix + subUrls[i].Substring(githubRawPrefix.Length);\n }\n }\n }\n\n config[\"sub-urls\"] = subUrls;\n\n // 处理配置文件下载与配置\n if (comboBox5.Text.Contains(\"[内置]\"))\n {\n // 确定文件名和下载URL\n string fileName;\n string downloadFilePath;\n string downloadUrl;\n string displayName;\n\n if (comboBox5.Text.Contains(\"[内置]布丁狗\"))\n {\n fileName = \"bdg.yaml\";\n displayName = \"[内置]布丁狗的订阅转换\";\n downloadUrl = \"https://raw.githubusercontent.com/cmliu/ACL4SSR/main/yaml/bdg.yaml\";\n }\n else // [内置]ACL4SSR\n {\n fileName = \"ACL4SSR_Online_Full.yaml\";\n displayName = \"[内置]ACL4SSR_Online_Full\";\n downloadUrl = \"https://raw.githubusercontent.com/beck-8/override-hub/main/yaml/ACL4SSR_Online_Full.yaml\";\n }\n\n // 确保output文件夹存在\n string outputFolderPath = Path.Combine(executablePath, \"output\");\n if (!Directory.Exists(outputFolderPath))\n {\n Directory.CreateDirectory(outputFolderPath);\n }\n\n // 确定文件完整路径\n downloadFilePath = Path.Combine(outputFolderPath, fileName);\n if (!File.Exists(downloadFilePath)) await ProcessComboBox5Selection();\n\n // 检查文件是否存在\n if (!File.Exists(downloadFilePath))\n {\n Log($\"{displayName} 覆写配置文件 未找到,将使用在线版本。\");\n config[\"mihomo-overwrite-url\"] = githubProxyURL + downloadUrl;\n }\n else\n {\n Log($\"{displayName} 覆写配置文件 加载成功。\");\n config[\"mihomo-overwrite-url\"] = $\"http://127.0.0.1:{numericUpDown6.Value}/{fileName}\";\n }\n }\n else if (comboBox5.Text.StartsWith(githubRawPrefix)) config[\"mihomo-overwrite-url\"] = githubProxyURL + comboBox5.Text;\n else config[\"mihomo-overwrite-url\"] = comboBox5.Text != \"\" ? comboBox5.Text : $\"http://127.0.0.1:{numericUpDown6.Value}/ACL4SSR_Online_Full.yaml\";\n \n config[\"rename-node\"] = checkBox1.Checked;//以节点IP查询位置重命名节点\n config[\"media-check\"] = checkBox2.Checked;//是否开启流媒体检测\n config[\"keep-success-proxies\"] = false;\n config[\"print-progress\"] = false;//是否显示进度\n config[\"sub-urls-retry\"] = 3;//重试次数(获取订阅失败后重试次数)\n config[\"subscheck-version\"] = 当前subsCheck版本号;//当前subsCheck版本号\n\n config[\"gui-auto\"] = checkBox5.Checked;//是否开机自启\n\n //保存几个成功的节点,为0代表不限制 \n if (checkBox3.Checked) config[\"success-limit\"] = (int)numericUpDown8.Value;\n else config[\"success-limit\"] = 0;\n\n // 使用YamlDotNet序列化配置\n var serializer = new YamlDotNet.Serialization.SerializerBuilder()\n .WithIndentedSequences() // 使序列化结果更易读\n .Build();\n\n string yamlContent = serializer.Serialize(config);\n\n // 确保配置目录存在\n string configDirPath = Path.GetDirectoryName(configFilePath);\n if (!Directory.Exists(configDirPath))\n Directory.CreateDirectory(configDirPath);\n\n string moreYamlPath = Path.Combine(configDirPath, \"more.yaml\");\n if (File.Exists(moreYamlPath))\n {\n // 读取more.yaml的内容\n string moreYamlContent = File.ReadAllText(moreYamlPath);\n\n // 确保more.yaml内容以换行开始\n if (!moreYamlContent.StartsWith(\"\\n\") && !moreYamlContent.StartsWith(\"\\r\\n\"))\n {\n yamlContent += \"\\n\"; // 添加换行符作为分隔\n }\n\n // 将more.yaml的内容追加到要写入的config.yaml内容后\n yamlContent += moreYamlContent;\n\n Log($\"已将补充参数配置 more.yaml 内容追加到配置文件\");\n }\n // 写入YAML文件\n File.WriteAllText(configFilePath, yamlContent);\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"保存配置文件时发生错误: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n if (button2.Text == \"高级设置∧\")\n {\n button2.Text = \"高级设置∨\";\n groupBox3.Visible = false;\n }\n else\n {\n button2.Text = \"高级设置∧\";\n groupBox3.Visible = true;\n }\n 判断保存类型();\n }\n\n private async void button1_Click(object sender, EventArgs e)\n {\n button1.Enabled = false;\n if (button1.Text == \"▶️ 启动\") \n {\n if (checkBox4.Checked && textBox10.Text == \"请输入密钥\")\n {\n MessageBox.Show(\"您已启用WebUI,请设置WebUI API密钥!\", \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Warning);\n return;\n }\n run = 1;\n if (button3.Enabled==false)\n {\n string executablePath = Path.GetDirectoryName(Application.ExecutablePath);\n string allyamlFilePath = Path.Combine(executablePath, \"output\", \"all.yaml\");\n button3.Enabled = File.Exists(allyamlFilePath);\n }\n\n numericUpDown1.Enabled = false;\n numericUpDown2.Enabled = false;\n textBox11.Enabled = false;\n numericUpDown3.Enabled = false;\n numericUpDown4.Enabled = false;\n numericUpDown5.Enabled = false;\n numericUpDown6.Enabled = false;\n numericUpDown7.Enabled = false;\n comboBox1.Enabled = false;\n textBox1.Enabled = false;\n groupBox3.Enabled = false;\n groupBox4.Enabled = false;\n groupBox5.Enabled = false;\n groupBox6.Enabled = false;\n if (checkBox4.Checked) button6.Enabled = true;\n button1.Text = \"⏹️ 停止\";\n //timer3.Enabled = true;\n // 清空 richTextBox1\n richTextBox1.Clear();\n await KillNodeProcessAsync();\n await SaveConfig();\n\n if (run == 1) \n {\n // 更新菜单项的启用状态\n startMenuItem.Enabled = false;\n stopMenuItem.Enabled = true;\n\n // 清空 richTextBox1\n //richTextBox1.Clear();\n\n notifyIcon1.Text = \"SubsCheck: 已就绪\";\n\n // 启动 subs-check.exe 程序\n StartSubsCheckProcess();\n }\n }\n else\n {\n run = 0;\n Log(\"任务停止\");\n progressBar1.Value = 0;\n groupBox2.Text = \"实时日志\";\n notifyIcon1.Text = \"SubsCheck: 未运行\";\n // 停止 subs-check.exe 程序\n StopSubsCheckProcess();\n // 结束 Sub-Store\n await KillNodeProcessAsync();\n if (checkBox4.Checked) ReadConfig();\n button3.Enabled = false;\n numericUpDown1.Enabled = true;\n numericUpDown2.Enabled = true;\n textBox11.Enabled = true;\n numericUpDown3.Enabled = true;\n numericUpDown4.Enabled = true;\n numericUpDown5.Enabled = true;\n numericUpDown6.Enabled = true;\n numericUpDown7.Enabled = true;\n comboBox1.Enabled = true;\n textBox1.Enabled = true;\n groupBox3.Enabled = true;\n groupBox4.Enabled = true;\n groupBox5.Enabled = true;\n groupBox6.Enabled = true;\n button6.Enabled = false;\n button1.Text = \"▶️ 启动\";\n //timer3.Enabled = false;\n // 更新菜单项的启用状态\n startMenuItem.Enabled = true;\n stopMenuItem.Enabled = false;\n }\n if (downloading == 0) button1.Enabled = true;\n }\n\n private async Task DownloadSubsCheckEXE()\n {\n button1.Enabled = false;\n downloading = 1;\n try\n {\n Log(\"正在检查网络连接...\");\n\n // 首先检查是否有网络连接\n if (!IsNetworkAvailable())\n {\n Log(\"网络连接不可用,无法下载核心文件。\", true);\n MessageBox.Show(\"缺少 subs-check.exe 核心文件。\\n\\n您可以前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n return;\n }\n\n var result = await 获取版本号(\"https://api.github.com/repos/beck-8/subs-check/releases/latest\", true);\n if (result.Item1 != \"未知版本\") \n {\n // 创建不使用系统代理的 HttpClientHandler\n HttpClientHandler handler = new HttpClientHandler\n {\n UseProxy = false,\n Proxy = null\n };\n\n // 使用自定义 handler 创建 HttpClient\n using (HttpClient client = new HttpClient(handler)) \n {\n try\n {\n string latestVersion = result.Item1;\n JArray assets = result.Item2;\n Log($\"subs-check.exe 最新版本为: {latestVersion} \");\n // 查找Windows i386版本的资源\n string downloadUrl = null;\n\n foreach (var asset in assets)\n {\n if (asset[\"name\"].ToString() == \"subs-check_Windows_i386.zip\")\n {\n downloadUrl = asset[\"browser_download_url\"].ToString();\n break;\n }\n }\n\n if (downloadUrl != null)\n {\n string 代理下载链接 = githubProxyURL + downloadUrl;\n string 原生下载链接 = 代理下载链接;\n // 计算\"https://\"在下载链接中出现的次数\n int httpsCount = 0;\n int lastIndex = -1;\n int currentIndex = 0;\n\n // 查找所有\"https://\"出现的位置\n while ((currentIndex = 代理下载链接.IndexOf(\"https://\", currentIndex)) != -1)\n {\n httpsCount++;\n lastIndex = currentIndex;\n currentIndex += 8; // \"https://\".Length = 8\n }\n\n // 如果\"https://\"出现2次或以上,提取最后一个\"https://\"之后的内容\n if (httpsCount >= 2 && lastIndex != -1)\n {\n 原生下载链接 = 代理下载链接.Substring(lastIndex);\n }\n\n string executablePath = Path.GetDirectoryName(Application.ExecutablePath);\n\n // 创建下载请求 - 优化的多级尝试下载逻辑\n Log(\"开始下载文件...\");\n bool downloadSuccess = false;\n string zipFilePath = Path.Combine(executablePath, \"subs-check_Windows_i386.zip\");\n string failureReason = \"\";\n\n // 如果文件已存在,先删除\n if (File.Exists(zipFilePath)) File.Delete(zipFilePath);\n\n // 第一次尝试:使用代理下载链接 + 当前HttpClient(不使用系统代理)\n try\n {\n Log($\"[尝试1/4] 使用代理下载链接:{代理下载链接}\");\n downloadSuccess = await DownloadFileAsync(client, 代理下载链接, zipFilePath);\n }\n catch (Exception ex)\n {\n Log($\"[尝试1/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n\n // 如果第一次尝试失败,且代理链接与原生链接不同,使用原生下载链接尝试\n if (!downloadSuccess && 代理下载链接 != 原生下载链接)\n {\n try\n {\n Log($\"[尝试2/4] 使用原生下载链接:{原生下载链接}\");\n downloadSuccess = await DownloadFileAsync(client, 原生下载链接, zipFilePath);\n }\n catch (Exception ex)\n {\n Log($\"[尝试2/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n }\n\n // 如果前面的尝试都失败,创建使用系统代理的HttpClient再次尝试\n if (!downloadSuccess)\n {\n try\n {\n Log(\"[尝试3/4] 使用系统代理 + 代理下载链接\");\n using (HttpClient proxyClient = new HttpClient())\n {\n proxyClient.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n proxyClient.Timeout = TimeSpan.FromSeconds(30);\n\n downloadSuccess = await DownloadFileAsync(proxyClient, 代理下载链接, zipFilePath);\n }\n }\n catch (Exception ex)\n {\n Log($\"[尝试3/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n\n // 最后一次尝试:使用系统代理 + 原生链接(如果不同)\n if (!downloadSuccess && 代理下载链接 != 原生下载链接)\n {\n try\n {\n Log(\"[尝试4/4] 使用系统代理 + 原生下载链接\");\n using (HttpClient proxyClient = new HttpClient())\n {\n proxyClient.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n proxyClient.Timeout = TimeSpan.FromSeconds(30);\n\n downloadSuccess = await DownloadFileAsync(proxyClient, 原生下载链接, zipFilePath);\n }\n }\n catch (Exception ex)\n {\n Log($\"[尝试4/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n }\n }\n\n if (downloadSuccess)\n {\n Log(\"下载完成,正在解压文件...\");\n\n // 解压文件的代码保持不变\n using (System.IO.Compression.ZipArchive archive = System.IO.Compression.ZipFile.OpenRead(zipFilePath))\n {\n // 查找subs-check.exe\n System.IO.Compression.ZipArchiveEntry exeEntry = archive.Entries.FirstOrDefault(\n entry => entry.Name.Equals(\"subs-check.exe\", StringComparison.OrdinalIgnoreCase));\n\n if (exeEntry != null)\n {\n string exeFilePath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 如果文件已存在,先删除\n if (File.Exists(exeFilePath))\n {\n File.Delete(exeFilePath);\n }\n\n // 解压文件\n exeEntry.ExtractToFile(exeFilePath);\n 当前subsCheck版本号 = latestVersion;\n Log($\"subs-check.exe {当前subsCheck版本号} 已就绪!\");\n\n await SaveConfig(false);\n\n // 删除下载的zip文件\n //File.Delete(zipFilePath);\n }\n else\n {\n Log(\"无法在压缩包中找到 subs-check.exe 文件。\", true);\n }\n }\n }\n else\n {\n // 所有尝试都失败\n Log($\"所有下载尝试均失败,最后错误: {failureReason}\", true);\n MessageBox.Show($\"下载 subs-check.exe 失败,请检查网络连接后重试。\\n\\n可尝试更换 Github Proxy 后,点击「检查更新」>「更新内核」。\\n或前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"下载失败\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n progressBar1.Value = 0;\n }\n\n // 解压文件\n using (System.IO.Compression.ZipArchive archive = System.IO.Compression.ZipFile.OpenRead(zipFilePath))\n {\n // 查找subs-check.exe\n System.IO.Compression.ZipArchiveEntry exeEntry = archive.Entries.FirstOrDefault(\n entry => entry.Name.Equals(\"subs-check.exe\", StringComparison.OrdinalIgnoreCase));\n\n if (exeEntry != null)\n {\n string exeFilePath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 如果文件已存在,先删除\n if (File.Exists(exeFilePath))\n {\n File.Delete(exeFilePath);\n }\n\n // 解压文件\n exeEntry.ExtractToFile(exeFilePath);\n 当前subsCheck版本号 = latestVersion;\n Log($\"subs-check.exe {当前subsCheck版本号} 已就绪!\");\n\n await SaveConfig(false);\n // 这里保留原有行为,不修改button1.Enabled\n\n // 删除下载的zip文件\n //File.Delete(zipFilePath);\n }\n else\n {\n Log(\"无法在压缩包中找到 subs-check.exe 文件。\", true);\n }\n }\n }\n else\n {\n Log(\"无法找到适用于 Windows i386 的下载链接。\", true);\n MessageBox.Show(\"未能找到适用的 subs-check.exe 下载链接。\\n\\n可尝试更换 Github Proxy 后,点击「检查更新」>「更新内核」。\\n或前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n }\n catch (Exception ex)\n {\n Log($\"下载过程中出错: {ex.Message}\", true);\n MessageBox.Show($\"下载 subs-check.exe 时出错: {ex.Message}\\n\\n可尝试更换 Github Proxy 后,点击「检查更新」>「更新内核」。\\n或前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n } \n }\n catch (Exception ex)\n {\n Log($\"初始化下载过程出错: {ex.Message}\", true);\n MessageBox.Show($\"下载准备过程出错: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n\n button1.Enabled = true;\n downloading = 0;\n }\n\n /// \n /// 获取最新版本号和对应的下载链接\n /// \n /// API请求URL\n /// 是否在日志中输出信息\n /// 包含最新版本号和下载链接的元组\n private async Task<(string LatestVersion, JArray assets)> 获取版本号(string 版本号URL, bool 是否输出log = false)\n {\n string latestVersion = \"未知版本\";\n JArray assets = null;\n\n // 创建不使用系统代理的 HttpClientHandler\n HttpClientHandler handler = new HttpClientHandler\n {\n UseProxy = false,\n Proxy = null\n };\n\n // 使用自定义 handler 创建 HttpClient\n using (HttpClient client = new HttpClient(handler))\n {\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n client.Timeout = TimeSpan.FromSeconds(30); // 增加超时时间以适应下载需求\n\n if (是否输出log) Log(\"正在获取最新版本 subs-check.exe 内核下载地址...\");\n string url = 版本号URL;\n string 备用url = 版本号URL.Replace(\"api.github.com\", \"api.github.cmliussss.net\");\n\n HttpResponseMessage response = null;\n string responseBody = null;\n JObject json = null;\n\n // 先尝试主URL\n try\n {\n response = await client.GetAsync(url);\n\n // 如果主URL请求成功返回有效数据\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从主API获取版本信息\");\n }\n // 如果主URL请求不成功但没有抛出异常\n else\n {\n if (是否输出log) Log($\"主API请求失败 HTTP {(int)response.StatusCode},尝试备用API...\");\n response = await client.GetAsync(备用url);\n\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用API获取版本信息\");\n }\n else\n {\n if (是否输出log) Log($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return (latestVersion, assets); // 两个URL都失败,提前退出\n }\n }\n }\n // 捕获网络请求异常(如连接超时、无法解析域名等)\n catch (HttpRequestException ex)\n {\n if (是否输出log) Log($\"主API请求出错: {ex.Message},尝试备用API...\");\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用API获取版本信息\");\n }\n else\n {\n if (是否输出log) Log($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return (latestVersion, assets); // 备用URL也失败,提前退出\n }\n }\n catch (Exception backupEx)\n {\n if (是否输出log) Log($\"备用API请求也出错: {backupEx.Message}\", true);\n return (latestVersion, assets); // 连备用URL也异常,提前退出\n }\n }\n // 捕获JSON解析异常\n catch (Newtonsoft.Json.JsonException ex)\n {\n if (是否输出log) Log($\"解析JSON数据出错: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用API获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n if (是否输出log) Log($\"备用API请求也出错: {backupEx.Message}\", true);\n return (latestVersion, assets); // 连备用URL也有问题,提前退出\n }\n }\n // 捕获其他所有异常\n catch (Exception ex)\n {\n if (是否输出log) Log($\"获取版本信息时出现未预期的错误: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用URL获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n if (是否输出log) Log($\"备用API请求也出错: {backupEx.Message}\", true);\n return (latestVersion, assets); // 连备用URL也有问题,提前退出\n }\n }\n\n // 如果成功获取了JSON数据,继续处理\n if (json != null)\n {\n latestVersion = json[\"tag_name\"].ToString();\n assets = (JArray)json[\"assets\"];\n }\n }\n\n return (latestVersion, assets);\n }\n\n\n private async void StartSubsCheckProcess()\n {\n try\n {\n // 重置进度条\n progressBar1.Value = 0;\n groupBox2.Text = \"实时日志\";\n using (MemoryStream ms = new MemoryStream(Properties.Resources.going))\n {\n notifyIcon1.Icon = new Icon(ms);\n }\n\n // 获取当前应用程序目录\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string subsCheckPath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 检查是否有其他subs-check.exe进程正在运行,并强制结束它们\n try\n {\n Process[] processes = Process.GetProcessesByName(\"subs-check\");\n if (processes.Length > 0)\n {\n Log(\"发现正在运行的subs-check.exe进程,正在强制结束...\");\n foreach (Process process in processes)\n {\n // 确保不是当前应用程序的进程\n if (process != subsCheckProcess)\n {\n try\n {\n process.Kill();\n process.WaitForExit();\n Log($\"成功结束subs-check.exe进程(ID: {process.Id})\");\n }\n catch (Exception ex)\n {\n Log($\"结束subs-check.exe进程时出错(ID: {process.Id}): {ex.Message}\", true);\n }\n }\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"检查运行中的subs-check.exe进程时出错: {ex.Message}\", true);\n }\n\n // 检查文件是否存在\n if (!File.Exists(subsCheckPath))\n {\n Log(\"没有找到 subs-check.exe 文件。\", true);\n await DownloadSubsCheckEXE(); // 使用异步等待\n }\n\n // 创建进程启动信息\n ProcessStartInfo startInfo = new ProcessStartInfo\n {\n FileName = subsCheckPath,\n UseShellExecute = false,\n RedirectStandardOutput = true,\n RedirectStandardError = true,\n CreateNoWindow = true,\n WorkingDirectory = executablePath,\n StandardOutputEncoding = Encoding.UTF8,\n StandardErrorEncoding = Encoding.UTF8\n };\n\n // 创建进程\n subsCheckProcess = new Process { StartInfo = startInfo };\n\n // 设置输出和错误数据接收事件处理\n subsCheckProcess.OutputDataReceived += SubsCheckProcess_OutputDataReceived;\n subsCheckProcess.ErrorDataReceived += SubsCheckProcess_OutputDataReceived;\n\n // 启动进程\n subsCheckProcess.Start();\n\n // 开始异步读取输出\n subsCheckProcess.BeginOutputReadLine();\n subsCheckProcess.BeginErrorReadLine();\n\n // 设置进程退出事件处理\n subsCheckProcess.EnableRaisingEvents = true;\n subsCheckProcess.Exited += SubsCheckProcess_Exited;\n\n Log($\"subs-check.exe {当前subsCheck版本号} 已启动...\");\n timer4.Enabled = true;\n }\n catch (Exception ex)\n {\n Log($\"启动 subs-check.exe 时出错: {ex.Message}\", true);\n button1.Text = \"▶️ 启动\";\n }\n }\n\n\n private void StopSubsCheckProcess()\n {\n timer4.Enabled = false;\n if (subsCheckProcess != null && !subsCheckProcess.HasExited)\n {\n try\n {\n // 尝试正常关闭进程\n subsCheckProcess.Kill();\n subsCheckProcess.WaitForExit();\n Log(\"subs-check.exe 已停止\");\n notifyIcon1.Icon = originalNotifyIcon;\n button7.Enabled = false;\n button7.Text = \"🔀未启动\";\n }\n catch (Exception ex)\n {\n Log($\"停止 subs-check.exe 时出错: {ex.Message}\", true);\n }\n finally\n {\n subsCheckProcess.Dispose();\n subsCheckProcess = null;\n }\n }\n }\n \n private void SubsCheckProcess_OutputDataReceived(object sender, DataReceivedEventArgs e)\n {\n if (!string.IsNullOrEmpty(e.Data))\n {\n // 由于此事件在另一个线程中触发,需要使用 Invoke 在 UI 线程上更新控件\n BeginInvoke(new Action(() =>\n {\n // 过滤ANSI转义序列\n string cleanText = RemoveAnsiEscapeCodes(e.Data);\n\n // 检查是否包含\"下次检查时间\"信息\n if (cleanText.Contains(\"下次检查时间:\"))\n {\n if (button3.Enabled == false)\n {\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string outputFolderPath = System.IO.Path.Combine(executablePath, \"output\");\n if (System.IO.Directory.Exists(outputFolderPath))\n {\n string allyamlFilePath = System.IO.Path.Combine(outputFolderPath, \"all.yaml\");\n if (System.IO.File.Exists(allyamlFilePath)) button3.Enabled = true;\n }\n }\n // 提取完整的下次检查时间信息\n int startIndex = cleanText.IndexOf(\"下次检查时间:\");\n nextCheckTime = cleanText.Substring(startIndex);\n }\n\n if (!cleanText.StartsWith(\"[GIN]\"))\n {\n // 如果不是进度行,则添加到日志中\n richTextBox1.AppendText(cleanText + \"\\r\\n\");\n // 滚动到最底部\n richTextBox1.SelectionStart = richTextBox1.Text.Length;\n richTextBox1.ScrollToCaret();\n }\n\n /*\n // 检查是否是进度信息行\n if (cleanText.StartsWith(\"进度: [\"))\n {\n // 解析百分比\n int percentIndex = cleanText.IndexOf('%');\n if (percentIndex > 0)\n {\n // 查找百分比前面的数字部分\n int startIndex = cleanText.LastIndexOfAny(new char[] { ' ', '>' }, percentIndex) + 1;\n string percentText = cleanText.Substring(startIndex, percentIndex - startIndex);\n\n if (double.TryParse(percentText, out double percentValue))\n {\n // 更新进度条,将百分比值(0-100)设置给进度条\n progressBar1.Value = (int)Math.Round(percentValue);\n }\n }\n\n // 解析节点信息部分(例如:(12/6167) 可用: 0)\n int infoStartIndex = cleanText.IndexOf('(');\n if (infoStartIndex > 0)\n {\n string fullNodeInfo = cleanText.Substring(infoStartIndex);\n\n // 提取最重要的信息:节点数量和可用数量\n int endIndex = fullNodeInfo.IndexOf(\"2025-\"); // 查找日期部分开始位置\n if (endIndex > 0)\n {\n nodeInfo = fullNodeInfo.Substring(0, endIndex).Trim();\n }\n else\n {\n // 如果找不到日期部分,则取前30个字符\n nodeInfo = fullNodeInfo.Length > 30 ? fullNodeInfo.Substring(0, 30) + \"...\" : fullNodeInfo;\n }\n\n groupBox2.Text = \"实时日志 \" + nodeInfo;\n\n // 确保通知图标文本不超过63个字符\n string notifyText = \"SubsCheck: \" + nodeInfo;\n if (notifyText.Length > 63)\n {\n notifyText = notifyText.Substring(0, 60) + \"...\";\n }\n notifyIcon1.Text = notifyText;\n }\n\n // 更新lastProgressLine,但不向richTextBox添加文本\n lastProgressLine = cleanText;\n }\n else\n {\n // 如果不是进度行,则添加到日志中\n richTextBox1.AppendText(cleanText + \"\\r\\n\");\n // 滚动到最底部\n richTextBox1.SelectionStart = richTextBox1.Text.Length;\n richTextBox1.ScrollToCaret();\n }\n */\n }));\n }\n }\n\n\n // 添加一个方法来过滤ANSI转义序列\n private string RemoveAnsiEscapeCodes(string input)\n {\n // 匹配ANSI转义序列的正则表达式\n // 这将匹配类似 \"[2m\"、\"[0m\"、\"[92m\" 等格式的ANSI颜色代码\n return System.Text.RegularExpressions.Regex.Replace(input, @\"\\x1B\\[[0-9;]*[mGK]\", string.Empty);\n }\n\n private void SubsCheckProcess_Exited(object sender, EventArgs e)\n {\n // 进程退出时,在 UI 线程上更新控件\n BeginInvoke(new Action(() =>\n {\n Log(\"subs-check.exe 已退出\");\n button1.Text = \"▶️ 启动\";\n\n // 更新菜单项的启用状态\n startMenuItem.Enabled = true;\n stopMenuItem.Enabled = false;\n\n // 重新启用控件\n numericUpDown1.Enabled = true;\n numericUpDown2.Enabled = true;\n numericUpDown3.Enabled = true;\n numericUpDown4.Enabled = true;\n numericUpDown5.Enabled = true;\n numericUpDown6.Enabled = true;\n textBox1.Enabled = true;\n groupBox3.Enabled = true;\n }));\n }\n\n /// \n /// 获取本地局域网IP地址,如果有多个则让用户选择\n /// \n /// 用户选择的IP地址,如果未选择则返回127.0.0.1\n private string GetLocalLANIP()\n {\n try\n {\n // 获取所有网卡的IP地址\n List lanIPs = new List();\n\n // 获取所有网络接口\n foreach (System.Net.NetworkInformation.NetworkInterface ni in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces())\n {\n // 排除loopback、虚拟网卡和非活动网卡\n if (ni.NetworkInterfaceType != System.Net.NetworkInformation.NetworkInterfaceType.Loopback &&\n ni.OperationalStatus == System.Net.NetworkInformation.OperationalStatus.Up)\n {\n // 获取该网卡的所有IP地址\n foreach (System.Net.NetworkInformation.UnicastIPAddressInformation ip in ni.GetIPProperties().UnicastAddresses)\n {\n // 只添加IPv4地址且不是回环地址\n if (ip.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork &&\n !System.Net.IPAddress.IsLoopback(ip.Address))\n {\n lanIPs.Add(ip.Address.ToString());\n }\n }\n }\n }\n\n // 如果没有找到任何IP地址,返回本地回环地址\n if (lanIPs.Count == 0)\n {\n return \"127.0.0.1\";\n }\n // 如果只找到一个IP地址,直接返回\n else if (lanIPs.Count == 1)\n {\n return lanIPs[0];\n }\n // 如果有多个IP地址,让用户选择\n else\n {\n // 创建选择窗口\n Form selectForm = new Form();\n selectForm.Text = \"选择局域网IP地址\";\n selectForm.StartPosition = FormStartPosition.CenterParent;\n /*\n selectForm.Width = 520; // 保持宽度\n selectForm.Height = 320; // 增加高度以容纳额外的警告标签\n selectForm.FormBorderStyle = FormBorderStyle.FixedDialog;\n */\n selectForm.AutoSize = true; // 启用自动大小调整\n selectForm.AutoSizeMode = AutoSizeMode.GrowAndShrink; // 根据内容调整大小\n selectForm.FormBorderStyle = FormBorderStyle.FixedSingle; // 使用固定但可调整的边框\n selectForm.ShowIcon = false;\n selectForm.MaximizeBox = false;\n selectForm.MinimizeBox = false;\n\n // 添加说明标签\n Label label = new Label();\n label.Text = \"发现多个局域网IP地址:\\n\\n\" +\n \"· 仅在本机访问:直接点击【取消】,将使用127.0.0.1\\n\\n\" +\n \"· 局域网内其他设备访问:请在下面列表中选择一个正确的局域网IP\";\n label.Location = new Point(15, 10);\n label.AutoSize = true;\n label.MaximumSize = new Size(380, 0); // 设置最大宽度,允许自动换行\n selectForm.Controls.Add(label);\n\n // 计算标签高度以正确放置列表框\n int labelHeight = label.Height + 20;\n\n // 添加IP地址列表框\n ListBox listBox = new ListBox();\n listBox.Location = new Point(15, labelHeight);\n listBox.Width = 380;\n listBox.Height = 130; // 保持列表框高度\n foreach (string ip in lanIPs)\n {\n listBox.Items.Add(ip);\n }\n // 查找非\".1\"结尾的IP地址,如果所有IP都以\".1\"结尾,则使用第一个IP\n int selectedIndex = 0;\n for (int i = 0; i < lanIPs.Count; i++)\n {\n if (!lanIPs[i].EndsWith(\".1\"))\n {\n selectedIndex = i;\n break;\n }\n }\n\n // 设置选中的索引\n listBox.SelectedIndex = selectedIndex;\n selectForm.Controls.Add(listBox);\n\n // 添加警告标签(放在列表框下方)\n Label warningLabel = new Label();\n warningLabel.Text = \"注意:选择错误的IP会导致局域网内其他设备无法访问。\\n\\n   推荐您可以先尝试使用非“.1”结尾的IP!\";\n warningLabel.Location = new Point(15, labelHeight + listBox.Height + 10);\n warningLabel.AutoSize = true;\n warningLabel.ForeColor = Color.Red; // 警告文本使用红色\n selectForm.Controls.Add(warningLabel);\n\n // 计算按钮位置(居中排布)\n int buttonY = labelHeight + listBox.Height + warningLabel.Height + 20;\n int buttonTotalWidth = 75 * 2 + 15; // 两个按钮的宽度加间距\n int buttonStartX = (selectForm.ClientSize.Width - buttonTotalWidth) / 2;\n\n // 添加确定按钮\n Button okButton = new Button();\n okButton.Text = \"确定\";\n okButton.DialogResult = DialogResult.OK;\n okButton.Location = new Point(buttonStartX, buttonY);\n okButton.Width = 75;\n selectForm.Controls.Add(okButton);\n selectForm.AcceptButton = okButton;\n\n // 添加取消按钮\n Button cancelButton = new Button();\n cancelButton.Text = \"取消\";\n cancelButton.DialogResult = DialogResult.Cancel;\n cancelButton.Location = new Point(buttonStartX + 90, buttonY);\n cancelButton.Width = 75;\n selectForm.Controls.Add(cancelButton);\n selectForm.CancelButton = cancelButton;\n\n // 显示选择窗口\n if (selectForm.ShowDialog() == DialogResult.OK)\n {\n return listBox.SelectedItem.ToString();\n }\n else\n {\n return \"127.0.0.1\"; // 如果用户取消,返回本地回环地址\n }\n }\n\n\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"获取局域网IP地址时出错: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n return \"127.0.0.1\";\n }\n }\n\n private void button3_Click(object sender, EventArgs e)\n {\n string 本地IP = GetLocalLANIP();\n try\n {\n // 构造URL\n string url = comboBox4.Text == \"Clash\" ? $\"http://{本地IP}:{numericUpDown7.Value}/api/file/mihomo\" : $\"http://{本地IP}:{numericUpDown7.Value}/download/sub\";\n\n // 将URL复制到剪贴板\n Clipboard.SetText(url);\n button3.Text = \"复制成功\";\n timer2.Enabled = true;\n // 可选:显示提示消息\n //MessageBox.Show($\"URL已复制到剪贴板:\\n{url}\", \"复制成功\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"复制到剪贴板时出错:{ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n private void timer2_Tick(object sender, EventArgs e)\n {\n button3.Text = \"复制订阅\";\n }\n\n private void comboBox3_Leave(object sender, EventArgs e)\n {\n // 检查是否有内容\n if (string.IsNullOrWhiteSpace(comboBox3.Text)) \n {\n comboBox3.Text = \"自动选择\";\n return;\n }\n\n string input = comboBox3.Text.Trim();\n\n // 检查是否存在 \"://\" 协议部分\n int protocolIndex = input.IndexOf(\"://\");\n if (protocolIndex >= 0)\n {\n // 保留 \"://\" 之后的内容\n input = input.Substring(protocolIndex + 3);\n }\n\n // 检查是否存在 \"/\" 路径部分\n int pathIndex = input.IndexOf('/');\n if (pathIndex >= 0)\n {\n // 只保留 \"/\" 之前的域名部分\n input = input.Substring(0, pathIndex);\n }\n\n // 更新 comboBox3 的文本\n comboBox3.Text = input;\n }\n\n private void 判断保存类型()\n {\n if (comboBox1.Text == \"本地\" || button2.Text == \"高级设置∨\")\n {\n groupBox4.Visible = false;\n groupBox5.Visible = false;\n groupBox6.Visible = false;\n }\n else if (comboBox1.Text == \"gist\" && button2.Text == \"高级设置∧\")\n {\n groupBox4.Visible = true;\n\n groupBox5.Visible = false;\n groupBox6.Visible = false;\n }\n else if (comboBox1.Text == \"r2\" && button2.Text == \"高级设置∧\")\n {\n groupBox5.Location = groupBox4.Location;\n groupBox5.Visible = true;\n\n groupBox4.Visible = false;\n groupBox6.Visible = false;\n }\n else if (comboBox1.Text == \"webdav\" && button2.Text == \"高级设置∧\")\n {\n groupBox6.Location = groupBox4.Location;\n groupBox6.Visible = true;\n\n groupBox4.Visible = false;\n groupBox5.Visible = false;\n }\n }\n\n private void comboBox1_TextChanged(object sender, EventArgs e)\n {\n 判断保存类型();\n if(!(comboBox1.Text == \"本地\" || comboBox1.Text == \"\") && button2.Text == \"高级设置∨\") button2_Click(sender, e);\n }\n\n private void textBox3_Enter(object sender, EventArgs e)\n {\n textBox3.PasswordChar = '\\0';\n textBox6.PasswordChar = '\\0';\n textBox8.PasswordChar = '\\0';\n }\n\n private void textBox3_Leave(object sender, EventArgs e)\n {\n textBox3.PasswordChar = '*';\n textBox6.PasswordChar = '*';\n textBox8.PasswordChar = '*';\n }\n\n private void textBox10_Enter(object sender, EventArgs e)\n {\n textBox10.PasswordChar = '\\0';\n if (textBox10.Text == \"请输入密钥\")\n {\n textBox10.Text = \"\";\n textBox10.ForeColor = Color.Black;\n }\n }\n\n private void textBox10_Leave(object sender, EventArgs e)\n {\n \n if (textBox10.Text == \"\")\n {\n textBox10.PasswordChar = '\\0';\n textBox10.Text = \"请输入密钥\";\n textBox10.ForeColor = Color.Gray;\n }\n else\n {\n textBox10.ForeColor = Color.Black;\n textBox10.PasswordChar = '*';\n }\n }\n\n private void textBox7_Leave(object sender, EventArgs e)\n {\n // 检查是否有内容\n if (string.IsNullOrWhiteSpace(textBox7.Text))\n return;\n\n string input = textBox7.Text.Trim();\n\n try\n {\n // 尝试解析为 URI\n Uri uri = new Uri(input);\n\n // 构建基础 URL (scheme + authority)\n string baseUrl = $\"{uri.Scheme}://{uri.Authority}\";\n\n // 更新 textBox7 的文本为基础 URL\n textBox7.Text = baseUrl;\n }\n catch (UriFormatException)\n {\n // 如果输入的不是有效 URI,尝试使用简单的字符串处理\n // 查找双斜杠后的第一个斜杠\n int schemeIndex = input.IndexOf(\"://\");\n if (schemeIndex >= 0)\n {\n int pathStartIndex = input.IndexOf('/', schemeIndex + 3);\n if (pathStartIndex >= 0)\n {\n // 截取到路径开始之前\n textBox7.Text = input.Substring(0, pathStartIndex);\n }\n }\n }\n }\n\n private void Log(string message, bool isError = false)\n {\n string timestamp = DateTime.Now.ToString(\"yyyy-MM-dd HH:mm:ss\");\n string logType = isError ? \"ERR\" : \"INF\";\n richTextBox1.AppendText($\"{timestamp} {logType} {message}\\r\\n\");\n\n if (richTextBox1.IsHandleCreated)\n {\n richTextBox1.BeginInvoke((MethodInvoker)(() =>\n {\n // 滚动到最底部\n richTextBox1.SelectionStart = richTextBox1.Text.Length;\n richTextBox1.ScrollToCaret();\n }));\n }\n }\n\n private void 恢复窗口()\n {\n // 首先显示窗体\n this.Show();\n\n // 强制停止当前布局逻辑\n this.SuspendLayout();\n\n // 恢复窗口状态\n this.WindowState = FormWindowState.Normal;\n\n // 强制重新布局\n this.ResumeLayout(true); // 参数true表示立即执行布局\n\n // 调用刷新布局的方法\n this.PerformLayout();\n\n // 处理WindowsForms消息队列中的所有挂起消息\n Application.DoEvents();\n\n // 激活窗口(使其获得焦点)\n this.Activate();\n }\n\n private void 隐藏窗口()\n {\n // 隐藏窗体(从任务栏消失)\n this.Hide();\n\n // 确保通知图标可见\n notifyIcon1.Visible = true;\n\n // 可选:显示气泡提示\n notifyIcon1.ShowBalloonTip(1000, \"SubsCheck\", \"程序已最小化到系统托盘\", ToolTipIcon.Info);\n }\n\n private void notifyIcon1_MouseClick(object sender, MouseEventArgs e)\n {\n if (e.Button == MouseButtons.Left)\n {\n // 检查窗口是否可见\n if (this.Visible)\n {\n // 如果窗口当前可见,则隐藏窗口\n 隐藏窗口();\n }\n else\n {\n // 如果窗口当前不可见,则恢复窗口\n 恢复窗口();\n }\n }\n }\n\n // 创建专用方法用于异步检测GitHub代理\n private async Task DetectGitHubProxyAsync(List proxyItems)\n {\n bool proxyFound = false;\n string detectedProxyURL = \"\";\n\n Log(\"检测可用 GitHub 代理...\");\n\n // 遍历随机排序后的代理列表\n foreach (string proxyItem in proxyItems)\n {\n string checkUrl = $\"https://{proxyItem}/https://raw.githubusercontent.com/cmliu/SubsCheck-Win-GUI/master/packages.config\";\n Log($\"正在测试 GitHub 代理: {proxyItem}\");\n richTextBox1.Refresh();\n\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); // 设置5秒超时\n // 添加User-Agent头,避免被拒绝访问\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n\n // 使用异步方式\n HttpResponseMessage response = await client.GetAsync(checkUrl);\n if (response.IsSuccessStatusCode)\n {\n // 找到可用代理\n detectedProxyURL = $\"https://{proxyItem}/\";\n Log($\"找到可用 GitHub 代理: {proxyItem}\");\n proxyFound = true;\n break;\n }\n }\n }\n catch (Exception ex)\n {\n // 记录错误但继续尝试下一个\n Log($\"代理 {proxyItem} 测试失败: {ex.Message}\", true);\n richTextBox1.Refresh();\n }\n }\n\n // 如果没有找到可用的代理\n if (!proxyFound)\n {\n Log(\"未找到可用的 GitHub 代理,请在高级设置中手动设置。\", true);\n MessageBox.Show(\"未找到可用的 GitHub 代理。\\n\\n请打开高级设置手动填入一个可用的Github Proxy,或检查您的网络连接。\",\n \"代理检测失败\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Warning);\n }\n\n return detectedProxyURL;\n }\n\n private async void button5_Click(object sender, EventArgs e)\n {\n try\n {\n button5.Enabled = false;\n button1.Enabled = false;\n // 清空日志\n richTextBox1.Clear();\n Log(\"开始检查和下载最新版本的 subs-check.exe...\");\n\n // 获取当前应用程序目录\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string subsCheckPath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 检查文件是否存在\n if (File.Exists(subsCheckPath))\n {\n Log($\"发现 subs-check.exe,正在删除...\");\n\n try\n {\n // 首先检查是否有进程正在运行\n Process[] processes = Process.GetProcessesByName(\"subs-check\");\n if (processes.Length > 0)\n {\n Log(\"发现正在运行的 subs-check.exe 进程,正在强制结束...\");\n foreach (Process process in processes)\n {\n try\n {\n process.Kill();\n process.WaitForExit();\n Log($\"成功结束 subs-check.exe 进程(ID: {process.Id})\");\n }\n catch (Exception ex)\n {\n Log($\"结束进程时出错(ID: {process.Id}): {ex.Message}\", true);\n }\n }\n }\n\n // 删除文件\n File.Delete(subsCheckPath);\n Log(\"成功删除旧版本 subs-check.exe\");\n }\n catch (Exception ex)\n {\n Log($\"删除 subs-check.exe 时出错: {ex.Message}\", true);\n MessageBox.Show($\"无法删除现有的 subs-check.exe 文件: {ex.Message}\\n\\n请手动删除后重试,或者检查文件是否被其他程序占用。\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n button5.Enabled = true;\n return;\n }\n }\n else\n {\n Log(\"未找到现有的 subs-check.exe 文件,将直接下载最新版本\");\n }\n\n // 检测可用的 GitHub 代理\n if (!string.IsNullOrEmpty(comboBox3.Text) && comboBox3.Text == \"自动选择\")\n {\n // 创建不包含\"自动选择\"的代理列表\n List proxyItems = new List();\n for (int j = 0; j < comboBox3.Items.Count; j++)\n {\n string proxyItem = comboBox3.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n\n // 随机打乱列表顺序\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n\n // 异步检测可用代理\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n\n // 如果未能找到可用代理,提示用户\n if (string.IsNullOrEmpty(githubProxyURL))\n {\n Log(\"未能找到可用的 GitHub 代理,下载可能会失败\", true);\n }\n }\n else if (!string.IsNullOrEmpty(comboBox3.Text))\n {\n githubProxyURL = $\"https://{comboBox3.Text}/\";\n Log($\"使用指定的 GitHub 代理: {comboBox3.Text}\");\n }\n else\n {\n Log(\"未设置 GitHub 代理,将尝试直接下载\", true);\n }\n\n // 下载最新版本的 subs-check.exe\n await DownloadSubsCheckEXE();\n\n // 完成\n Log(\"内核更新完成!\");\n }\n catch (Exception ex)\n {\n Log($\"操作过程中出错: {ex.Message}\", true);\n MessageBox.Show($\"处理过程中出现错误: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n finally\n {\n button5.Enabled = true;\n button1.Enabled = true;\n }\n }\n\n private decimal 订阅端口;\n private decimal SubStore端口;\n private void numericUpDown6_ValueChanged(object sender, EventArgs e)\n {\n // 检查numericUpDown7是否存在并且与numericUpDown6的值相等\n if (numericUpDown6.Value == numericUpDown7.Value)\n {\n // 显示警告消息\n MessageBox.Show(\"订阅端口 和 Sub-Store端口 不能相同!\",\n \"端口冲突\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Warning);\n\n // 将numericUpDown6的值恢复为更改前的值\n numericUpDown6.Value = 订阅端口;\n numericUpDown7.Value = SubStore端口;\n }\n else\n {\n // 保存当前值作为下次比较的基准\n 订阅端口 = numericUpDown6.Value;\n SubStore端口 = numericUpDown7.Value;\n }\n }\n\n /// \n /// 异步检测并强制终止所有程序目录下的output\\node.exe进程\n /// \n private async Task KillNodeProcessAsync()\n {\n try\n {\n Log(\"检查 node.exe 进程状态...\");\n\n // 获取当前应用程序的执行目录\n string executablePath = Path.GetDirectoryName(Application.ExecutablePath);\n string nodeExePath = Path.Combine(executablePath, \"output\", \"node.exe\");\n\n // 获取所有node.exe进程\n Process[] nodeProcesses = Process.GetProcessesByName(\"node\");\n\n if (nodeProcesses.Length == 0)\n {\n Log(\"未发现运行中的 node.exe 进程\");\n return;\n }\n\n Log($\"发现 {nodeProcesses.Length} 个 node.exe 进程,开始检查并终止匹配路径的进程...\");\n\n int terminatedCount = 0;\n\n foreach (Process process in nodeProcesses)\n {\n try\n {\n // 使用Task.Run将可能耗时的操作放在后台线程执行\n string processPath = await Task.Run(() => {\n try\n {\n return process.MainModule?.FileName;\n }\n catch (Exception)\n {\n return null;\n }\n });\n\n // 检查是否匹配我们要查找的node.exe路径\n if (!string.IsNullOrEmpty(processPath) &&\n processPath.Equals(nodeExePath, StringComparison.OrdinalIgnoreCase))\n {\n // 找到匹配的进程,终止它\n Log($\"发现匹配路径的 node.exe 进程(ID: {process.Id}),正在强制结束...\");\n\n await Task.Run(() => {\n process.Kill();\n process.WaitForExit();\n });\n\n Log($\"成功结束 node.exe 进程(ID: {process.Id})\");\n terminatedCount++;\n }\n }\n catch (Exception ex)\n {\n // 访问进程信息时可能会因为权限问题抛出异常\n Log($\"访问或终止进程(ID: {process.Id})时出错: {ex.Message}\", true);\n }\n }\n\n if (terminatedCount > 0)\n {\n Log($\"总共终止了 {terminatedCount} 个匹配路径的 node.exe 进程\");\n }\n else\n {\n Log(\"未发现需要终止的 node.exe 进程\");\n }\n }\n catch (Exception ex)\n {\n Log($\"检查或终止 node.exe 进程时出错: {ex.Message}\", true);\n }\n }\n\n private async void textBox1_DoubleClick(object sender, EventArgs e)\n {\n if (textBox1.Enabled)\n {\n // 创建EditURLs窗口的实例\n EditURLs editURLsForm = new EditURLs();\n\n // 传递当前textBox1的内容到EditURLs窗口\n editURLsForm.UrlContent = textBox1.Text + \"\\n\";\n editURLsForm.githubProxys = comboBox3.Items;\n editURLsForm.githubProxy = comboBox3.Text;\n // 显示对话框并等待结果\n DialogResult result = editURLsForm.ShowDialog();\n\n // 如果用户点击了\"保存并关闭\"按钮(返回DialogResult.OK)\n if (result == DialogResult.OK)\n {\n // 获取编辑后的内容,按行拆分,过滤空行\n string[] lines = editURLsForm.UrlContent.Split(\n new[] { \"\\r\\n\", \"\\r\", \"\\n\" },\n StringSplitOptions.RemoveEmptyEntries);\n\n // 去除每行首尾的空白字符\n for (int i = 0; i < lines.Length; i++)\n {\n lines[i] = lines[i].Trim();\n }\n\n // 再次过滤掉空行\n lines = lines.Where(line => !string.IsNullOrWhiteSpace(line)).ToArray();\n\n // 将处理后的内容更新到Form1的textBox1\n textBox1.Text = string.Join(Environment.NewLine, lines);\n await SaveConfig(false);\n Log(\"已保存订阅地址列表。\");\n }\n }\n\n }\n\n private void checkBox1_CheckedChanged(object sender, EventArgs e)\n {\n if (checkBox1.Checked == false) checkBox2.Checked = false;\n }\n\n private void checkBox2_CheckedChanged(object sender, EventArgs e)\n {\n if (checkBox2.Checked == true) checkBox1.Checked = true;\n }\n\n private async void timer3_Tick(object sender, EventArgs e)\n {\n if (button1.Text == \"⏹️ 停止\") \n {\n Log(\"subs-check.exe 运行时满24小时,自动重启清理内存占用。\");\n // 停止 subs-check.exe 程序\n StopSubsCheckProcess();\n // 结束 Sub-Store\n await KillNodeProcessAsync();\n // 重新启动 subs-check.exe 程序\n StartSubsCheckProcess();\n numericUpDown1.Enabled = false;\n numericUpDown2.Enabled = false;\n numericUpDown3.Enabled = false;\n numericUpDown4.Enabled = false;\n numericUpDown5.Enabled = false;\n numericUpDown6.Enabled = false;\n numericUpDown7.Enabled = false;\n comboBox1.Enabled = false;\n textBox1.Enabled = false;\n groupBox3.Enabled = false;\n groupBox4.Enabled = false;\n groupBox5.Enabled = false;\n groupBox6.Enabled = false;\n button1.Text = \"⏹️ 停止\";\n }\n }\n\n private void button4_Click(object sender, EventArgs e)\n {\n // 创建 CheckUpdates 窗口实例\n CheckUpdates checkUpdatesForm = new CheckUpdates();\n\n // 传递必要的数据和状态\n checkUpdatesForm.githubProxys = comboBox3.Items;\n checkUpdatesForm.githubProxy = comboBox3.Text;\n\n checkUpdatesForm.当前subsCheck版本号 = 当前subsCheck版本号;\n checkUpdatesForm.当前GUI版本号 = 当前GUI版本号;\n checkUpdatesForm.最新GUI版本号 = 最新GUI版本号;\n\n // 为 CheckUpdates 的 button2 添加点击事件处理程序\n checkUpdatesForm.FormClosed += (s, args) => {\n // 移除事件处理,避免内存泄漏\n if (checkUpdatesForm.DialogResult == DialogResult.OK)\n {\n // 如果返回OK结果,表示按钮被点击并需要更新内核\n button5_Click(this, EventArgs.Empty);\n }\n };\n\n // 设置 button2 点击后关闭窗口并返回 DialogResult.OK\n // 这需要在 CheckUpdates.cs 中修改 button2_Click 方法\n\n // 显示 CheckUpdates 窗口\n checkUpdatesForm.ShowDialog();\n }\n\n private void checkBox3_CheckedChanged(object sender, EventArgs e)\n {\n if (checkBox3.Checked) numericUpDown8.Enabled = true;\n else numericUpDown8.Enabled = false;\n }\n\n private async void comboBox5_SelectedIndexChanged(object sender, EventArgs e)\n {\n if (comboBox5.Text.Contains(\"[内置]\")) await ProcessComboBox5Selection(true);\n }\n\n private async Task ProcessComboBox5Selection(bool 汇报Log = false)\n {\n // 确定文件名和下载URL\n string fileName;\n string downloadFilePath;\n string downloadUrl;\n string displayName;\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n if (comboBox5.Text.Contains(\"[内置]布丁狗\"))\n {\n fileName = \"bdg.yaml\";\n displayName = \"[内置]布丁狗的订阅转换\";\n downloadUrl = \"https://raw.githubusercontent.com/cmliu/ACL4SSR/main/yaml/bdg.yaml\";\n }\n else // [内置]ACL4SSR\n {\n fileName = \"ACL4SSR_Online_Full.yaml\";\n displayName = \"[内置]ACL4SSR_Online_Full\";\n downloadUrl = \"https://raw.githubusercontent.com/beck-8/override-hub/main/yaml/ACL4SSR_Online_Full.yaml\";\n }\n\n // 确保output文件夹存在\n string outputFolderPath = Path.Combine(executablePath, \"output\");\n if (!Directory.Exists(outputFolderPath))\n {\n Directory.CreateDirectory(outputFolderPath);\n }\n\n // 确定文件完整路径\n downloadFilePath = Path.Combine(outputFolderPath, fileName);\n\n // 检查文件是否存在\n if (!File.Exists(downloadFilePath))\n {\n Log($\"{displayName} 覆写配置文件 未找到,正在下载...\");\n\n // 重置进度条\n progressBar1.Value = 0;\n\n // 添加GitHub代理前缀如果有\n string fullDownloadUrl = githubProxyURL + downloadUrl;\n\n try\n {\n // 创建不使用系统代理的HttpClientHandler\n using (HttpClientHandler handler = new HttpClientHandler { UseProxy = false, Proxy = null })\n using (HttpClient client = new HttpClient(handler))\n {\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n client.Timeout = TimeSpan.FromSeconds(15); // 设置15秒超时\n\n // 先获取文件大小\n HttpResponseMessage headResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Head, fullDownloadUrl));\n long totalBytes = headResponse.Content.Headers.ContentLength ?? 0;\n\n // 如果无法获取文件大小,显示不确定进度\n if (totalBytes == 0)\n {\n Console.WriteLine($\"无法获取 {displayName} 文件大小,将显示不确定进度\");\n }\n\n // 创建下载请求并获取响应流\n using (var response = await client.GetAsync(fullDownloadUrl, HttpCompletionOption.ResponseHeadersRead))\n {\n if (response.IsSuccessStatusCode)\n {\n using (var contentStream = await response.Content.ReadAsStreamAsync())\n using (var fileStream = new FileStream(downloadFilePath, FileMode.Create, FileAccess.Write, FileShare.None, 8192, true))\n {\n byte[] buffer = new byte[8192];\n long totalBytesRead = 0;\n int bytesRead;\n\n while ((bytesRead = await contentStream.ReadAsync(buffer, 0, buffer.Length)) > 0)\n {\n await fileStream.WriteAsync(buffer, 0, bytesRead);\n totalBytesRead += bytesRead;\n\n // 更新进度条\n if (totalBytes > 0)\n {\n int progressPercentage = (int)((totalBytesRead * 100) / totalBytes);\n // 确保进度值在有效范围内 (0-100)\n progressPercentage = Math.Min(100, Math.Max(0, progressPercentage));\n progressBar1.Value = progressPercentage;\n }\n }\n\n // 确保进度条显示100%\n progressBar1.Value = 100;\n }\n\n Log($\"{displayName} 覆写配置文件 下载成功\");\n }\n else\n {\n Log($\"{displayName} 覆写配置文件 下载失败: HTTP {(int)response.StatusCode} {response.ReasonPhrase}\", true);\n }\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"{displayName} 覆写配置文件 下载失败: {ex.Message}\", true);\n // 出错时重置进度条\n progressBar1.Value = 0;\n }\n }\n else\n {\n if (汇报Log) Log($\"{displayName} 覆写配置文件 已就绪。\");\n }\n }\n\n private void numericUpDown1_ValueChanged(object sender, EventArgs e)\n {\n if (numericUpDown1.Value > 128)\n {\n string warningMessage =\n \"⚠️ 高并发风险提醒 ⚠️\\n\\n\" +\n \"您设置的并发数值过高,可能导致:\\n\\n\" +\n \"• 运营商判定为异常流量并限制网络\\n\" +\n \"• 路由器性能压力过大\\n\" +\n \"• 测速结果不准确\\n\\n\" +\n \"并发数设置建议:\\n\" +\n \"• 宽带峰值/50Mbps:一般对网络无影响\\n\" +\n \"• 宽带峰值/25Mbps:可能会影响同网络下载任务\\n\" +\n \"• 宽带峰值/10Mbps:可能会影响同网络下其他设备的上网体验\\n\";\n\n Log(warningMessage);\n }\n }\n\n private void checkBox4_CheckedChanged(object sender, EventArgs e)\n {\n if(checkBox4.Checked) textBox10.Enabled = true;\n else textBox10.Enabled = false;\n }\n\n private void button6_Click(object sender, EventArgs e)\n {\n string 本地IP = GetLocalLANIP();\n try\n {\n // 构造URL\n string url = $\"http://{本地IP}:{numericUpDown6.Value}/admin\";\n\n // 使用系统默认浏览器打开URL\n System.Diagnostics.Process.Start(url);\n\n Log($\"正在浏览器中打开 Subs-Check 配置管理: {url}\");\n }\n catch (Exception ex)\n {\n Log($\"打开浏览器失败: {ex.Message}\", true);\n MessageBox.Show($\"打开浏览器时出错: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n /// \n /// 获取API状态信息并返回包含6个元素的字符串数组\n /// \n /// \n /// 包含6个元素的字符串数组:\n /// [0] - 状态类型 (\"checking\"/\"idle\"/\"error\")\n /// [1] - 状态图标类别 (\"primary\"/\"success\"/\"danger\")\n /// [2] - 状态文本 (\"正在检测中...\"/\"空闲\"/\"获取状态失败\")\n /// [3] - 节点总数 (proxyCount或\"N/A\")\n /// [4] - 进度百分比 (progress或\"N/A\")\n /// [5] - 可用节点数量 (available或\"N/A\")\n /// \n private async Task GetApiStatusAsync()\n {\n string[] resultArray = new string[6];\n string baseUrl = $\"http://127.0.0.1:{numericUpDown6.Value}\";\n\n try\n {\n using (HttpClient client = new HttpClient())\n {\n // 设置基础URL\n client.BaseAddress = new Uri(baseUrl);\n\n // 添加API密钥请求头\n client.DefaultRequestHeaders.Add(\"X-API-Key\", WebUIapiKey);\n\n // 设置超时时间\n client.Timeout = TimeSpan.FromSeconds(5);\n\n // 发送请求\n HttpResponseMessage response = await client.GetAsync(\"/api/status\");\n\n // 检查响应状态\n if (response.IsSuccessStatusCode)\n {\n // 读取响应内容\n string content = await response.Content.ReadAsStringAsync();\n\n // 解析JSON\n JObject data = JObject.Parse(content);\n\n if (data[\"checking\"] != null && data[\"checking\"].Value())\n {\n // 正在检测状态\n resultArray[0] = \"checking\";\n resultArray[1] = \"primary\";\n resultArray[2] = \"正在检测中...\";\n\n // 提取节点数据\n resultArray[3] = data[\"proxyCount\"]?.ToString() ?? \"0\";\n resultArray[4] = data[\"progress\"]?.ToString() ?? \"0\";\n resultArray[5] = data[\"available\"]?.ToString() ?? \"0\";\n }\n else\n {\n // 空闲状态\n resultArray[0] = \"idle\";\n resultArray[1] = \"success\";\n resultArray[2] = \"空闲\";\n\n // 空闲时相关数据设为N/A\n resultArray[3] = \"N/A\";\n resultArray[4] = \"N/A\";\n resultArray[5] = \"N/A\";\n }\n }\n else\n {\n // 请求失败,例如未授权\n resultArray[0] = \"error\";\n resultArray[1] = \"danger\";\n resultArray[2] = $\"API请求失败: {(int)response.StatusCode}\";\n resultArray[3] = \"N/A\";\n resultArray[4] = \"N/A\";\n resultArray[5] = \"N/A\";\n }\n }\n }\n catch (Exception ex)\n {\n // 发生异常\n resultArray[0] = \"error\";\n resultArray[1] = \"danger\";\n resultArray[2] = $\"获取状态失败: {ex.Message}\";\n resultArray[3] = \"N/A\";\n resultArray[4] = \"N/A\";\n resultArray[5] = \"N/A\";\n\n // 可选:记录错误到日志\n Log($\"获取API状态失败: {ex.Message}\", true);\n }\n\n return resultArray;\n }\n\n private async void timer4_Tick(object sender, EventArgs e)\n {\n //if (!button7.Enabled) button7.Enabled = true;\n string[] subscheck状态 = await GetApiStatusAsync();\n string 状态类型 = subscheck状态[0];\n string 状态图标类别 = subscheck状态[1];\n string 状态文本 = subscheck状态[2];\n string 节点总数 = subscheck状态[3];\n string 进度百分比 = subscheck状态[4];\n string 可用节点数量 = subscheck状态[5];\n // 更新状态文本\n\n if (状态类型 == \"checking\")\n {\n button7.Text = \"⏸️ 暂停\";\n nodeInfo = $\"({进度百分比}/{节点总数}) 可用: {可用节点数量}\";\n int nodeTotal = int.Parse(节点总数);\n if (nodeTotal > 0) {\n int 进度条百分比 = int.Parse(进度百分比) * 100 / nodeTotal;\n progressBar1.Value = 进度条百分比;\n if (!button7.Enabled) button7.Enabled = true;\n }\n \n // 确保通知图标文本不超过63个字符\n string notifyText = \"SubsCheck: \" + nodeInfo;\n if (notifyText.Length > 63)\n {\n notifyText = notifyText.Substring(0, 60) + \"...\";\n }\n notifyIcon1.Text = notifyText;\n textBox1.Enabled = false;\n }\n else if (状态类型 == \"idle\")\n {\n button7.Text = \"⏯️ 开始\";\n progressBar1.Value = 100;\n nodeInfo = $\"等待{nextCheckTime}\";\n notifyIcon1.Text = \"SubsCheck: 已就绪\\n\" + nextCheckTime; ;\n textBox1.Enabled = true;\n }\n else if (状态类型 == \"error\")\n {\n button7.Text = \"🔀 未知\";\n nodeInfo = 状态文本;\n }\n groupBox2.Text = $\"实时日志 {nodeInfo}\";\n }\n\n private async void button7_Click(object sender, EventArgs e)\n {\n button7.Enabled = false;\n timer4.Enabled = false;\n\n try\n {\n bool isSuccess;\n\n if (button7.Text == \"⏯️ 开始\")\n {\n isSuccess = await SendApiRequestAsync(\"/api/trigger-check\", \"节点检查\");\n if (isSuccess)\n {\n button7.Text = \"⏸️ 暂停\";\n textBox1.Enabled = false; // 检查开始后禁用订阅编辑\n }\n }\n else // \"⏸️ 暂停\"\n {\n isSuccess = await SendApiRequestAsync(\"/api/force-close\", \"强制关闭\");\n }\n\n // 如果请求失败,更新按钮状态为未知\n if (!isSuccess) button7.Text = \"🔀 未知\";\n }\n finally\n {\n // 无论成功失败都重新启用定时器和按钮\n timer4.Enabled = true;\n timer4.Start();\n //button7.Enabled = true;\n }\n }\n\n /// \n /// 发送API请求到SubsCheck服务\n /// \n /// API端点路径\n /// 操作名称(用于日志)\n /// 操作是否成功\n private async Task SendApiRequestAsync(string endpoint, string operationName)\n {\n try\n {\n // 获取API基础地址和API密钥\n string baseUrl = $\"http://127.0.0.1:{numericUpDown6.Value}\";\n\n using (HttpClient client = new HttpClient())\n {\n client.BaseAddress = new Uri(baseUrl);\n client.DefaultRequestHeaders.Add(\"X-API-Key\", WebUIapiKey);\n client.Timeout = TimeSpan.FromSeconds(10);\n\n // 发送POST请求\n HttpResponseMessage response = await client.PostAsync(endpoint, new StringContent(\"\"));\n\n // 检查响应状态\n if (response.IsSuccessStatusCode)\n {\n Log($\"成功{operationName}\");\n return true;\n }\n else\n {\n string errorContent = await response.Content.ReadAsStringAsync();\n Log($\"{operationName}失败: HTTP {(int)response.StatusCode} {response.ReasonPhrase}\\n{errorContent}\", true);\n return false;\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"{operationName}时发生错误: {ex.Message}\", true);\n return false;\n }\n }\n\n private void textBox11_Leave(object sender, EventArgs e)\n {\n if (IsValidCronExpression(textBox11.Text))\n {\n // 计算并显示cron表达式的说明\n string cronDescription = GetCronExpressionDescription(textBox11.Text);\n // 可以用工具提示或者消息框显示,这里使用消息框\n //MessageBox.Show(cronDescription, \"Cron表达式说明\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n Log($\"Cron表达式说明 {cronDescription}\");\n }\n else\n {\n MessageBox.Show(\"请输入有效的cron表达式,例如:*/30 * * * *\", \"无效的cron表达式\",\n MessageBoxButtons.OK, MessageBoxIcon.Warning);\n textBox11.Focus();\n textBox11.Text = \"0 */2 * * *\"; // 恢复默认值\n }\n }\n\n /// \n /// 验证输入文本是否是合法的cron表达式\n /// \n /// 如果是合法的cron表达式,则返回true;否则返回false\n private bool IsValidCronExpression(string cron表达式)\n {\n string cronExpression = cron表达式.Trim();\n\n // 如果是空字符串,则不是有效表达式\n if (string.IsNullOrWhiteSpace(cronExpression))\n return false;\n\n // 分割cron表达式为5个部分:分钟 小时 日期 月份 星期\n string[] parts = cronExpression.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n\n // cron表达式必须有5个部分\n if (parts.Length != 5)\n return false;\n\n try\n {\n // 验证每个部分\n // 分钟 (0-59)\n if (!IsValidCronField(parts[0], 0, 59))\n return false;\n\n // 小时 (0-23)\n if (!IsValidCronField(parts[1], 0, 23))\n return false;\n\n // 日期 (1-31)\n if (!IsValidCronField(parts[2], 1, 31))\n return false;\n\n // 月份 (1-12)\n if (!IsValidCronField(parts[3], 1, 12))\n return false;\n\n // 星期 (0-7,0和7都表示星期日)\n if (!IsValidCronField(parts[4], 0, 7))\n return false;\n\n return true;\n }\n catch\n {\n return false;\n }\n }\n\n /// \n /// 验证cron表达式中的单个字段是否合法\n /// \n /// 字段值\n /// 最小允许值\n /// 最大允许值\n /// 如果字段合法,则返回true;否则返回false\n private bool IsValidCronField(string field, int min, int max)\n {\n // 处理通配符 \"*\"\n if (field == \"*\")\n return true;\n\n // 处理步长 \"*/n\"\n if (field.StartsWith(\"*/\"))\n {\n string stepStr = field.Substring(2);\n if (int.TryParse(stepStr, out int step))\n return step > 0 && step <= max;\n return false;\n }\n\n // 处理范围 \"n-m\"\n if (field.Contains(\"-\"))\n {\n string[] range = field.Split('-');\n if (range.Length != 2)\n return false;\n\n if (int.TryParse(range[0], out int start) && int.TryParse(range[1], out int end))\n return start >= min && end <= max && start <= end;\n return false;\n }\n\n // 处理列表 \"n,m,k\"\n if (field.Contains(\",\"))\n {\n string[] values = field.Split(',');\n foreach (string item in values)\n {\n if (!int.TryParse(item, out int itemValue) || itemValue < min || itemValue > max)\n return false;\n }\n return true;\n }\n\n // 处理单个数字\n if (int.TryParse(field, out int fieldValue))\n return fieldValue >= min && fieldValue <= max;\n\n return false;\n }\n\n /// \n /// 获取cron表达式的友好文本说明\n /// \n /// 要解析的cron表达式\n /// 返回cron表达式的执行时间说明\n private string GetCronExpressionDescription(string cron表达式)\n {\n try\n {\n string cronExpression = cron表达式.Trim();\n string[] parts = cronExpression.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n\n if (parts.Length != 5)\n return \"无效的cron表达式\";\n\n // 分别解析每个部分\n string minuteDesc = ParseCronPart(parts[0], \"分钟\", 0, 59);\n string hourDesc = ParseCronPart(parts[1], \"小时\", 0, 23);\n string dayDesc = ParseCronPart(parts[2], \"日\", 1, 31);\n string monthDesc = ParseCronPart(parts[3], \"月\", 1, 12);\n string weekDesc = ParseCronPart(parts[4], \"星期\", 0, 7, true);\n\n // 组合最终说明\n string description = \"执行时间: \";\n\n // 月份\n if (monthDesc != \"每月\")\n description += monthDesc + \"的\";\n\n // 星期与日期的关系\n if (parts[2] == \"*\" && parts[4] != \"*\")\n description += weekDesc + \"的\";\n else if (parts[2] != \"*\" && parts[4] == \"*\")\n description += dayDesc;\n else if (parts[2] != \"*\" && parts[4] != \"*\")\n description += $\"{dayDesc}或{weekDesc}\";\n else\n description += \"每天\";\n\n // 时间(小时:分钟)\n description += $\"{hourDesc}{minuteDesc}\";\n\n return description;\n }\n catch\n {\n return \"无法解析cron表达式\";\n }\n }\n\n /// \n /// 解析cron表达式的单个部分\n /// \n private string ParseCronPart(string part, string unit, int min, int max, bool isWeekday = false)\n {\n // 处理星号,表示每个时间单位\n if (part == \"*\")\n {\n return $\"每{unit}\";\n }\n\n // 处理步长 */n\n if (part.StartsWith(\"*/\"))\n {\n int step = int.Parse(part.Substring(2));\n return $\"每{step}{unit}\";\n }\n\n // 处理范围 n-m\n if (part.Contains(\"-\"))\n {\n string[] range = part.Split('-');\n int start = int.Parse(range[0]);\n int end = int.Parse(range[1]);\n\n if (isWeekday)\n {\n string[] weekdays = { \"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\", \"星期日\" };\n return $\"从{weekdays[start]}到{weekdays[end]}\";\n }\n\n return $\"从{start}{unit}到{end}{unit}\";\n }\n\n // 处理列表 n,m,k\n if (part.Contains(\",\"))\n {\n string[] values = part.Split(',');\n if (isWeekday)\n {\n string[] weekdays = { \"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\", \"星期日\" };\n return string.Join(\"、\", values.Select(v => weekdays[int.Parse(v)]));\n }\n return $\"{string.Join(\"、\", values)}{unit}\";\n }\n\n // 处理单个数字\n int value = int.Parse(part);\n if (isWeekday)\n {\n string[] weekdays = { \"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\", \"星期日\" };\n return weekdays[value];\n }\n return $\"{value}{unit}\";\n }\n\n private void 切换cron表达式(object sender, EventArgs e)\n {\n if (textBox11.Visible)\n {\n textBox11.Visible = false;\n label2.Visible = true;\n numericUpDown2.Visible = true;\n Log(\"下次检查时间间隔 使用分钟倒计时\");\n }\n else\n {\n textBox11.Location = new Point(9, 48);\n textBox11.Visible = true;\n label2.Visible = false;\n numericUpDown2.Visible = false;\n Log(\"下次检查时间间隔 使用cron表达式\");\n }\n }\n\n /// \n /// 获取计算机名的MD5哈希值\n /// \n /// 返回计算机名的MD5哈希字符串(32位小写)\n private string GetComputerNameMD5()\n {\n try\n {\n // 获取计算机名\n string computerName = System.Environment.MachineName;\n\n // 引入必要的命名空间\n using (System.Security.Cryptography.MD5 md5 = System.Security.Cryptography.MD5.Create())\n {\n // 将计算机名转换为字节数组\n byte[] inputBytes = System.Text.Encoding.UTF8.GetBytes(computerName);\n\n // 计算MD5哈希值\n byte[] hashBytes = md5.ComputeHash(inputBytes);\n\n // 将字节数组转换为十六进制字符串\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < hashBytes.Length; i++)\n {\n sb.Append(hashBytes[i].ToString(\"x2\"));\n }\n\n return sb.ToString();\n }\n }\n catch (Exception ex)\n {\n Log($\"计算计算机名MD5时出错: {ex.Message}\", true);\n return \"CMLiussss\";\n }\n }\n\n // 添加辅助下载方法\n async Task DownloadFileAsync(HttpClient httpClient, string url, string filePath)\n {\n try\n {\n // 获取文件大小\n HttpResponseMessage headResponse = await httpClient.SendAsync(new HttpRequestMessage(HttpMethod.Head, url));\n headResponse.EnsureSuccessStatusCode(); // 确保请求成功\n long totalBytes = headResponse.Content.Headers.ContentLength ?? 0;\n\n // 下载文件\n using (var response = await httpClient.GetAsync(url, HttpCompletionOption.ResponseHeadersRead))\n {\n response.EnsureSuccessStatusCode(); // 确保请求成功\n\n using (var contentStream = await response.Content.ReadAsStreamAsync())\n using (var fileStream = new FileStream(filePath, FileMode.Create, FileAccess.Write, FileShare.None, 8192, true))\n {\n byte[] buffer = new byte[8192];\n long totalBytesRead = 0;\n int bytesRead;\n\n while ((bytesRead = await contentStream.ReadAsync(buffer, 0, buffer.Length)) > 0)\n {\n await fileStream.WriteAsync(buffer, 0, bytesRead);\n totalBytesRead += bytesRead;\n\n // 更新进度条\n if (totalBytes > 0)\n {\n int progressPercentage = (int)((totalBytesRead * 100) / totalBytes);\n progressPercentage = Math.Min(100, Math.Max(0, progressPercentage));\n progressBar1.Value = progressPercentage;\n }\n }\n }\n }\n\n return true; // 下载成功\n }\n catch\n {\n throw; // 重新抛出异常,让调用者处理\n }\n }\n\n private static about aboutWindow = null;\n private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n // 检查窗口是否已经打开\n if (aboutWindow != null && !aboutWindow.IsDisposed)\n {\n // 窗口已经存在,激活它\n aboutWindow.Activate();\n return;\n }\n\n // 需要创建新窗口\n this.BeginInvoke(new Action(() =>\n {\n // 创建about窗口实例\n aboutWindow = new about();\n\n // 传递版本号信息\n aboutWindow.GuiVersion = 当前GUI版本号;\n aboutWindow.CoreVersion = 当前subsCheck版本号;\n\n // 添加窗口关闭时的处理,清除静态引用\n aboutWindow.FormClosed += (s, args) => aboutWindow = null;\n\n // 非模态显示窗口\n aboutWindow.Show(this);\n\n // 设置TopMost确保窗口显示在最前面\n aboutWindow.TopMost = true;\n }));\n }\n\n private void button8_Click(object sender, EventArgs e)\n {\n try\n {\n // 创建MoreYAML窗口实例\n MoreYAML moreYamlWindow = new MoreYAML();\n\n // 显示为模态对话框,这会阻塞主线程直到窗口关闭\n DialogResult result = moreYamlWindow.ShowDialog(this);\n\n // 如果需要,可以处理对话框的返回结果\n if (result == DialogResult.OK)\n {\n // 用户点击了\"确定\"或某种完成操作的按钮\n Log(\"补充参数配置已成功保存到 more.yaml 文件!设置已应用\");\n }\n }\n catch (Exception ex)\n {\n Log($\"打开MoreYAML窗口时出错: {ex.Message}\", true);\n MessageBox.Show($\"打开MoreYAML窗口时出错: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n private async void checkBox5_CheckedChanged(object sender, EventArgs e)\n {\n checkBox5.Enabled = false;\n try\n {\n // 获取当前应用程序的可执行文件路径\n string appPath = Application.ExecutablePath;\n // 获取应用程序名称(不包含扩展名)\n string appName = Path.GetFileNameWithoutExtension(appPath);\n // 获取启动文件夹的路径\n string startupFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.Startup);\n // 快捷方式文件的完整路径\n string shortcutPath = Path.Combine(startupFolderPath, $\"{appName}.lnk\");\n\n if (checkBox5.Checked)\n {\n // 检查启动文件夹中是否已存在该快捷方式\n if (File.Exists(shortcutPath))\n {\n Log(\"开机启动项已存在,无需重复创建\");\n }\n else\n {\n // 创建快捷方式\n CreateShortcut(appPath, shortcutPath, \"-auto\");\n Log(\"已成功创建开机启动项,下次电脑启动时将自动运行程序\");\n }\n }\n else\n {\n // 删除启动项\n if (File.Exists(shortcutPath))\n {\n File.Delete(shortcutPath);\n Log(\"已移除开机启动项,下次开机将不会自动启动\");\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"设置开机启动项时出错: {ex.Message}\", true);\n MessageBox.Show($\"设置开机启动项失败: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n\n // 恢复CheckBox状态,避免UI状态与实际状态不一致\n checkBox5.CheckedChanged -= checkBox5_CheckedChanged;\n checkBox5.Checked = !checkBox5.Checked;\n checkBox5.CheckedChanged += checkBox5_CheckedChanged;\n }\n checkBox5.Enabled = true;\n await SaveConfig(false);\n }\n\n /// \n /// 创建指向指定路径应用程序的快捷方式\n /// \n /// 目标应用程序的完整路径\n /// 要创建的快捷方式的完整路径\n /// 可选的启动参数\n private void CreateShortcut(string targetPath, string shortcutPath, string arguments = \"\")\n {\n // 使用COM接口创建快捷方式\n Type t = Type.GetTypeFromProgID(\"WScript.Shell\");\n dynamic shell = Activator.CreateInstance(t);\n var shortcut = shell.CreateShortcut(shortcutPath);\n\n shortcut.TargetPath = targetPath;\n if (!string.IsNullOrEmpty(arguments))\n shortcut.Arguments = arguments; // 设置启动参数\n\n shortcut.WorkingDirectory = Path.GetDirectoryName(targetPath);\n shortcut.WindowStyle = 7; // 最小化启动: 7, 正常启动: 1, 最大化启动: 3\n shortcut.Description = \"SubsCheck Win GUI自启动快捷方式\";\n shortcut.IconLocation = targetPath + \",0\"; // 使用应用程序自身的图标\n\n // 保存快捷方式\n shortcut.Save();\n\n // 释放COM对象\n System.Runtime.InteropServices.Marshal.FinalReleaseComObject(shortcut);\n System.Runtime.InteropServices.Marshal.FinalReleaseComObject(shell);\n }\n\n /// \n /// 检查启动参数中是否包含指定的参数\n /// \n /// 要检查的参数名称,例如\"-autoup\"\n /// 如果存在指定参数,则返回true;否则返回false\n private bool CheckCommandLineParameter(string parameterName)\n {\n // 获取命令行参数数组\n string[] args = Environment.GetCommandLineArgs();\n\n // 遍历所有参数,检查是否有匹配的参数\n foreach (string arg in args)\n {\n // 不区分大小写比较\n if (string.Equals(arg, parameterName, StringComparison.OrdinalIgnoreCase))\n {\n return true;\n }\n }\n\n return false;\n }\n\n private void richTextBox1_DoubleClick(object sender, EventArgs e)\n {\n // 检查是否有日志内容\n if (richTextBox1.TextLength > 0)\n {\n // 显示确认对话框,询问用户是否要清空日志\n DialogResult result = MessageBox.Show(\n \"是否要清空当前日志?\",\n \"清空日志确认\",\n MessageBoxButtons.YesNo,\n MessageBoxIcon.Question,\n MessageBoxDefaultButton.Button2); // 默认选择\"否\"按钮\n\n if (result == DialogResult.Yes)\n {\n // 清空richTextBox1内容\n richTextBox1.Clear();\n // 记录一条清空日志的操作信息\n Log(\"日志已清空\");\n }\n }\n }\n\n private void numericUpDown4_ValueChanged(object sender, EventArgs e)\n {\n if (numericUpDown4.Value > 4096)\n {\n string warningMessage =\n \"⚠️ 测速下限设置提醒 ⚠️\\n\\n\" +\n \"您设置的测速下限值过高,可能导致:\\n\\n\" +\n \"• 可用节点数量显著减少\\n\" +\n \"• 部分低速但稳定的节点被过滤\\n\" +\n \"测速下限设置建议:\\n\" +\n \"• 日常浏览:512-1024 KB/s\\n\" +\n \"• 视频观看:1024-2048 KB/s\\n\" +\n \"• 大文件下载:根据实际需求设置\\n\";\n\n Log(warningMessage);\n }\n }\n\n private void numericUpDown3_ValueChanged(object sender, EventArgs e)\n {\n if (numericUpDown3.Value < 5000)\n {\n string warningMessage =\n \"⚠️ 超时时间设置提醒 ⚠️\\n\\n\" +\n \"该超时时间并非延迟时间,除非您的网络极其优秀,否则超时时间过低会导致无可用节点。\\n\\n\" +\n \"• 超时时间是真连接测试的最大等待时间\\n\" +\n \"• 设置过低会导致大部分节点连接失败\\n\" +\n \"• 推荐设置不低于5000ms\\n\\n\" +\n \"建议超时时间设置:\\n\" +\n \"• 普通网络环境:5000± ms\\n\" +\n \"• 极好网络环境:3000± ms\\n\";\n\n Log(warningMessage);\n }\n\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/EditURLs.cs", "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nusing System.Linq;\nusing System.Net.Http;\nusing System.Security.Policy;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\nusing static System.Windows.Forms.VisualStyles.VisualStyleElement;\n\nnamespace subs_check.win.gui\n{\n public partial class EditURLs: Form\n {\n // 添加一个属性用于存储和传递文本内容\n public string UrlContent { get; set; }\n public System.Windows.Forms.ComboBox.ObjectCollection githubProxys { get; set; }\n public string githubProxy { get; set; }\n string githubProxyURL;\n string SubsCheckURLs;\n public EditURLs()\n {\n InitializeComponent();\n\n // 设置textBox1的锚点为上、左、右\n textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom;\n\n // 设置button1、button2、button3的锚点为左、下\n button1.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;\n button2.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;\n button3.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;\n\n // 设置button4的锚点为右、下\n button4.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;\n }\n\n // 加载窗体时处理传入的内容\n protected override void OnLoad(EventArgs e)\n {\n base.OnLoad(e);\n\n // 将传入的内容显示在textBox1中\n if (!string.IsNullOrEmpty(UrlContent)) textBox1.Text = UrlContent;\n\n timer1.Enabled = true;\n\n if (githubProxys != null)\n {\n comboBox1.Items.Clear();\n foreach (var item in githubProxys)\n {\n comboBox1.Items.Add(item);\n }\n }\n if (!string.IsNullOrEmpty(githubProxy)) comboBox1.Text = githubProxy;\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n // 将textBox1的内容保存到UrlContent属性\n UrlContent = textBox1.Text;\n\n // 设置对话框结果为OK并关闭窗口\n this.DialogResult = DialogResult.OK;\n this.Close();\n }\n\n private void button4_Click(object sender, EventArgs e)\n {\n this.Close();\n }\n\n private void button3_Click(object sender, EventArgs e)\n {\n // 确保有内容需要处理\n if (string.IsNullOrWhiteSpace(textBox1.Text))\n return;\n\n // 按行分割文本\n string[] lines = textBox1.Text.Split(\n new[] { \"\\r\\n\", \"\\r\", \"\\n\" },\n StringSplitOptions.RemoveEmptyEntries);\n\n // 去除每行首尾的空白字符\n for (int i = 0; i < lines.Length; i++)\n {\n lines[i] = lines[i].Trim();\n }\n\n // 使用LINQ的Distinct()方法去重,并过滤掉空行\n string[] uniqueLines = lines\n .Where(line => !string.IsNullOrWhiteSpace(line))\n .Distinct(StringComparer.OrdinalIgnoreCase) // 忽略大小写进行去重\n .ToArray();\n\n // 将去重后的内容设回textBox1\n textBox1.Text = string.Join(Environment.NewLine, uniqueLines) + \"\\n\";\n\n // 可选:显示去重结果\n int removed = lines.Length - uniqueLines.Length;\n if (removed > 0)\n {\n MessageBox.Show($\"已移除 {removed} 个重复行。\", \"去重完成\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n else\n {\n MessageBox.Show(\"没有发现重复行。\", \"去重完成\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n }\n\n private async void timer1_Tick(object sender, EventArgs e)\n {\n timer1.Enabled = false;\n\n if (comboBox1.Text == \"自动选择\")\n {\n // 创建不包含\"自动选择\"的代理列表\n List proxyItems = new List();\n for (int j = 0; j < comboBox1.Items.Count; j++)\n {\n string proxyItem = comboBox1.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n\n // 随机打乱列表顺序\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n\n // 异步检测可用代理\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n }\n else\n {\n githubProxyURL = $\"https://{comboBox1.Text}/\";\n }\n\n string SubsCheckURLsURL = $\"{githubProxyURL}https://raw.githubusercontent.com/cmliu/cmliu/main/SubsCheck-URLs\";\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); // 设置5秒超时\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n\n // 使用异步方式检查URL可访问性\n HttpResponseMessage response = await client.GetAsync(SubsCheckURLsURL);\n if (response.IsSuccessStatusCode)\n {\n button2.Text = \"在线获取\";\n button2.Enabled = true;\n SubsCheckURLs = await response.Content.ReadAsStringAsync();\n //MessageBox.Show(SubsCheckURLs);\n }\n else\n {\n button2.Text = \"获取失败\";\n button2.Enabled = false;\n }\n }\n }\n catch (Exception ex)\n {\n Console.WriteLine($\"Error: {ex.Message}\");\n // 网络错误或其他异常情况\n button2.Text = \"获取失败\";\n button2.Enabled = false;\n }\n }\n\n // 创建专用方法用于异步检测GitHub代理\n private async Task DetectGitHubProxyAsync(List proxyItems)\n {\n string detectedProxyURL = \"\";\n\n // 遍历随机排序后的代理列表\n foreach (string proxyItem in proxyItems)\n {\n string checkUrl = $\"https://{proxyItem}/https://raw.githubusercontent.com/cmliu/SubsCheck-Win-GUI/master/packages.config\";\n\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); // 设置5秒超时\n // 添加User-Agent头,避免被拒绝访问\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n\n // 使用异步方式\n HttpResponseMessage response = await client.GetAsync(checkUrl);\n if (response.IsSuccessStatusCode)\n {\n // 找到可用代理\n detectedProxyURL = $\"https://{proxyItem}/\";\n break;\n }\n }\n }\n catch (Exception ex)\n {\n // 记录错误但继续尝试下一个\n Console.WriteLine($\"Error: {ex.Message}\");\n }\n }\n return detectedProxyURL;\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n // 检查是否已成功获取在线内容\n if (string.IsNullOrEmpty(SubsCheckURLs))\n {\n MessageBox.Show(\"未能获取在线内容,请重试。\", \"获取失败\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n return;\n }\n\n // 显示带有\"覆盖\"和\"追加\"选项的对话框\n DialogResult result = MessageBox.Show(\n \"请选择如何处理获取到的内容:\\n\\n\" +\n \"- 点击【是】将覆盖当前内容\\n\" +\n \"- 点击【否】将追加到当前内容后面\\n\" +\n \"- 点击【取消】不做任何操作\",\n \"操作选择\",\n MessageBoxButtons.YesNoCancel,\n MessageBoxIcon.Question);\n\n // 根据用户选择执行对应操作\n if (result == DialogResult.Yes)\n {\n // 覆盖操作\n // 确保所有换行符格式一致 (将单独的\\n或\\r替换为Windows风格的\\r\\n)\n string normalizedText = NormalizeLineEndings(SubsCheckURLs);\n textBox1.Text = normalizedText;\n MessageBox.Show(\"已用在线内容覆盖原有内容。\", \"感谢大自然的馈赠\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n else if (result == DialogResult.No)\n {\n // 追加操作\n // 确保原有内容末尾有换行符\n if (!textBox1.Text.EndsWith(\"\\r\\n\") && !textBox1.Text.EndsWith(\"\\n\"))\n {\n textBox1.Text += Environment.NewLine;\n }\n\n // 追加新内容,确保换行符格式一致\n textBox1.Text += NormalizeLineEndings(SubsCheckURLs);\n MessageBox.Show(\"已将在线内容追加到原有内容后。\", \"感谢大自然的馈赠\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n\n // 如果用户选择\"取消\",不执行任何操作\n }\n\n // 标准化文本中的换行符为Windows风格 (\\r\\n)\n private string NormalizeLineEndings(string text)\n {\n if (string.IsNullOrEmpty(text))\n return string.Empty;\n\n // 先将所有类型的换行符替换为\\n\n text = text.Replace(\"\\r\\n\", \"\\n\").Replace(\"\\r\", \"\\n\");\n // 然后将\\n替换为\\r\\n\n text = text.Replace(\"\\n\", Environment.NewLine);\n\n return text;\n }\n\n }\n}\n"], ["/SubsCheck-Win-GUI/CheckUpdates.cs", "using Newtonsoft.Json.Linq;\nusing System;\nusing System.Collections.Generic;\nusing System.Data;\nusing System.Linq;\nusing System.Net.Http;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\nusing static System.Windows.Forms.VisualStyles.VisualStyleElement;\n\nnamespace subs_check.win.gui\n{\n public partial class CheckUpdates : Form\n {\n // 添加一个属性用于存储和传递文本内容\n public string UrlContent { get; set; }\n public System.Windows.Forms.ComboBox.ObjectCollection githubProxys { get; set; }\n public string githubProxy { get; set; }\n string githubProxyURL;\n public string 当前subsCheck版本号 { get; set; }\n public string 当前GUI版本号 { get; set; }\n public string 最新GUI版本号 { get; set; }\n\n public CheckUpdates()\n {\n InitializeComponent();\n }\n\n protected override void OnLoad(EventArgs e)\n {\n base.OnLoad(e);\n\n timer1.Enabled = true;\n\n if (githubProxys != null)\n {\n comboBox1.Items.Clear();\n foreach (var item in githubProxys)\n {\n comboBox1.Items.Add(item);\n }\n }\n if (!string.IsNullOrEmpty(githubProxy)) comboBox1.Text = githubProxy;\n }\n\n private async void timer1_Tick(object sender, EventArgs e)\n {\n timer1.Enabled = false;\n label3.Text = 最新GUI版本号;\n label4.Text = 当前GUI版本号;\n\n label5.Text = 当前subsCheck版本号;\n\n if (comboBox1.Text == \"自动选择\")\n {\n // 创建不包含\"自动选择\"的代理列表\n List proxyItems = new List();\n for (int j = 0; j < comboBox1.Items.Count; j++)\n {\n string proxyItem = comboBox1.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n\n // 随机打乱列表顺序\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n\n // 异步检测可用代理\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n }\n else\n {\n githubProxyURL = $\"https://{comboBox1.Text}/\";\n }\n\n if (最新GUI版本号 != 当前GUI版本号)\n {\n // 检查当前目录下是否存在 Upgrade.exe\n string upgradeExePath = System.IO.Path.Combine(Application.StartupPath, \"Upgrade.exe\");\n if (System.IO.File.Exists(upgradeExePath))\n {\n button1.Text = \"立即更新\";\n button1.Enabled = true;\n }\n else\n {\n button1.Text = \"缺少更新程序\";\n button1.Enabled = false;\n }\n }\n else\n {\n button1.Text = \"已是最新版本\";\n button1.Enabled = false;\n }\n\n using (HttpClient client = new HttpClient())\n {\n try\n {\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n client.Timeout = TimeSpan.FromSeconds(30); // 增加超时时间以适应下载需求\n\n string url = \"https://api.github.com/repos/beck-8/subs-check/releases/latest\";\n string 备用url = \"https://api.github.cmliussss.net/repos/beck-8/subs-check/releases/latest\";\n\n HttpResponseMessage response = null;\n string responseBody = null;\n JObject json = null;\n\n // 先尝试主URL\n try\n {\n response = await client.GetAsync(url);\n\n // 如果主URL请求成功返回有效数据\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从主API获取版本信息\");\n }\n // 如果主URL请求不成功但没有抛出异常\n else\n {\n Console.WriteLine($\"主API请求失败 HTTP {(int)response.StatusCode},尝试备用API...\");\n response = await client.GetAsync(备用url);\n\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用API获取版本信息\");\n }\n else\n {\n Console.WriteLine($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return; // 两个URL都失败,提前退出\n }\n }\n }\n // 捕获网络请求异常(如连接超时、无法解析域名等)\n catch (HttpRequestException ex)\n {\n Console.WriteLine($\"主API请求出错: {ex.Message},尝试备用API...\");\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用API获取版本信息\");\n }\n else\n {\n Console.WriteLine($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return; // 备用URL也失败,提前退出\n }\n }\n catch (Exception backupEx)\n {\n Console.WriteLine($\"备用API请求也出错: {backupEx.Message}\", true);\n return; // 连备用URL也异常,提前退出\n }\n }\n // 捕获JSON解析异常\n catch (Newtonsoft.Json.JsonException ex)\n {\n Console.WriteLine($\"解析JSON数据出错: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用API获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n Console.WriteLine($\"备用API请求也出错: {backupEx.Message}\", true);\n return; // 连备用URL也有问题,提前退出\n }\n }\n // 捕获其他所有异常\n catch (Exception ex)\n {\n Console.WriteLine($\"获取版本信息时出现未预期的错误: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用URL获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n //控制台打印错误\n Console.WriteLine($\"备用API请求也出错: {backupEx.Message}\", true);\n return; // 连备用URL也有问题,提前退出\n }\n }\n\n // 如果成功获取了JSON数据,继续处理\n if (json != null)\n {\n string latestVersion = json[\"tag_name\"].ToString();\n label6.Text = latestVersion;\n if (当前subsCheck版本号 != latestVersion)\n {\n button2.Text = \"立即更新\";\n button2.Enabled = true;\n }\n else\n {\n button2.Text = \"已是最新版本\";\n button2.Enabled = false;\n }\n }\n\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"下载 subs-check.exe 时出错: {ex.Message}\\n\\n请前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n }\n\n // 创建专用方法用于异步检测GitHub代理\n private async Task DetectGitHubProxyAsync(List proxyItems)\n {\n string detectedProxyURL = \"\";\n\n // 遍历随机排序后的代理列表\n foreach (string proxyItem in proxyItems)\n {\n string checkUrl = $\"https://{proxyItem}/https://raw.githubusercontent.com/cmliu/SubsCheck-Win-GUI/master/packages.config\";\n\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); // 设置5秒超时\n // 添加User-Agent头,避免被拒绝访问\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n\n // 使用异步方式\n HttpResponseMessage response = await client.GetAsync(checkUrl);\n if (response.IsSuccessStatusCode)\n {\n // 找到可用代理\n detectedProxyURL = $\"https://{proxyItem}/\";\n break;\n }\n }\n }\n catch (Exception ex)\n {\n // 记录错误但继续尝试下一个\n Console.WriteLine($\"Error: {ex.Message}\");\n }\n }\n return detectedProxyURL;\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n // 设置对话框结果为OK,表示用户点击了\"立即更新\"按钮\n this.DialogResult = DialogResult.OK;\n\n // 关闭窗口\n this.Close();\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n //下载链接\n string downloadURL = $\"{githubProxyURL}https://github.com/cmliu/SubsCheck-Win-GUI/releases/download/{最新GUI版本号}/SubsCheck_Win_GUI.zip\";\n //目标文件\n string downloadEXE = \"subs-check.win.gui.exe\";\n\n try\n {\n // 获取应用程序目录\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n // 创建 Upgrade.ini 文件路径\n string iniFilePath = System.IO.Path.Combine(executablePath, \"Upgrade.ini\");\n\n // 准备 INI 文件内容\n string iniContent =\n \"[Upgrade]\\r\\n\" +\n $\"DownloadURL={downloadURL}\\r\\n\" +\n $\"TargetFile={downloadEXE}\\r\\n\";\n\n // 写入文件(如果文件已存在会被覆盖)\n System.IO.File.WriteAllText(iniFilePath, iniContent);\n\n DialogResult result = MessageBox.Show(\n $\"发现新版本: {最新GUI版本号}\\n\\n\" +\n \"· 点击【确定】将下载并安装更新\\n\" +\n \"· 更新过程中程序会自动关闭并重启\\n\" +\n \"· 更新完成后所有设置将保持不变\\n\\n\" +\n \"是否立即更新到最新版本?\",\n \"发现新版本\",\n MessageBoxButtons.OKCancel,\n MessageBoxIcon.Information);\n\n if (result == DialogResult.OK)\n {\n // 检查目标文件是否存在\n string targetFilePath = System.IO.Path.Combine(Application.StartupPath, \"Upgrade.exe\");\n if (System.IO.File.Exists(targetFilePath))\n {\n // 使用Process.Start异步启动应用程序\n System.Diagnostics.Process.Start(targetFilePath);\n this.Close();\n }\n else\n {\n MessageBox.Show(\"更新程序 Upgrade.exe 不存在!\",\n \"错误\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Error);\n }\n }\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"写入更新信息时出错: {ex.Message}\",\n \"错误\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Error);\n }\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/MoreYAML.cs", "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Diagnostics;\nusing System.Drawing;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\n\nnamespace subs_check.win.gui\n{\n public partial class MoreYAML : Form\n {\n string 初始化;\n public MoreYAML()\n {\n InitializeComponent();\n\n \n // 移除文本框的等待光标\n textBox1.UseWaitCursor = false;\n 初始化 = textBox1.Text;\n\n // 设置 groupBox1 的 Anchor 属性,使其跟随窗体四边缩放\n groupBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;\n\n // 设置文本框跟随 groupBox1 缩放\n textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;\n\n // 设置 linkLabel1 固定在右上角\n linkLabel1.Anchor = AnchorStyles.Top | AnchorStyles.Right;\n\n // 设置按钮固定在底部\n button1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;\n button3.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;\n button2.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;\n \n // 检查并加载配置文件\n LoadMoreYamlConfig();\n }\n\n /// \n /// 检查并加载 more.yaml 配置文件\n /// \n private void LoadMoreYamlConfig()\n {\n try\n {\n // 获取当前程序的执行路径\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n // 指定config目录路径\n string configFolderPath = System.IO.Path.Combine(executablePath, \"config\");\n // 指定more.yaml文件的完整路径\n string moreYamlFilePath = System.IO.Path.Combine(configFolderPath, \"more.yaml\");\n\n // 检查文件是否存在\n if (System.IO.File.Exists(moreYamlFilePath))\n {\n // 读取文件内容并赋值给textBox1\n string yamlContent = System.IO.File.ReadAllText(moreYamlFilePath, Encoding.UTF8);\n textBox1.Text = yamlContent;\n }\n }\n catch (Exception ex)\n {\n // 读取文件时出错,可以选择是否显示错误信息\n MessageBox.Show($\"读取配置文件时发生错误:{ex.Message}\", \"提示\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n this.Close();\n }\n\n private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/beck-8/subs-check/blob/master/config/config.example.yaml\");\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n try\n {\n // 验证textbox1的内容是否符合YAML格式\n if (!IsValidYaml(textBox1.Text))\n {\n MessageBox.Show(\"输入的内容不符合YAML格式,请检查后重试!\", \"格式错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Warning);\n return;\n }\n\n // 获取当前程序的执行路径\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n // 指定config目录路径\n string configFolderPath = System.IO.Path.Combine(executablePath, \"config\");\n // 指定more.yaml文件的完整路径\n string moreYamlFilePath = System.IO.Path.Combine(configFolderPath, \"more.yaml\");\n\n // 确保config目录存在\n if (!System.IO.Directory.Exists(configFolderPath))\n {\n System.IO.Directory.CreateDirectory(configFolderPath);\n }\n\n // 将textBox1的内容写入more.yaml文件\n System.IO.File.WriteAllText(moreYamlFilePath, textBox1.Text, Encoding.UTF8);\n\n // 设置对话框结果为OK并关闭窗口\n this.DialogResult = DialogResult.OK;\n this.Close();\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"保存配置文件时发生错误:{ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n /// \n /// 验证字符串是否为有效的YAML格式\n /// \n /// 要验证的YAML字符串\n /// 如果是有效的YAML格式,返回true;否则返回false\n private bool IsValidYaml(string yamlContent)\n {\n if (string.IsNullOrWhiteSpace(yamlContent))\n return true; // 空内容被视为有效(可以根据需要更改)\n\n try\n {\n // 使用YamlDotNet尝试解析YAML内容\n var deserializer = new YamlDotNet.Serialization.Deserializer();\n deserializer.Deserialize(yamlContent);\n return true;\n }\n catch (YamlDotNet.Core.YamlException)\n {\n // 捕获YAML解析异常,表示格式无效\n return false;\n }\n catch (Exception)\n {\n // 其他异常也视为格式无效\n return false;\n }\n }\n\n private void button3_Click(object sender, EventArgs e)\n {\n textBox1.Text = 初始化;\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/about.cs", "using System;\nusing System.Windows.Forms;\nusing System.Diagnostics;\n\nnamespace subs_check.win.gui\n{\n public partial class about : Form\n {\n // 添加两个公共属性来接收版本号\n public string GuiVersion { set { label2.Text = value; } }\n public string CoreVersion { set { label3.Text = value; } }\n\n public about()\n {\n InitializeComponent();\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n this.Close();\n }\n\n private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/beck-8/subs-check\");\n }\n\n private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://t.me/CMLiussss\");\n }\n\n private void linkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://url.cmliussss.com/SCWinGUI\");\n }\n\n private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/cmliu/SubsCheck-Win-GUI\");\n }\n\n private void linkLabel5_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/beck-8/subs-check\");\n }\n\n private void linkLabel6_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/bestruirui/BestSub\");\n }\n\n private void linkLabel8_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/sub-store-org/Sub-Store\");\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/Properties/Resources.Designer.cs", "//------------------------------------------------------------------------------\n// \n// 此代码由工具生成。\n// 运行时版本:4.0.30319.42000\n//\n// 对此文件的更改可能会导致不正确的行为,并且如果\n// 重新生成代码,这些更改将会丢失。\n// \n//------------------------------------------------------------------------------\n\nnamespace subs_check.win.gui.Properties {\n using System;\n \n \n /// \n /// 一个强类型的资源类,用于查找本地化的字符串等。\n /// \n // 此类是由 StronglyTypedResourceBuilder\n // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。\n // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen\n // (以 /str 作为命令选项),或重新生成 VS 项目。\n [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Resources.Tools.StronglyTypedResourceBuilder\", \"17.0.0.0\")]\n [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\n internal class Resources {\n \n private static global::System.Resources.ResourceManager resourceMan;\n \n private static global::System.Globalization.CultureInfo resourceCulture;\n \n [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\n internal Resources() {\n }\n \n /// \n /// 返回此类使用的缓存的 ResourceManager 实例。\n /// \n [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n internal static global::System.Resources.ResourceManager ResourceManager {\n get {\n if (object.ReferenceEquals(resourceMan, null)) {\n global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(\"subs_check.win.gui.Properties.Resources\", typeof(Resources).Assembly);\n resourceMan = temp;\n }\n return resourceMan;\n }\n }\n \n /// \n /// 重写当前线程的 CurrentUICulture 属性,对\n /// 使用此强类型资源类的所有资源查找执行重写。\n /// \n [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n internal static global::System.Globalization.CultureInfo Culture {\n get {\n return resourceCulture;\n }\n set {\n resourceCulture = value;\n }\n }\n \n /// \n /// 查找 System.Byte[] 类型的本地化资源。\n /// \n internal static byte[] going {\n get {\n object obj = ResourceManager.GetObject(\"going\", resourceCulture);\n return ((byte[])(obj));\n }\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/Program.cs", "using System;\nusing System.Threading;\nusing System.Windows.Forms;\n\nnamespace subs_check.win.gui\n{\n static class Program\n {\n // 定义一个全局唯一的标识符,使用项目名称作为互斥体的名称\n private static string appMutexName = \"cmliu/SubsCheck-Win-GUI\";\n private static Mutex mutex;\n\n /// \n /// 应用程序的主入口点。\n /// \n [STAThread]\n static void Main()\n {\n // 尝试创建一个命名互斥体,如果已存在,则获取它\n bool createdNew;\n mutex = new Mutex(true, appMutexName, out createdNew);\n\n if (!createdNew)\n {\n // 如果互斥体已存在(即程序已在运行),则终止当前实例\n MessageBox.Show(\"应用程序已经在运行中。\", \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n return;\n }\n\n try\n {\n Application.EnableVisualStyles();\n Application.SetCompatibleTextRenderingDefault(false);\n Application.Run(new Form1());\n }\n finally\n {\n // 确保释放互斥体\n mutex.ReleaseMutex();\n }\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/Properties/Settings.Designer.cs", "//------------------------------------------------------------------------------\n// \n// 此代码由工具生成。\n// 运行时版本:4.0.30319.42000\n//\n// 对此文件的更改可能会导致不正确的行为,并且如果\n// 重新生成代码,这些更改将会丢失。\n// \n//------------------------------------------------------------------------------\n\nnamespace subs_check.win.gui.Properties {\n \n \n [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\n [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator\", \"17.13.0.0\")]\n internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {\n \n private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));\n \n public static Settings Default {\n get {\n return defaultInstance;\n }\n }\n }\n}\n"]], "task_instance_info": {"created_time": "2025-08-20 18:31:17", "created_task_model": "DeepSeek-R1", "class_skeleton": "partial\nclass\nEditURLs\n{\nprivate System.ComponentModel.IContainer components = null;\nprotected override void Dispose (bool disposing) {}\nprivate void InitializeComponent () {}\nprivate System.Windows.Forms.Button button1;\nprivate System.Windows.Forms.TextBox textBox1;\nprivate System.Windows.Forms.Button button2;\nprivate System.Windows.Forms.Button button3;\nprivate System.Windows.Forms.Button button4;\nprivate System.Windows.Forms.Timer timer1;\nprivate System.Windows.Forms.ComboBox comboBox1;\n}", "code_description": "This code segment functions to: Manage user interface elements for editing and processing URL lists through controls that enable text input, data deduplication, timed operations, and multiple action triggers while maintaining resource cleanup protocols."}, "inference_content": {"inference_model": "DeepSeek-R1", "inference_result": "```c_sharp\n[TASK_BEGIN]\nprivate void InitializeComponent()\n{\n this.components = new System.ComponentModel.Container();\n this.button1 = new System.Windows.Forms.Button();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.button2 = new System.Windows.Forms.Button();\n this.button3 = new System.Windows.Forms.Button();\n this.button4 = new System.Windows.Forms.Button();\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.SuspendLayout();\n // \n // button1\n // \n this.button1.Location = new System.Drawing.Point(258, 12);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"Add\";\n // \n // textBox1\n // \n this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) \n | System.Windows.Forms.AnchorStyles.Left) \n | System.Windows.Forms.AnchorStyles.Right)));\n this.textBox1.Location = new System.Drawing.Point(12, 41);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.Size = new System.Drawing.Size(321, 190);\n this.textBox1.TabIndex = 1;\n // \n // button2\n // \n this.button2.Location = new System.Drawing.Point(258, 41);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"Delete\";\n // \n // button3\n // \n this.button3.Location = new System.Drawing.Point(258, 70);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 3;\n this.button3.Text = \"Up\";\n // \n // button4\n // \n this.button4.Location = new System.Drawing.Point(258, 99);\n this.button4.Name = \"button4\";\n this.button4.Size = new System.Drawing.Size(75, 23);\n this.button4.TabIndex = 4;\n this.button4.Text = \"Down\";\n // \n // timer1\n // \n this.timer1.Interval = 300;\n // \n // comboBox1\n // \n this.comboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \n | System.Windows.Forms.AnchorStyles.Right)));\n this.comboBox1.FormattingEnabled = true;\n this.comboBox1.Location = new System.Drawing.Point(12, 12);\n this.comboBox1.Name = \"comboBox1\";\n this.comboBox1.Size = new System.Drawing.Size(240, 21);\n this.comboBox1.TabIndex = 5;\n // \n // EditURLs\n // \n this.ClientSize = new System.Drawing.Size(345, 243);\n this.Controls.Add(this.comboBox1);\n this.Controls.Add(this.button4);\n this.Controls.Add(this.button3);\n this.Controls.Add(this.button2);\n this.Controls.Add(this.textBox1);\n this.Controls.Add(this.button1);\n this.ResumeLayout(false);\n this.PerformLayout();\n}\n[TASK_END]\n```", "inference_time": "2025-08-20 18-31-58"}, "editdistance_info": {"edit_distance": 47.1083, "calculate_time": "2025-08-20 18:31:58", "true_code_clean": "partial class EditURLs\n {\n private System.ComponentModel.IContainer components = null;\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n #region Windows Form Designer generated code\n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n this.button1 = new System.Windows.Forms.Button();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.button2 = new System.Windows.Forms.Button();\n this.button3 = new System.Windows.Forms.Button();\n this.button4 = new System.Windows.Forms.Button();\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.SuspendLayout();\n this.button1.Font = new System.Drawing.Font(\"宋体\", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.button1.Location = new System.Drawing.Point(12, 415);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"保存\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n this.textBox1.Location = new System.Drawing.Point(12, 12);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both;\n this.textBox1.Size = new System.Drawing.Size(776, 397);\n this.textBox1.TabIndex = 1;\n this.button2.Enabled = false;\n this.button2.Location = new System.Drawing.Point(174, 415);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"等待获取\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n this.button3.Location = new System.Drawing.Point(93, 415);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 3;\n this.button3.Text = \"去重\";\n this.button3.UseVisualStyleBackColor = true;\n this.button3.Click += new System.EventHandler(this.button3_Click);\n this.button4.Location = new System.Drawing.Point(713, 415);\n this.button4.Name = \"button4\";\n this.button4.Size = new System.Drawing.Size(75, 23);\n this.button4.TabIndex = 4;\n this.button4.Text = \"返回\";\n this.button4.UseVisualStyleBackColor = true;\n this.button4.Click += new System.EventHandler(this.button4_Click);\n this.timer1.Tick += new System.EventHandler(this.timer1_Tick);\n this.comboBox1.FormattingEnabled = true;\n this.comboBox1.Location = new System.Drawing.Point(255, 418);\n this.comboBox1.Name = \"comboBox1\";\n this.comboBox1.Size = new System.Drawing.Size(120, 20);\n this.comboBox1.TabIndex = 22;\n this.comboBox1.Visible = false;\n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.ClientSize = new System.Drawing.Size(800, 450);\n this.Controls.Add(this.comboBox1);\n this.Controls.Add(this.button4);\n this.Controls.Add(this.button3);\n this.Controls.Add(this.button2);\n this.Controls.Add(this.textBox1);\n this.Controls.Add(this.button1);\n this.MinimizeBox = false;\n this.Name = \"EditURLs\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"编辑 节点池订阅链接\";\n this.ResumeLayout(false);\n this.PerformLayout();\n }\n #endregion\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.Button button3;\n private System.Windows.Forms.Button button4;\n private System.Windows.Forms.Timer timer1;\n private System.Windows.Forms.ComboBox comboBox1;\n }", "predict_code_clean": "private void InitializeComponent()\n{\n this.components = new System.ComponentModel.Container();\n this.button1 = new System.Windows.Forms.Button();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.button2 = new System.Windows.Forms.Button();\n this.button3 = new System.Windows.Forms.Button();\n this.button4 = new System.Windows.Forms.Button();\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.SuspendLayout();\n this.button1.Location = new System.Drawing.Point(258, 12);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"Add\";\n this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) \n | System.Windows.Forms.AnchorStyles.Left) \n | System.Windows.Forms.AnchorStyles.Right)));\n this.textBox1.Location = new System.Drawing.Point(12, 41);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.Size = new System.Drawing.Size(321, 190);\n this.textBox1.TabIndex = 1;\n this.button2.Location = new System.Drawing.Point(258, 41);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"Delete\";\n this.button3.Location = new System.Drawing.Point(258, 70);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 3;\n this.button3.Text = \"Up\";\n this.button4.Location = new System.Drawing.Point(258, 99);\n this.button4.Name = \"button4\";\n this.button4.Size = new System.Drawing.Size(75, 23);\n this.button4.TabIndex = 4;\n this.button4.Text = \"Down\";\n this.timer1.Interval = 300;\n this.comboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \n | System.Windows.Forms.AnchorStyles.Right)));\n this.comboBox1.FormattingEnabled = true;\n this.comboBox1.Location = new System.Drawing.Point(12, 12);\n this.comboBox1.Name = \"comboBox1\";\n this.comboBox1.Size = new System.Drawing.Size(240, 21);\n this.comboBox1.TabIndex = 5;\n this.ClientSize = new System.Drawing.Size(345, 243);\n this.Controls.Add(this.comboBox1);\n this.Controls.Add(this.button4);\n this.Controls.Add(this.button3);\n this.Controls.Add(this.button2);\n this.Controls.Add(this.textBox1);\n this.Controls.Add(this.button1);\n this.ResumeLayout(false);\n this.PerformLayout();\n}"}} {"repo_name": "SubsCheck-Win-GUI", "file_name": "/SubsCheck-Win-GUI/EditURLs.cs", "inference_info": {"prefix_code": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nusing System.Linq;\nusing System.Net.Http;\nusing System.Security.Policy;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\nusing static System.Windows.Forms.VisualStyles.VisualStyleElement;\n\nnamespace subs_check.win.gui\n{\n ", "suffix_code": "\n}\n", "middle_code": "public partial class EditURLs: Form\n {\n public string UrlContent { get; set; }\n public System.Windows.Forms.ComboBox.ObjectCollection githubProxys { get; set; }\n public string githubProxy { get; set; }\n string githubProxyURL;\n string SubsCheckURLs;\n public EditURLs()\n {\n InitializeComponent();\n textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom;\n button1.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;\n button2.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;\n button3.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;\n button4.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;\n }\n protected override void OnLoad(EventArgs e)\n {\n base.OnLoad(e);\n if (!string.IsNullOrEmpty(UrlContent)) textBox1.Text = UrlContent;\n timer1.Enabled = true;\n if (githubProxys != null)\n {\n comboBox1.Items.Clear();\n foreach (var item in githubProxys)\n {\n comboBox1.Items.Add(item);\n }\n }\n if (!string.IsNullOrEmpty(githubProxy)) comboBox1.Text = githubProxy;\n }\n private void button1_Click(object sender, EventArgs e)\n {\n UrlContent = textBox1.Text;\n this.DialogResult = DialogResult.OK;\n this.Close();\n }\n private void button4_Click(object sender, EventArgs e)\n {\n this.Close();\n }\n private void button3_Click(object sender, EventArgs e)\n {\n if (string.IsNullOrWhiteSpace(textBox1.Text))\n return;\n string[] lines = textBox1.Text.Split(\n new[] { \"\\r\\n\", \"\\r\", \"\\n\" },\n StringSplitOptions.RemoveEmptyEntries);\n for (int i = 0; i < lines.Length; i++)\n {\n lines[i] = lines[i].Trim();\n }\n string[] uniqueLines = lines\n .Where(line => !string.IsNullOrWhiteSpace(line))\n .Distinct(StringComparer.OrdinalIgnoreCase) \n .ToArray();\n textBox1.Text = string.Join(Environment.NewLine, uniqueLines) + \"\\n\";\n int removed = lines.Length - uniqueLines.Length;\n if (removed > 0)\n {\n MessageBox.Show($\"已移除 {removed} 个重复行。\", \"去重完成\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n else\n {\n MessageBox.Show(\"没有发现重复行。\", \"去重完成\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n }\n private async void timer1_Tick(object sender, EventArgs e)\n {\n timer1.Enabled = false;\n if (comboBox1.Text == \"自动选择\")\n {\n List proxyItems = new List();\n for (int j = 0; j < comboBox1.Items.Count; j++)\n {\n string proxyItem = comboBox1.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n }\n else\n {\n githubProxyURL = $\"https:\n }\n string SubsCheckURLsURL = $\"{githubProxyURL}https:\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); \n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n HttpResponseMessage response = await client.GetAsync(SubsCheckURLsURL);\n if (response.IsSuccessStatusCode)\n {\n button2.Text = \"在线获取\";\n button2.Enabled = true;\n SubsCheckURLs = await response.Content.ReadAsStringAsync();\n }\n else\n {\n button2.Text = \"获取失败\";\n button2.Enabled = false;\n }\n }\n }\n catch (Exception ex)\n {\n Console.WriteLine($\"Error: {ex.Message}\");\n button2.Text = \"获取失败\";\n button2.Enabled = false;\n }\n }\n private async Task DetectGitHubProxyAsync(List proxyItems)\n {\n string detectedProxyURL = \"\";\n foreach (string proxyItem in proxyItems)\n {\n string checkUrl = $\"https:\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); \n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n HttpResponseMessage response = await client.GetAsync(checkUrl);\n if (response.IsSuccessStatusCode)\n {\n detectedProxyURL = $\"https:\n break;\n }\n }\n }\n catch (Exception ex)\n {\n Console.WriteLine($\"Error: {ex.Message}\");\n }\n }\n return detectedProxyURL;\n }\n private void button2_Click(object sender, EventArgs e)\n {\n if (string.IsNullOrEmpty(SubsCheckURLs))\n {\n MessageBox.Show(\"未能获取在线内容,请重试。\", \"获取失败\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n return;\n }\n DialogResult result = MessageBox.Show(\n \"请选择如何处理获取到的内容:\\n\\n\" +\n \"- 点击【是】将覆盖当前内容\\n\" +\n \"- 点击【否】将追加到当前内容后面\\n\" +\n \"- 点击【取消】不做任何操作\",\n \"操作选择\",\n MessageBoxButtons.YesNoCancel,\n MessageBoxIcon.Question);\n if (result == DialogResult.Yes)\n {\n string normalizedText = NormalizeLineEndings(SubsCheckURLs);\n textBox1.Text = normalizedText;\n MessageBox.Show(\"已用在线内容覆盖原有内容。\", \"感谢大自然的馈赠\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n else if (result == DialogResult.No)\n {\n if (!textBox1.Text.EndsWith(\"\\r\\n\") && !textBox1.Text.EndsWith(\"\\n\"))\n {\n textBox1.Text += Environment.NewLine;\n }\n textBox1.Text += NormalizeLineEndings(SubsCheckURLs);\n MessageBox.Show(\"已将在线内容追加到原有内容后。\", \"感谢大自然的馈赠\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n }\n private string NormalizeLineEndings(string text)\n {\n if (string.IsNullOrEmpty(text))\n return string.Empty;\n text = text.Replace(\"\\r\\n\", \"\\n\").Replace(\"\\r\", \"\\n\");\n text = text.Replace(\"\\n\", Environment.NewLine);\n return text;\n }\n }", "code_description": null, "fill_type": "CLASS_TYPE", "language_type": "c_sharp", "sub_task_type": null}, "context_code": [["/SubsCheck-Win-GUI/CheckUpdates.cs", "using Newtonsoft.Json.Linq;\nusing System;\nusing System.Collections.Generic;\nusing System.Data;\nusing System.Linq;\nusing System.Net.Http;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\nusing static System.Windows.Forms.VisualStyles.VisualStyleElement;\n\nnamespace subs_check.win.gui\n{\n public partial class CheckUpdates : Form\n {\n // 添加一个属性用于存储和传递文本内容\n public string UrlContent { get; set; }\n public System.Windows.Forms.ComboBox.ObjectCollection githubProxys { get; set; }\n public string githubProxy { get; set; }\n string githubProxyURL;\n public string 当前subsCheck版本号 { get; set; }\n public string 当前GUI版本号 { get; set; }\n public string 最新GUI版本号 { get; set; }\n\n public CheckUpdates()\n {\n InitializeComponent();\n }\n\n protected override void OnLoad(EventArgs e)\n {\n base.OnLoad(e);\n\n timer1.Enabled = true;\n\n if (githubProxys != null)\n {\n comboBox1.Items.Clear();\n foreach (var item in githubProxys)\n {\n comboBox1.Items.Add(item);\n }\n }\n if (!string.IsNullOrEmpty(githubProxy)) comboBox1.Text = githubProxy;\n }\n\n private async void timer1_Tick(object sender, EventArgs e)\n {\n timer1.Enabled = false;\n label3.Text = 最新GUI版本号;\n label4.Text = 当前GUI版本号;\n\n label5.Text = 当前subsCheck版本号;\n\n if (comboBox1.Text == \"自动选择\")\n {\n // 创建不包含\"自动选择\"的代理列表\n List proxyItems = new List();\n for (int j = 0; j < comboBox1.Items.Count; j++)\n {\n string proxyItem = comboBox1.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n\n // 随机打乱列表顺序\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n\n // 异步检测可用代理\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n }\n else\n {\n githubProxyURL = $\"https://{comboBox1.Text}/\";\n }\n\n if (最新GUI版本号 != 当前GUI版本号)\n {\n // 检查当前目录下是否存在 Upgrade.exe\n string upgradeExePath = System.IO.Path.Combine(Application.StartupPath, \"Upgrade.exe\");\n if (System.IO.File.Exists(upgradeExePath))\n {\n button1.Text = \"立即更新\";\n button1.Enabled = true;\n }\n else\n {\n button1.Text = \"缺少更新程序\";\n button1.Enabled = false;\n }\n }\n else\n {\n button1.Text = \"已是最新版本\";\n button1.Enabled = false;\n }\n\n using (HttpClient client = new HttpClient())\n {\n try\n {\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n client.Timeout = TimeSpan.FromSeconds(30); // 增加超时时间以适应下载需求\n\n string url = \"https://api.github.com/repos/beck-8/subs-check/releases/latest\";\n string 备用url = \"https://api.github.cmliussss.net/repos/beck-8/subs-check/releases/latest\";\n\n HttpResponseMessage response = null;\n string responseBody = null;\n JObject json = null;\n\n // 先尝试主URL\n try\n {\n response = await client.GetAsync(url);\n\n // 如果主URL请求成功返回有效数据\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从主API获取版本信息\");\n }\n // 如果主URL请求不成功但没有抛出异常\n else\n {\n Console.WriteLine($\"主API请求失败 HTTP {(int)response.StatusCode},尝试备用API...\");\n response = await client.GetAsync(备用url);\n\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用API获取版本信息\");\n }\n else\n {\n Console.WriteLine($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return; // 两个URL都失败,提前退出\n }\n }\n }\n // 捕获网络请求异常(如连接超时、无法解析域名等)\n catch (HttpRequestException ex)\n {\n Console.WriteLine($\"主API请求出错: {ex.Message},尝试备用API...\");\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用API获取版本信息\");\n }\n else\n {\n Console.WriteLine($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return; // 备用URL也失败,提前退出\n }\n }\n catch (Exception backupEx)\n {\n Console.WriteLine($\"备用API请求也出错: {backupEx.Message}\", true);\n return; // 连备用URL也异常,提前退出\n }\n }\n // 捕获JSON解析异常\n catch (Newtonsoft.Json.JsonException ex)\n {\n Console.WriteLine($\"解析JSON数据出错: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用API获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n Console.WriteLine($\"备用API请求也出错: {backupEx.Message}\", true);\n return; // 连备用URL也有问题,提前退出\n }\n }\n // 捕获其他所有异常\n catch (Exception ex)\n {\n Console.WriteLine($\"获取版本信息时出现未预期的错误: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用URL获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n //控制台打印错误\n Console.WriteLine($\"备用API请求也出错: {backupEx.Message}\", true);\n return; // 连备用URL也有问题,提前退出\n }\n }\n\n // 如果成功获取了JSON数据,继续处理\n if (json != null)\n {\n string latestVersion = json[\"tag_name\"].ToString();\n label6.Text = latestVersion;\n if (当前subsCheck版本号 != latestVersion)\n {\n button2.Text = \"立即更新\";\n button2.Enabled = true;\n }\n else\n {\n button2.Text = \"已是最新版本\";\n button2.Enabled = false;\n }\n }\n\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"下载 subs-check.exe 时出错: {ex.Message}\\n\\n请前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n }\n\n // 创建专用方法用于异步检测GitHub代理\n private async Task DetectGitHubProxyAsync(List proxyItems)\n {\n string detectedProxyURL = \"\";\n\n // 遍历随机排序后的代理列表\n foreach (string proxyItem in proxyItems)\n {\n string checkUrl = $\"https://{proxyItem}/https://raw.githubusercontent.com/cmliu/SubsCheck-Win-GUI/master/packages.config\";\n\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); // 设置5秒超时\n // 添加User-Agent头,避免被拒绝访问\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n\n // 使用异步方式\n HttpResponseMessage response = await client.GetAsync(checkUrl);\n if (response.IsSuccessStatusCode)\n {\n // 找到可用代理\n detectedProxyURL = $\"https://{proxyItem}/\";\n break;\n }\n }\n }\n catch (Exception ex)\n {\n // 记录错误但继续尝试下一个\n Console.WriteLine($\"Error: {ex.Message}\");\n }\n }\n return detectedProxyURL;\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n // 设置对话框结果为OK,表示用户点击了\"立即更新\"按钮\n this.DialogResult = DialogResult.OK;\n\n // 关闭窗口\n this.Close();\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n //下载链接\n string downloadURL = $\"{githubProxyURL}https://github.com/cmliu/SubsCheck-Win-GUI/releases/download/{最新GUI版本号}/SubsCheck_Win_GUI.zip\";\n //目标文件\n string downloadEXE = \"subs-check.win.gui.exe\";\n\n try\n {\n // 获取应用程序目录\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n // 创建 Upgrade.ini 文件路径\n string iniFilePath = System.IO.Path.Combine(executablePath, \"Upgrade.ini\");\n\n // 准备 INI 文件内容\n string iniContent =\n \"[Upgrade]\\r\\n\" +\n $\"DownloadURL={downloadURL}\\r\\n\" +\n $\"TargetFile={downloadEXE}\\r\\n\";\n\n // 写入文件(如果文件已存在会被覆盖)\n System.IO.File.WriteAllText(iniFilePath, iniContent);\n\n DialogResult result = MessageBox.Show(\n $\"发现新版本: {最新GUI版本号}\\n\\n\" +\n \"· 点击【确定】将下载并安装更新\\n\" +\n \"· 更新过程中程序会自动关闭并重启\\n\" +\n \"· 更新完成后所有设置将保持不变\\n\\n\" +\n \"是否立即更新到最新版本?\",\n \"发现新版本\",\n MessageBoxButtons.OKCancel,\n MessageBoxIcon.Information);\n\n if (result == DialogResult.OK)\n {\n // 检查目标文件是否存在\n string targetFilePath = System.IO.Path.Combine(Application.StartupPath, \"Upgrade.exe\");\n if (System.IO.File.Exists(targetFilePath))\n {\n // 使用Process.Start异步启动应用程序\n System.Diagnostics.Process.Start(targetFilePath);\n this.Close();\n }\n else\n {\n MessageBox.Show(\"更新程序 Upgrade.exe 不存在!\",\n \"错误\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Error);\n }\n }\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"写入更新信息时出错: {ex.Message}\",\n \"错误\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Error);\n }\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/Form1.cs", "using Newtonsoft.Json.Linq;\nusing System;\nusing System.Collections.Generic;\nusing System.Data;\nusing System.Diagnostics;\nusing System.Drawing;\nusing System.IO;\nusing System.IO.Compression;\nusing System.Linq;\nusing System.Net.Http;\nusing System.Net.NetworkInformation;\nusing System.Runtime.InteropServices;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\n\nnamespace subs_check.win.gui\n{\n public partial class Form1: Form\n {\n //string 版本号;\n string 标题;\n private Process subsCheckProcess = null;\n string nodeInfo;//进度\n private Icon originalNotifyIcon; // 保存原始图标\n private ToolStripMenuItem startMenuItem;\n private ToolStripMenuItem stopMenuItem;\n string githubProxyURL = \"\";\n int run = 0;\n string 当前subsCheck版本号 = \"未知版本\";\n string 当前GUI版本号 = \"未知版本\";\n string 最新GUI版本号 = \"未知版本\";\n private string nextCheckTime = null;// 用于存储下次检查时间\n string WebUIapiKey = \"CMLiussss\";\n int downloading = 0;\n public Form1()\n {\n InitializeComponent();\n originalNotifyIcon = notifyIcon1.Icon;\n\n toolTip1.SetToolTip(numericUpDown1, \"并发线程数:推荐 宽带峰值/50M。\");\n toolTip1.SetToolTip(numericUpDown2, \"检查间隔时间(分钟):放置后台的时候,下次自动测速的间隔时间。\\n\\n 双击切换 使用「cron表达式」\");\n toolTip1.SetToolTip(label2, \"检查间隔时间(分钟):放置后台的时候,下次自动测速的间隔时间。\\n\\n 双击切换 使用「cron表达式」\");\n\n toolTip1.SetToolTip(numericUpDown3, \"超时时间(毫秒):节点的最大延迟。\");\n toolTip1.SetToolTip(numericUpDown4, \"最低测速结果舍弃(KB/s)。\");\n toolTip1.SetToolTip(numericUpDown5, \"下载测试时间(s):与下载链接大小相关,默认最大测试10s。\");\n toolTip1.SetToolTip(numericUpDown6, \"本地监听端口:用于直接返回测速结果的节点信息,方便 Sub-Store 实现订阅转换。\");\n toolTip1.SetToolTip(numericUpDown7, \"Sub-Store监听端口:用于订阅订阅转换。\\n注意:除非你知道你在干什么,否则不要将你的 Sub-Store 暴露到公网,否则可能会被滥用\");\n toolTip1.SetToolTip(textBox1, \"节点池订阅地址:支持 Link、Base64、Clash 格式的订阅链接。\");\n toolTip1.SetToolTip(checkBox1, \"以节点IP查询位置重命名节点。\\n质量差的节点可能造成IP查询失败,造成整体检查速度稍微变慢。\");\n toolTip1.SetToolTip(checkBox2, \"是否开启流媒体检测,其中IP欺诈依赖'节点地址查询',内核版本需要 v2.0.8 以上\\n\\n示例:美国1 | ⬇️ 5.6MB/s |0%|Netflix|Disney|Openai\\n风控值:0% (使用ping0.cc标准)\\n流媒体解锁:Netflix、Disney、Openai\");\n toolTip1.SetToolTip(comboBox3, \"GitHub 代理:代理订阅 GitHub raw 节点池。\");\n toolTip1.SetToolTip(comboBox2, \"测速地址:注意 并发数*节点速度<最大网速 否则测速结果不准确\\n尽量不要使用Speedtest,Cloudflare提供的下载链接,因为很多节点屏蔽测速网站。\");\n toolTip1.SetToolTip(textBox7, \"将测速结果推送到Worker的地址。\");\n toolTip1.SetToolTip(textBox6, \"Worker令牌。\");\n toolTip1.SetToolTip(comboBox1, \"测速结果的保存方法。\");\n toolTip1.SetToolTip(textBox2, \"Gist ID:注意!非Github用户名!\");\n toolTip1.SetToolTip(textBox3, \"Github TOKEN\");\n \n toolTip1.SetToolTip(comboBox4, \"通用订阅:内置了Sub-Store程序,自适应订阅格式。\\nClash订阅:带规则的 Mihomo、Clash 订阅格式。\");\n toolTip1.SetToolTip(comboBox5, \"生成带规则的 Clash 订阅所需的覆写规则文件\");\n\n toolTip1.SetToolTip(checkBox3, \"保存几个成功的节点,不选代表不限制,内核版本需要 v2.1.0 以上\\n如果你的并发数量超过这个参数,那么成功的结果可能会大于这个数值\");\n toolTip1.SetToolTip(numericUpDown8, \"保存几个成功的节点,不选代表不限制,内核版本需要 v2.1.0 以上\\n如果你的并发数量超过这个参数,那么成功的结果可能会大于这个数值\");\n\n toolTip1.SetToolTip(textBox11, \"支持标准cron表达式,如:\\n 0 */2 * * * 表示每2小时的整点执行\\n 0 0 */2 * * 表示每2天的0点执行\\n 0 0 1 * * 表示每月1日0点执行\\n */30 * * * * 表示每30分钟执行一次\\n\\n 双击切换 使用「分钟倒计时」\");\n\n toolTip1.SetToolTip(checkBox5, \"开机启动:勾选后,程序将在Windows启动时自动运行\");\n // 设置通知图标的上下文菜单\n SetupNotifyIconContextMenu();\n }\n\n private void SetupNotifyIconContextMenu()\n {\n // 创建上下文菜单\n ContextMenuStrip contextMenu = new ContextMenuStrip();\n\n // 创建\"▶️ 启动\"菜单项\n startMenuItem = new ToolStripMenuItem(\"启动\");\n startMenuItem.Click += (sender, e) =>\n {\n if (button1.Text == \"▶️ 启动\")\n {\n button1_Click(sender, e);\n }\n };\n\n // 创建\"⏹️ 停止\"菜单项\n stopMenuItem = new ToolStripMenuItem(\"停止\");\n stopMenuItem.Click += (sender, e) =>\n {\n if (button1.Text == \"⏹️ 停止\")\n {\n button1_Click(sender, e);\n }\n };\n stopMenuItem.Enabled = false; // 初始状态下禁用\n\n // 创建\"退出\"菜单项\n ToolStripMenuItem exitMenuItem = new ToolStripMenuItem(\"退出\");\n exitMenuItem.Click += async (sender, e) =>\n {\n try\n {\n // 如果程序正在运行,先停止它\n if (subsCheckProcess != null && !subsCheckProcess.HasExited)\n {\n await KillNodeProcessAsync();\n StopSubsCheckProcess();\n }\n\n // 确保通知图标被移除\n notifyIcon1.Visible = false;\n\n // 使用更直接的退出方式\n Environment.Exit(0);\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"退出程序时发生错误: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n\n // 如果仍然失败,尝试强制退出\n System.Diagnostics.Process.GetCurrentProcess().Kill();\n }\n };\n\n // 将菜单项添加到上下文菜单\n contextMenu.Items.Add(startMenuItem);\n contextMenu.Items.Add(stopMenuItem);\n contextMenu.Items.Add(new ToolStripSeparator()); // 分隔线\n contextMenu.Items.Add(exitMenuItem);\n\n // 将上下文菜单分配给通知图标\n notifyIcon1.ContextMenuStrip = contextMenu;\n\n // 确保通知图标可见\n notifyIcon1.Visible = true;\n }\n\n protected override void OnFormClosing(FormClosingEventArgs e)\n {\n if (e.CloseReason == CloseReason.UserClosing)\n {\n // 取消关闭操作\n e.Cancel = true;\n // 调用隐藏窗口方法\n 隐藏窗口();\n }\n }\n\n private async void timer1_Tick(object sender, EventArgs e)//初始化\n {\n timer1.Enabled = false;\n if (button2.Text == \"高级设置∧\") button2_Click(sender, e);\n // 检查并创建config文件夹\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string configFolderPath = System.IO.Path.Combine(executablePath, \"config\");\n if (!System.IO.Directory.Exists(configFolderPath))\n {\n // 文件不存在,可以给用户反馈\n string 免责声明 = \"SubsCheck-Win-GUI 项目仅供教育、研究和安全测试目的而设计和开发。本项目旨在为安全研究人员、学术界人士及技术爱好者提供一个探索和实践网络通信技术的工具。\\r\\n在下载和使用本项目代码时,使用者必须严格遵守其所适用的法律和规定。使用者有责任确保其行为符合所在地区的法律框架、规章制度及其他相关规定。\\r\\n\\r\\n使用条款\\r\\n\\r\\n教育与研究用途:本软件仅可用于网络技术和编程领域的学习、研究和安全测试。\\r\\n禁止非法使用:严禁将 SubsCheck-Win-GUI 用于任何非法活动或违反使用者所在地区法律法规的行为。\\r\\n使用时限:基于学习和研究目的,建议用户在完成研究或学习后,或在安装后的24小时内,删除本软件及所有相关文件。\\r\\n免责声明:SubsCheck-Win-GUI 的创建者和贡献者不对因使用或滥用本软件而导致的任何损害或法律问题负责。\\r\\n用户责任:用户对使用本软件的方式以及由此产生的任何后果完全负责。\\r\\n无技术支持:本软件的创建者不提供任何技术支持或使用协助。\\r\\n知情同意:使用 SubsCheck-Win-GUI 即表示您已阅读并理解本免责声明,并同意受其条款的约束。\\r\\n\\r\\n请记住:本软件的主要目的是促进学习、研究和安全测试。创作者不支持或认可任何其他用途。使用者应当在合法和负责任的前提下使用本工具。\\r\\n\\r\\n同意以上条款请点击\\\"是 / Yes\\\",否则程序将退出。\";\n\n // 显示带有 \"同意\" 和 \"拒绝\" 选项的对话框\n DialogResult result = MessageBox.Show(免责声明, \"SubsCheck-Win-GUI 免责声明\", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\n\n // 如果用户点击 \"拒绝\" (对应于 No 按钮)\n if (result == DialogResult.No)\n {\n // 退出程序\n Environment.Exit(0); // 立即退出程序\n }\n System.IO.Directory.CreateDirectory(configFolderPath);\n }\n\n FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location);\n 当前GUI版本号 = \"v\" + myFileVersionInfo.FileVersion;\n 最新GUI版本号 = 当前GUI版本号;\n 标题 = \"SubsCheck Win GUI \" + 当前GUI版本号;\n this.Text = 标题;// + \" TG:CMLiussss BY:CM喂饭 干货满满\";\n comboBox1.Text = \"本地\";\n comboBox4.Text = \"通用订阅\";\n ReadConfig();\n\n if (CheckCommandLineParameter(\"-auto\"))\n {\n Log(\"检测到开机启动,准备执行任务...\");\n button1_Click(this, EventArgs.Empty);\n this.Hide();\n notifyIcon1.Visible = true;\n } else await CheckGitHubVersionAsync();\n }\n\n private async Task CheckGitHubVersionAsync()\n {\n try\n {\n // 首先检查是否有网络连接\n if (!IsNetworkAvailable())\n {\n return; // 静默返回,不显示错误\n }\n\n var result = await 获取版本号(\"https://api.github.com/repos/cmliu/SubsCheck-Win-GUI/releases/latest\");\n if (result.Item1 != \"未知版本\") \n {\n string latestVersion = result.Item1;\n if (latestVersion != 当前GUI版本号)\n {\n 最新GUI版本号 = latestVersion;\n 标题 = \"SubsCheck Win GUI \" + 当前GUI版本号 + $\" 发现新版本: {最新GUI版本号} 请及时更新!\";\n this.Text = 标题;\n }\n }\n }\n catch\n {\n // 静默处理任何其他异常\n return;\n }\n }\n\n // 添加检查网络连接的辅助方法\n private bool IsNetworkAvailable()\n {\n try\n {\n return NetworkInterface.GetIsNetworkAvailable();\n }\n catch\n {\n return false; // 如果无法检查网络状态,假设网络不可用\n }\n }\n\n private async void ReadConfig()//读取配置文件\n {\n checkBox5.CheckedChanged -= checkBox5_CheckedChanged;// 临时移除事件处理器,防止触发事件\n try\n {\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string configFilePath = Path.Combine(executablePath, \"config\", \"config.yaml\");\n\n if (File.Exists(configFilePath))\n {\n // 读取YAML文件内容\n string yamlContent = File.ReadAllText(configFilePath);\n\n // 使用YamlDotNet解析YAML\n var deserializer = new YamlDotNet.Serialization.Deserializer();\n var config = deserializer.Deserialize>(yamlContent);\n\n // 使用新函数获取整数值并设置UI控件\n int? concurrentValue = 读取config整数(config, \"concurrent\");\n if (concurrentValue.HasValue) numericUpDown1.Value = concurrentValue.Value;\n\n int? checkIntervalValue = 读取config整数(config, \"check-interval\");\n if (checkIntervalValue.HasValue) numericUpDown2.Value = checkIntervalValue.Value;\n\n int? timeoutValue = 读取config整数(config, \"timeout\");\n if (timeoutValue.HasValue) numericUpDown3.Value = timeoutValue.Value;\n\n int? minspeedValue = 读取config整数(config, \"min-speed\");\n if (minspeedValue.HasValue) numericUpDown4.Value = minspeedValue.Value;\n\n int? downloadtimeoutValue = 读取config整数(config, \"download-timeout\");\n if (downloadtimeoutValue.HasValue) numericUpDown5.Value = downloadtimeoutValue.Value;\n\n string speedTestUrl = 读取config字符串(config, \"speed-test-url\");\n if (speedTestUrl != null) comboBox2.Text = speedTestUrl;\n\n string savemethod = 读取config字符串(config, \"save-method\");\n if (savemethod != null)\n {\n if (savemethod == \"local\") comboBox1.Text = \"本地\";\n else comboBox1.Text = savemethod;\n }\n\n string listenport = 读取config字符串(config, \"listen-port\");\n if (listenport != null)\n {\n // 查找最后一个冒号的位置\n int colonIndex = listenport.LastIndexOf(':');\n if (colonIndex >= 0 && colonIndex < listenport.Length - 1)\n {\n // 提取冒号后面的部分作为端口号\n string portStr = listenport.Substring(colonIndex + 1);\n if (decimal.TryParse(portStr, out decimal port))\n {\n numericUpDown6.Value = port;\n }\n }\n }\n\n /*\n int? substoreport = 读取config整数(config, \"sub-store-port\");\n if (substoreport.HasValue) numericUpDown7.Value = substoreport.Value;\n */\n\n string substoreport = 读取config字符串(config, \"sub-store-port\");\n if (substoreport != null)\n {\n // 查找最后一个冒号的位置\n int colonIndex = substoreport.LastIndexOf(':');\n if (colonIndex >= 0 && colonIndex < substoreport.Length - 1)\n {\n // 提取冒号后面的部分作为端口号\n string portStr = substoreport.Substring(colonIndex + 1);\n if (decimal.TryParse(portStr, out decimal port))\n {\n numericUpDown7.Value = port;\n }\n }\n }\n\n string githubproxy = 读取config字符串(config, \"githubproxy\");\n if (githubproxy != null) comboBox3.Text = githubproxy;\n\n const string githubRawPrefix = \"https://raw.githubusercontent.com/\";\n\n string mihomoOverwriteUrl = 读取config字符串(config, \"mihomo-overwrite-url\");\n int mihomoOverwriteUrlIndex = mihomoOverwriteUrl.IndexOf(githubRawPrefix);\n if (mihomoOverwriteUrl != null)\n {\n if (mihomoOverwriteUrl.Contains(\"http://127.0.0\"))\n {\n if (mihomoOverwriteUrl.EndsWith(\"bdg.yaml\", StringComparison.OrdinalIgnoreCase))\n {\n comboBox5.Text = \"[内置]布丁狗的订阅转换\";\n await ProcessComboBox5Selection();\n }\n else if (mihomoOverwriteUrl.EndsWith(\"ACL4SSR_Online_Full.yaml\", StringComparison.OrdinalIgnoreCase))\n {\n comboBox5.Text = \"[内置]ACL4SSR_Online_Full\";\n await ProcessComboBox5Selection();\n }\n }\n else if (mihomoOverwriteUrlIndex > 0) comboBox5.Text = mihomoOverwriteUrl.Substring(mihomoOverwriteUrlIndex);\n else comboBox5.Text = mihomoOverwriteUrl;\n }\n\n // 处理URLs,检查是否包含GitHub raw链接\n List subUrls = 读取config列表(config, \"sub-urls\");\n if (subUrls != null && subUrls.Count > 0)\n {\n // 创建一个新的过滤后的列表\n var filteredUrls = new List();\n\n for (int i = 0; i < subUrls.Count; i++)\n {\n // 排除本地URL\n string localUrlPattern = $\"http://127.0.0.1:{numericUpDown6.Value}/all.yaml\";\n if (!subUrls[i].Equals(localUrlPattern, StringComparison.OrdinalIgnoreCase))\n {\n // 处理GitHub raw链接\n int index = subUrls[i].IndexOf(githubRawPrefix);\n if (index > 0) // 如果找到且不在字符串开头\n {\n // 只保留从githubRawPrefix开始的部分\n filteredUrls.Add(subUrls[i].Substring(index));\n }\n else\n {\n // 如果不是GitHub链接,直接添加\n filteredUrls.Add(subUrls[i]);\n }\n }\n }\n\n // 将过滤后的列表中的每个URL放在单独的行上\n textBox1.Text = string.Join(Environment.NewLine, filteredUrls);\n }\n\n string renamenode = 读取config字符串(config, \"rename-node\");\n if (renamenode != null && renamenode == \"true\") checkBox1.Checked = true;\n else checkBox1.Checked = false;\n\n string mediacheck = 读取config字符串(config, \"media-check\");\n if (mediacheck != null && mediacheck == \"true\") checkBox2.Checked = true;\n else checkBox2.Checked = false;\n\n string githubgistid = 读取config字符串(config, \"github-gist-id\");\n if (githubgistid != null) textBox2.Text = githubgistid;\n string githubtoken = 读取config字符串(config, \"github-token\");\n if (githubtoken != null) textBox3.Text = githubtoken;\n\n string githubapimirror = 读取config字符串(config, \"github-api-mirror\");\n if (githubapimirror != null) textBox4.Text = githubapimirror;\n\n string workerurl = 读取config字符串(config, \"worker-url\");\n if (workerurl != null) textBox7.Text = workerurl;\n string workertoken = 读取config字符串(config, \"worker-token\");\n if (workertoken != null) textBox6.Text = workertoken;\n\n string webdavusername = 读取config字符串(config, \"webdav-username\");\n if (webdavusername != null) textBox9.Text = webdavusername;\n string webdavpassword = 读取config字符串(config, \"webdav-password\");\n if (webdavpassword != null) textBox8.Text = webdavpassword;\n string webdavurl = 读取config字符串(config, \"webdav-url\");\n if (webdavurl != null) textBox5.Text = webdavurl;\n\n string subscheckversion = 读取config字符串(config, \"subscheck-version\");\n if (subscheckversion != null) 当前subsCheck版本号 = subscheckversion;\n\n int? successlimit = 读取config整数(config, \"success-limit\");\n if (successlimit.HasValue)\n {\n if (successlimit.Value == 0)\n {\n checkBox3.Checked = false;\n numericUpDown8.Enabled = false;\n }\n else\n {\n checkBox3.Checked = true;\n numericUpDown8.Enabled = true;\n numericUpDown8.Value = successlimit.Value;\n }\n }\n\n string enablewebui = 读取config字符串(config, \"enable-web-ui\");\n if (enablewebui != null && enablewebui == \"true\") checkBox4.Checked = true;\n else checkBox4.Checked = false;\n\n string apikey = 读取config字符串(config, \"api-key\");\n if (apikey != null)\n {\n if (apikey == GetComputerNameMD5())\n {\n checkBox4.Checked = false;\n string oldapikey = 读取config字符串(config, \"old-api-key\");\n if (oldapikey != null)\n {\n textBox10.Text = oldapikey;\n }\n else\n {\n textBox10.PasswordChar = '\\0';\n textBox10.Text = \"请输入密钥\";\n textBox10.ForeColor = Color.Gray;\n }\n }\n else\n {\n textBox10.Text = apikey;\n }\n }\n\n string cronexpression = 读取config字符串(config, \"cron-expression\");\n if (cronexpression != null)\n {\n textBox11.Text = cronexpression;\n string cronDescription = GetCronExpressionDescription(textBox11.Text);\n textBox11.Location = new Point(9, 48);\n textBox11.Visible = true;\n label2.Visible = false;\n numericUpDown2.Visible = false;\n }\n\n string guiauto = 读取config字符串(config, \"gui-auto\");\n if (guiauto != null && guiauto == \"true\") checkBox5.Checked = true;\n else checkBox5.Checked = false;\n }\n else\n {\n comboBox3.Text = \"自动选择\";\n comboBox5.Text = \"[内置]布丁狗的订阅转换\";\n }\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"读取配置文件时发生错误: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n checkBox5.CheckedChanged += checkBox5_CheckedChanged;// 重新绑定事件处理器\n }\n\n private int? 读取config整数(Dictionary config, string fieldName)\n {\n // 检查是否存在指定字段且不为null\n if (config.ContainsKey(fieldName) && config[fieldName] != null)\n {\n int value;\n if (int.TryParse(config[fieldName].ToString(), out value))\n return value;\n }\n return null;\n }\n\n private string 读取config字符串(Dictionary config, string fieldName)\n {\n // 检查是否存在指定字段且不为null\n if (config.ContainsKey(fieldName) && config[fieldName] != null)\n {\n return config[fieldName].ToString();\n }\n return null;\n }\n\n private List 读取config列表(Dictionary config, string fieldName)\n {\n // 检查是否存在指定字段且不为null\n if (config.ContainsKey(fieldName) && config[fieldName] != null)\n {\n // 尝试将对象转换为列表\n if (config[fieldName] is List listItems)\n {\n return listItems.Select(item => item?.ToString()).Where(s => !string.IsNullOrEmpty(s)).ToList();\n }\n }\n return null;\n }\n\n private async Task SaveConfig(bool githubProxyCheck = true)//保存配置文件\n {\n try\n {\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string configFilePath = Path.Combine(executablePath, \"config\", \"config.yaml\");\n\n // 创建配置字典\n var config = new Dictionary();\n\n // 从UI控件获取值并添加到字典中\n config[\"concurrent\"] = (int)numericUpDown1.Value;\n config[\"check-interval\"] = (int)numericUpDown2.Value;\n if (textBox11.Visible) config[\"cron-expression\"] = textBox11.Text;\n config[\"timeout\"] = (int)numericUpDown3.Value;\n config[\"min-speed\"] = (int)numericUpDown4.Value;\n config[\"download-timeout\"] = (int)numericUpDown5.Value;\n\n if (!string.IsNullOrEmpty(comboBox2.Text)) config[\"speed-test-url\"] = comboBox2.Text;\n\n // 保存save-method,将\"本地\"转换为\"local\"\n config[\"save-method\"] = comboBox1.Text == \"本地\" ? \"local\" : comboBox1.Text;\n\n // 保存gist参数\n config[\"github-gist-id\"] = textBox2.Text;\n config[\"github-token\"] = textBox3.Text;\n\n config[\"github-api-mirror\"] = textBox4.Text;\n\n // 保存r2参数\n config[\"worker-url\"] = textBox7.Text;\n config[\"worker-token\"] = textBox6.Text;\n\n // 保存webdav参数\n config[\"webdav-username\"] = textBox9.Text;\n config[\"webdav-password\"] = textBox8.Text;\n config[\"webdav-url\"] = textBox5.Text;\n\n // 保存enable-web-ui\n config[\"enable-web-ui\"] = true;\n\n // 保存listen-port\n if (checkBox4.Checked) \n {\n WebUIapiKey = textBox10.Text;\n config[\"listen-port\"] = $@\":{numericUpDown6.Value}\";\n }\n else\n {\n WebUIapiKey = GetComputerNameMD5();\n config[\"listen-port\"] = $@\"127.0.0.1:{numericUpDown6.Value}\";\n if (textBox10.Text != \"请输入密钥\") config[\"old-api-key\"] = textBox10.Text;\n }\n config[\"api-key\"] = WebUIapiKey;\n\n // 保存sub-store-port\n config[\"sub-store-port\"] = $@\":{numericUpDown7.Value}\";\n\n string githubRawPrefix = \"https://raw.githubusercontent.com/\";\n if (githubProxyCheck)\n {\n // 检查并处理 GitHub Raw URLs\n if (comboBox3.Text == \"自动选择\")\n {\n // 创建不包含\"自动选择\"的代理列表\n List proxyItems = new List();\n for (int j = 0; j < comboBox3.Items.Count; j++)\n {\n string proxyItem = comboBox3.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n\n // 随机打乱列表顺序\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n\n // 异步检测可用代理\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n }\n }\n\n if (comboBox3.Text != \"自动选择\") githubProxyURL = $\"https://{comboBox3.Text}/\";\n config[\"githubproxy\"] = comboBox3.Text;\n config[\"github-proxy\"] = githubProxyURL;\n\n // 保存sub-urls列表\n List subUrls = new List();\n string allyamlFilePath = System.IO.Path.Combine(executablePath, \"output\", \"all.yaml\");\n if (System.IO.File.Exists(allyamlFilePath))\n {\n subUrls.Add($\"http://127.0.0.1:{numericUpDown6.Value}/all.yaml\");\n Log(\"已加载上次测试结果。\");\n }\n\n if (!string.IsNullOrEmpty(textBox1.Text))\n {\n subUrls.AddRange(textBox1.Text.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList());\n // 处理URLs\n for (int i = 0; i < subUrls.Count; i++)\n {\n if (subUrls[i].StartsWith(githubRawPrefix) && !string.IsNullOrEmpty(githubProxyURL))\n {\n // 替换为代理 URL 格式\n //subUrls[i] = githubProxyURL + githubRawPrefix + subUrls[i].Substring(githubRawPrefix.Length);\n // 使用subs-check内置github-proxy参数\n subUrls[i] = githubRawPrefix + subUrls[i].Substring(githubRawPrefix.Length);\n }\n }\n }\n\n config[\"sub-urls\"] = subUrls;\n\n // 处理配置文件下载与配置\n if (comboBox5.Text.Contains(\"[内置]\"))\n {\n // 确定文件名和下载URL\n string fileName;\n string downloadFilePath;\n string downloadUrl;\n string displayName;\n\n if (comboBox5.Text.Contains(\"[内置]布丁狗\"))\n {\n fileName = \"bdg.yaml\";\n displayName = \"[内置]布丁狗的订阅转换\";\n downloadUrl = \"https://raw.githubusercontent.com/cmliu/ACL4SSR/main/yaml/bdg.yaml\";\n }\n else // [内置]ACL4SSR\n {\n fileName = \"ACL4SSR_Online_Full.yaml\";\n displayName = \"[内置]ACL4SSR_Online_Full\";\n downloadUrl = \"https://raw.githubusercontent.com/beck-8/override-hub/main/yaml/ACL4SSR_Online_Full.yaml\";\n }\n\n // 确保output文件夹存在\n string outputFolderPath = Path.Combine(executablePath, \"output\");\n if (!Directory.Exists(outputFolderPath))\n {\n Directory.CreateDirectory(outputFolderPath);\n }\n\n // 确定文件完整路径\n downloadFilePath = Path.Combine(outputFolderPath, fileName);\n if (!File.Exists(downloadFilePath)) await ProcessComboBox5Selection();\n\n // 检查文件是否存在\n if (!File.Exists(downloadFilePath))\n {\n Log($\"{displayName} 覆写配置文件 未找到,将使用在线版本。\");\n config[\"mihomo-overwrite-url\"] = githubProxyURL + downloadUrl;\n }\n else\n {\n Log($\"{displayName} 覆写配置文件 加载成功。\");\n config[\"mihomo-overwrite-url\"] = $\"http://127.0.0.1:{numericUpDown6.Value}/{fileName}\";\n }\n }\n else if (comboBox5.Text.StartsWith(githubRawPrefix)) config[\"mihomo-overwrite-url\"] = githubProxyURL + comboBox5.Text;\n else config[\"mihomo-overwrite-url\"] = comboBox5.Text != \"\" ? comboBox5.Text : $\"http://127.0.0.1:{numericUpDown6.Value}/ACL4SSR_Online_Full.yaml\";\n \n config[\"rename-node\"] = checkBox1.Checked;//以节点IP查询位置重命名节点\n config[\"media-check\"] = checkBox2.Checked;//是否开启流媒体检测\n config[\"keep-success-proxies\"] = false;\n config[\"print-progress\"] = false;//是否显示进度\n config[\"sub-urls-retry\"] = 3;//重试次数(获取订阅失败后重试次数)\n config[\"subscheck-version\"] = 当前subsCheck版本号;//当前subsCheck版本号\n\n config[\"gui-auto\"] = checkBox5.Checked;//是否开机自启\n\n //保存几个成功的节点,为0代表不限制 \n if (checkBox3.Checked) config[\"success-limit\"] = (int)numericUpDown8.Value;\n else config[\"success-limit\"] = 0;\n\n // 使用YamlDotNet序列化配置\n var serializer = new YamlDotNet.Serialization.SerializerBuilder()\n .WithIndentedSequences() // 使序列化结果更易读\n .Build();\n\n string yamlContent = serializer.Serialize(config);\n\n // 确保配置目录存在\n string configDirPath = Path.GetDirectoryName(configFilePath);\n if (!Directory.Exists(configDirPath))\n Directory.CreateDirectory(configDirPath);\n\n string moreYamlPath = Path.Combine(configDirPath, \"more.yaml\");\n if (File.Exists(moreYamlPath))\n {\n // 读取more.yaml的内容\n string moreYamlContent = File.ReadAllText(moreYamlPath);\n\n // 确保more.yaml内容以换行开始\n if (!moreYamlContent.StartsWith(\"\\n\") && !moreYamlContent.StartsWith(\"\\r\\n\"))\n {\n yamlContent += \"\\n\"; // 添加换行符作为分隔\n }\n\n // 将more.yaml的内容追加到要写入的config.yaml内容后\n yamlContent += moreYamlContent;\n\n Log($\"已将补充参数配置 more.yaml 内容追加到配置文件\");\n }\n // 写入YAML文件\n File.WriteAllText(configFilePath, yamlContent);\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"保存配置文件时发生错误: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n if (button2.Text == \"高级设置∧\")\n {\n button2.Text = \"高级设置∨\";\n groupBox3.Visible = false;\n }\n else\n {\n button2.Text = \"高级设置∧\";\n groupBox3.Visible = true;\n }\n 判断保存类型();\n }\n\n private async void button1_Click(object sender, EventArgs e)\n {\n button1.Enabled = false;\n if (button1.Text == \"▶️ 启动\") \n {\n if (checkBox4.Checked && textBox10.Text == \"请输入密钥\")\n {\n MessageBox.Show(\"您已启用WebUI,请设置WebUI API密钥!\", \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Warning);\n return;\n }\n run = 1;\n if (button3.Enabled==false)\n {\n string executablePath = Path.GetDirectoryName(Application.ExecutablePath);\n string allyamlFilePath = Path.Combine(executablePath, \"output\", \"all.yaml\");\n button3.Enabled = File.Exists(allyamlFilePath);\n }\n\n numericUpDown1.Enabled = false;\n numericUpDown2.Enabled = false;\n textBox11.Enabled = false;\n numericUpDown3.Enabled = false;\n numericUpDown4.Enabled = false;\n numericUpDown5.Enabled = false;\n numericUpDown6.Enabled = false;\n numericUpDown7.Enabled = false;\n comboBox1.Enabled = false;\n textBox1.Enabled = false;\n groupBox3.Enabled = false;\n groupBox4.Enabled = false;\n groupBox5.Enabled = false;\n groupBox6.Enabled = false;\n if (checkBox4.Checked) button6.Enabled = true;\n button1.Text = \"⏹️ 停止\";\n //timer3.Enabled = true;\n // 清空 richTextBox1\n richTextBox1.Clear();\n await KillNodeProcessAsync();\n await SaveConfig();\n\n if (run == 1) \n {\n // 更新菜单项的启用状态\n startMenuItem.Enabled = false;\n stopMenuItem.Enabled = true;\n\n // 清空 richTextBox1\n //richTextBox1.Clear();\n\n notifyIcon1.Text = \"SubsCheck: 已就绪\";\n\n // 启动 subs-check.exe 程序\n StartSubsCheckProcess();\n }\n }\n else\n {\n run = 0;\n Log(\"任务停止\");\n progressBar1.Value = 0;\n groupBox2.Text = \"实时日志\";\n notifyIcon1.Text = \"SubsCheck: 未运行\";\n // 停止 subs-check.exe 程序\n StopSubsCheckProcess();\n // 结束 Sub-Store\n await KillNodeProcessAsync();\n if (checkBox4.Checked) ReadConfig();\n button3.Enabled = false;\n numericUpDown1.Enabled = true;\n numericUpDown2.Enabled = true;\n textBox11.Enabled = true;\n numericUpDown3.Enabled = true;\n numericUpDown4.Enabled = true;\n numericUpDown5.Enabled = true;\n numericUpDown6.Enabled = true;\n numericUpDown7.Enabled = true;\n comboBox1.Enabled = true;\n textBox1.Enabled = true;\n groupBox3.Enabled = true;\n groupBox4.Enabled = true;\n groupBox5.Enabled = true;\n groupBox6.Enabled = true;\n button6.Enabled = false;\n button1.Text = \"▶️ 启动\";\n //timer3.Enabled = false;\n // 更新菜单项的启用状态\n startMenuItem.Enabled = true;\n stopMenuItem.Enabled = false;\n }\n if (downloading == 0) button1.Enabled = true;\n }\n\n private async Task DownloadSubsCheckEXE()\n {\n button1.Enabled = false;\n downloading = 1;\n try\n {\n Log(\"正在检查网络连接...\");\n\n // 首先检查是否有网络连接\n if (!IsNetworkAvailable())\n {\n Log(\"网络连接不可用,无法下载核心文件。\", true);\n MessageBox.Show(\"缺少 subs-check.exe 核心文件。\\n\\n您可以前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n return;\n }\n\n var result = await 获取版本号(\"https://api.github.com/repos/beck-8/subs-check/releases/latest\", true);\n if (result.Item1 != \"未知版本\") \n {\n // 创建不使用系统代理的 HttpClientHandler\n HttpClientHandler handler = new HttpClientHandler\n {\n UseProxy = false,\n Proxy = null\n };\n\n // 使用自定义 handler 创建 HttpClient\n using (HttpClient client = new HttpClient(handler)) \n {\n try\n {\n string latestVersion = result.Item1;\n JArray assets = result.Item2;\n Log($\"subs-check.exe 最新版本为: {latestVersion} \");\n // 查找Windows i386版本的资源\n string downloadUrl = null;\n\n foreach (var asset in assets)\n {\n if (asset[\"name\"].ToString() == \"subs-check_Windows_i386.zip\")\n {\n downloadUrl = asset[\"browser_download_url\"].ToString();\n break;\n }\n }\n\n if (downloadUrl != null)\n {\n string 代理下载链接 = githubProxyURL + downloadUrl;\n string 原生下载链接 = 代理下载链接;\n // 计算\"https://\"在下载链接中出现的次数\n int httpsCount = 0;\n int lastIndex = -1;\n int currentIndex = 0;\n\n // 查找所有\"https://\"出现的位置\n while ((currentIndex = 代理下载链接.IndexOf(\"https://\", currentIndex)) != -1)\n {\n httpsCount++;\n lastIndex = currentIndex;\n currentIndex += 8; // \"https://\".Length = 8\n }\n\n // 如果\"https://\"出现2次或以上,提取最后一个\"https://\"之后的内容\n if (httpsCount >= 2 && lastIndex != -1)\n {\n 原生下载链接 = 代理下载链接.Substring(lastIndex);\n }\n\n string executablePath = Path.GetDirectoryName(Application.ExecutablePath);\n\n // 创建下载请求 - 优化的多级尝试下载逻辑\n Log(\"开始下载文件...\");\n bool downloadSuccess = false;\n string zipFilePath = Path.Combine(executablePath, \"subs-check_Windows_i386.zip\");\n string failureReason = \"\";\n\n // 如果文件已存在,先删除\n if (File.Exists(zipFilePath)) File.Delete(zipFilePath);\n\n // 第一次尝试:使用代理下载链接 + 当前HttpClient(不使用系统代理)\n try\n {\n Log($\"[尝试1/4] 使用代理下载链接:{代理下载链接}\");\n downloadSuccess = await DownloadFileAsync(client, 代理下载链接, zipFilePath);\n }\n catch (Exception ex)\n {\n Log($\"[尝试1/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n\n // 如果第一次尝试失败,且代理链接与原生链接不同,使用原生下载链接尝试\n if (!downloadSuccess && 代理下载链接 != 原生下载链接)\n {\n try\n {\n Log($\"[尝试2/4] 使用原生下载链接:{原生下载链接}\");\n downloadSuccess = await DownloadFileAsync(client, 原生下载链接, zipFilePath);\n }\n catch (Exception ex)\n {\n Log($\"[尝试2/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n }\n\n // 如果前面的尝试都失败,创建使用系统代理的HttpClient再次尝试\n if (!downloadSuccess)\n {\n try\n {\n Log(\"[尝试3/4] 使用系统代理 + 代理下载链接\");\n using (HttpClient proxyClient = new HttpClient())\n {\n proxyClient.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n proxyClient.Timeout = TimeSpan.FromSeconds(30);\n\n downloadSuccess = await DownloadFileAsync(proxyClient, 代理下载链接, zipFilePath);\n }\n }\n catch (Exception ex)\n {\n Log($\"[尝试3/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n\n // 最后一次尝试:使用系统代理 + 原生链接(如果不同)\n if (!downloadSuccess && 代理下载链接 != 原生下载链接)\n {\n try\n {\n Log(\"[尝试4/4] 使用系统代理 + 原生下载链接\");\n using (HttpClient proxyClient = new HttpClient())\n {\n proxyClient.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n proxyClient.Timeout = TimeSpan.FromSeconds(30);\n\n downloadSuccess = await DownloadFileAsync(proxyClient, 原生下载链接, zipFilePath);\n }\n }\n catch (Exception ex)\n {\n Log($\"[尝试4/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n }\n }\n\n if (downloadSuccess)\n {\n Log(\"下载完成,正在解压文件...\");\n\n // 解压文件的代码保持不变\n using (System.IO.Compression.ZipArchive archive = System.IO.Compression.ZipFile.OpenRead(zipFilePath))\n {\n // 查找subs-check.exe\n System.IO.Compression.ZipArchiveEntry exeEntry = archive.Entries.FirstOrDefault(\n entry => entry.Name.Equals(\"subs-check.exe\", StringComparison.OrdinalIgnoreCase));\n\n if (exeEntry != null)\n {\n string exeFilePath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 如果文件已存在,先删除\n if (File.Exists(exeFilePath))\n {\n File.Delete(exeFilePath);\n }\n\n // 解压文件\n exeEntry.ExtractToFile(exeFilePath);\n 当前subsCheck版本号 = latestVersion;\n Log($\"subs-check.exe {当前subsCheck版本号} 已就绪!\");\n\n await SaveConfig(false);\n\n // 删除下载的zip文件\n //File.Delete(zipFilePath);\n }\n else\n {\n Log(\"无法在压缩包中找到 subs-check.exe 文件。\", true);\n }\n }\n }\n else\n {\n // 所有尝试都失败\n Log($\"所有下载尝试均失败,最后错误: {failureReason}\", true);\n MessageBox.Show($\"下载 subs-check.exe 失败,请检查网络连接后重试。\\n\\n可尝试更换 Github Proxy 后,点击「检查更新」>「更新内核」。\\n或前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"下载失败\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n progressBar1.Value = 0;\n }\n\n // 解压文件\n using (System.IO.Compression.ZipArchive archive = System.IO.Compression.ZipFile.OpenRead(zipFilePath))\n {\n // 查找subs-check.exe\n System.IO.Compression.ZipArchiveEntry exeEntry = archive.Entries.FirstOrDefault(\n entry => entry.Name.Equals(\"subs-check.exe\", StringComparison.OrdinalIgnoreCase));\n\n if (exeEntry != null)\n {\n string exeFilePath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 如果文件已存在,先删除\n if (File.Exists(exeFilePath))\n {\n File.Delete(exeFilePath);\n }\n\n // 解压文件\n exeEntry.ExtractToFile(exeFilePath);\n 当前subsCheck版本号 = latestVersion;\n Log($\"subs-check.exe {当前subsCheck版本号} 已就绪!\");\n\n await SaveConfig(false);\n // 这里保留原有行为,不修改button1.Enabled\n\n // 删除下载的zip文件\n //File.Delete(zipFilePath);\n }\n else\n {\n Log(\"无法在压缩包中找到 subs-check.exe 文件。\", true);\n }\n }\n }\n else\n {\n Log(\"无法找到适用于 Windows i386 的下载链接。\", true);\n MessageBox.Show(\"未能找到适用的 subs-check.exe 下载链接。\\n\\n可尝试更换 Github Proxy 后,点击「检查更新」>「更新内核」。\\n或前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n }\n catch (Exception ex)\n {\n Log($\"下载过程中出错: {ex.Message}\", true);\n MessageBox.Show($\"下载 subs-check.exe 时出错: {ex.Message}\\n\\n可尝试更换 Github Proxy 后,点击「检查更新」>「更新内核」。\\n或前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n } \n }\n catch (Exception ex)\n {\n Log($\"初始化下载过程出错: {ex.Message}\", true);\n MessageBox.Show($\"下载准备过程出错: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n\n button1.Enabled = true;\n downloading = 0;\n }\n\n /// \n /// 获取最新版本号和对应的下载链接\n /// \n /// API请求URL\n /// 是否在日志中输出信息\n /// 包含最新版本号和下载链接的元组\n private async Task<(string LatestVersion, JArray assets)> 获取版本号(string 版本号URL, bool 是否输出log = false)\n {\n string latestVersion = \"未知版本\";\n JArray assets = null;\n\n // 创建不使用系统代理的 HttpClientHandler\n HttpClientHandler handler = new HttpClientHandler\n {\n UseProxy = false,\n Proxy = null\n };\n\n // 使用自定义 handler 创建 HttpClient\n using (HttpClient client = new HttpClient(handler))\n {\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n client.Timeout = TimeSpan.FromSeconds(30); // 增加超时时间以适应下载需求\n\n if (是否输出log) Log(\"正在获取最新版本 subs-check.exe 内核下载地址...\");\n string url = 版本号URL;\n string 备用url = 版本号URL.Replace(\"api.github.com\", \"api.github.cmliussss.net\");\n\n HttpResponseMessage response = null;\n string responseBody = null;\n JObject json = null;\n\n // 先尝试主URL\n try\n {\n response = await client.GetAsync(url);\n\n // 如果主URL请求成功返回有效数据\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从主API获取版本信息\");\n }\n // 如果主URL请求不成功但没有抛出异常\n else\n {\n if (是否输出log) Log($\"主API请求失败 HTTP {(int)response.StatusCode},尝试备用API...\");\n response = await client.GetAsync(备用url);\n\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用API获取版本信息\");\n }\n else\n {\n if (是否输出log) Log($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return (latestVersion, assets); // 两个URL都失败,提前退出\n }\n }\n }\n // 捕获网络请求异常(如连接超时、无法解析域名等)\n catch (HttpRequestException ex)\n {\n if (是否输出log) Log($\"主API请求出错: {ex.Message},尝试备用API...\");\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用API获取版本信息\");\n }\n else\n {\n if (是否输出log) Log($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return (latestVersion, assets); // 备用URL也失败,提前退出\n }\n }\n catch (Exception backupEx)\n {\n if (是否输出log) Log($\"备用API请求也出错: {backupEx.Message}\", true);\n return (latestVersion, assets); // 连备用URL也异常,提前退出\n }\n }\n // 捕获JSON解析异常\n catch (Newtonsoft.Json.JsonException ex)\n {\n if (是否输出log) Log($\"解析JSON数据出错: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用API获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n if (是否输出log) Log($\"备用API请求也出错: {backupEx.Message}\", true);\n return (latestVersion, assets); // 连备用URL也有问题,提前退出\n }\n }\n // 捕获其他所有异常\n catch (Exception ex)\n {\n if (是否输出log) Log($\"获取版本信息时出现未预期的错误: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用URL获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n if (是否输出log) Log($\"备用API请求也出错: {backupEx.Message}\", true);\n return (latestVersion, assets); // 连备用URL也有问题,提前退出\n }\n }\n\n // 如果成功获取了JSON数据,继续处理\n if (json != null)\n {\n latestVersion = json[\"tag_name\"].ToString();\n assets = (JArray)json[\"assets\"];\n }\n }\n\n return (latestVersion, assets);\n }\n\n\n private async void StartSubsCheckProcess()\n {\n try\n {\n // 重置进度条\n progressBar1.Value = 0;\n groupBox2.Text = \"实时日志\";\n using (MemoryStream ms = new MemoryStream(Properties.Resources.going))\n {\n notifyIcon1.Icon = new Icon(ms);\n }\n\n // 获取当前应用程序目录\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string subsCheckPath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 检查是否有其他subs-check.exe进程正在运行,并强制结束它们\n try\n {\n Process[] processes = Process.GetProcessesByName(\"subs-check\");\n if (processes.Length > 0)\n {\n Log(\"发现正在运行的subs-check.exe进程,正在强制结束...\");\n foreach (Process process in processes)\n {\n // 确保不是当前应用程序的进程\n if (process != subsCheckProcess)\n {\n try\n {\n process.Kill();\n process.WaitForExit();\n Log($\"成功结束subs-check.exe进程(ID: {process.Id})\");\n }\n catch (Exception ex)\n {\n Log($\"结束subs-check.exe进程时出错(ID: {process.Id}): {ex.Message}\", true);\n }\n }\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"检查运行中的subs-check.exe进程时出错: {ex.Message}\", true);\n }\n\n // 检查文件是否存在\n if (!File.Exists(subsCheckPath))\n {\n Log(\"没有找到 subs-check.exe 文件。\", true);\n await DownloadSubsCheckEXE(); // 使用异步等待\n }\n\n // 创建进程启动信息\n ProcessStartInfo startInfo = new ProcessStartInfo\n {\n FileName = subsCheckPath,\n UseShellExecute = false,\n RedirectStandardOutput = true,\n RedirectStandardError = true,\n CreateNoWindow = true,\n WorkingDirectory = executablePath,\n StandardOutputEncoding = Encoding.UTF8,\n StandardErrorEncoding = Encoding.UTF8\n };\n\n // 创建进程\n subsCheckProcess = new Process { StartInfo = startInfo };\n\n // 设置输出和错误数据接收事件处理\n subsCheckProcess.OutputDataReceived += SubsCheckProcess_OutputDataReceived;\n subsCheckProcess.ErrorDataReceived += SubsCheckProcess_OutputDataReceived;\n\n // 启动进程\n subsCheckProcess.Start();\n\n // 开始异步读取输出\n subsCheckProcess.BeginOutputReadLine();\n subsCheckProcess.BeginErrorReadLine();\n\n // 设置进程退出事件处理\n subsCheckProcess.EnableRaisingEvents = true;\n subsCheckProcess.Exited += SubsCheckProcess_Exited;\n\n Log($\"subs-check.exe {当前subsCheck版本号} 已启动...\");\n timer4.Enabled = true;\n }\n catch (Exception ex)\n {\n Log($\"启动 subs-check.exe 时出错: {ex.Message}\", true);\n button1.Text = \"▶️ 启动\";\n }\n }\n\n\n private void StopSubsCheckProcess()\n {\n timer4.Enabled = false;\n if (subsCheckProcess != null && !subsCheckProcess.HasExited)\n {\n try\n {\n // 尝试正常关闭进程\n subsCheckProcess.Kill();\n subsCheckProcess.WaitForExit();\n Log(\"subs-check.exe 已停止\");\n notifyIcon1.Icon = originalNotifyIcon;\n button7.Enabled = false;\n button7.Text = \"🔀未启动\";\n }\n catch (Exception ex)\n {\n Log($\"停止 subs-check.exe 时出错: {ex.Message}\", true);\n }\n finally\n {\n subsCheckProcess.Dispose();\n subsCheckProcess = null;\n }\n }\n }\n \n private void SubsCheckProcess_OutputDataReceived(object sender, DataReceivedEventArgs e)\n {\n if (!string.IsNullOrEmpty(e.Data))\n {\n // 由于此事件在另一个线程中触发,需要使用 Invoke 在 UI 线程上更新控件\n BeginInvoke(new Action(() =>\n {\n // 过滤ANSI转义序列\n string cleanText = RemoveAnsiEscapeCodes(e.Data);\n\n // 检查是否包含\"下次检查时间\"信息\n if (cleanText.Contains(\"下次检查时间:\"))\n {\n if (button3.Enabled == false)\n {\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string outputFolderPath = System.IO.Path.Combine(executablePath, \"output\");\n if (System.IO.Directory.Exists(outputFolderPath))\n {\n string allyamlFilePath = System.IO.Path.Combine(outputFolderPath, \"all.yaml\");\n if (System.IO.File.Exists(allyamlFilePath)) button3.Enabled = true;\n }\n }\n // 提取完整的下次检查时间信息\n int startIndex = cleanText.IndexOf(\"下次检查时间:\");\n nextCheckTime = cleanText.Substring(startIndex);\n }\n\n if (!cleanText.StartsWith(\"[GIN]\"))\n {\n // 如果不是进度行,则添加到日志中\n richTextBox1.AppendText(cleanText + \"\\r\\n\");\n // 滚动到最底部\n richTextBox1.SelectionStart = richTextBox1.Text.Length;\n richTextBox1.ScrollToCaret();\n }\n\n /*\n // 检查是否是进度信息行\n if (cleanText.StartsWith(\"进度: [\"))\n {\n // 解析百分比\n int percentIndex = cleanText.IndexOf('%');\n if (percentIndex > 0)\n {\n // 查找百分比前面的数字部分\n int startIndex = cleanText.LastIndexOfAny(new char[] { ' ', '>' }, percentIndex) + 1;\n string percentText = cleanText.Substring(startIndex, percentIndex - startIndex);\n\n if (double.TryParse(percentText, out double percentValue))\n {\n // 更新进度条,将百分比值(0-100)设置给进度条\n progressBar1.Value = (int)Math.Round(percentValue);\n }\n }\n\n // 解析节点信息部分(例如:(12/6167) 可用: 0)\n int infoStartIndex = cleanText.IndexOf('(');\n if (infoStartIndex > 0)\n {\n string fullNodeInfo = cleanText.Substring(infoStartIndex);\n\n // 提取最重要的信息:节点数量和可用数量\n int endIndex = fullNodeInfo.IndexOf(\"2025-\"); // 查找日期部分开始位置\n if (endIndex > 0)\n {\n nodeInfo = fullNodeInfo.Substring(0, endIndex).Trim();\n }\n else\n {\n // 如果找不到日期部分,则取前30个字符\n nodeInfo = fullNodeInfo.Length > 30 ? fullNodeInfo.Substring(0, 30) + \"...\" : fullNodeInfo;\n }\n\n groupBox2.Text = \"实时日志 \" + nodeInfo;\n\n // 确保通知图标文本不超过63个字符\n string notifyText = \"SubsCheck: \" + nodeInfo;\n if (notifyText.Length > 63)\n {\n notifyText = notifyText.Substring(0, 60) + \"...\";\n }\n notifyIcon1.Text = notifyText;\n }\n\n // 更新lastProgressLine,但不向richTextBox添加文本\n lastProgressLine = cleanText;\n }\n else\n {\n // 如果不是进度行,则添加到日志中\n richTextBox1.AppendText(cleanText + \"\\r\\n\");\n // 滚动到最底部\n richTextBox1.SelectionStart = richTextBox1.Text.Length;\n richTextBox1.ScrollToCaret();\n }\n */\n }));\n }\n }\n\n\n // 添加一个方法来过滤ANSI转义序列\n private string RemoveAnsiEscapeCodes(string input)\n {\n // 匹配ANSI转义序列的正则表达式\n // 这将匹配类似 \"[2m\"、\"[0m\"、\"[92m\" 等格式的ANSI颜色代码\n return System.Text.RegularExpressions.Regex.Replace(input, @\"\\x1B\\[[0-9;]*[mGK]\", string.Empty);\n }\n\n private void SubsCheckProcess_Exited(object sender, EventArgs e)\n {\n // 进程退出时,在 UI 线程上更新控件\n BeginInvoke(new Action(() =>\n {\n Log(\"subs-check.exe 已退出\");\n button1.Text = \"▶️ 启动\";\n\n // 更新菜单项的启用状态\n startMenuItem.Enabled = true;\n stopMenuItem.Enabled = false;\n\n // 重新启用控件\n numericUpDown1.Enabled = true;\n numericUpDown2.Enabled = true;\n numericUpDown3.Enabled = true;\n numericUpDown4.Enabled = true;\n numericUpDown5.Enabled = true;\n numericUpDown6.Enabled = true;\n textBox1.Enabled = true;\n groupBox3.Enabled = true;\n }));\n }\n\n /// \n /// 获取本地局域网IP地址,如果有多个则让用户选择\n /// \n /// 用户选择的IP地址,如果未选择则返回127.0.0.1\n private string GetLocalLANIP()\n {\n try\n {\n // 获取所有网卡的IP地址\n List lanIPs = new List();\n\n // 获取所有网络接口\n foreach (System.Net.NetworkInformation.NetworkInterface ni in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces())\n {\n // 排除loopback、虚拟网卡和非活动网卡\n if (ni.NetworkInterfaceType != System.Net.NetworkInformation.NetworkInterfaceType.Loopback &&\n ni.OperationalStatus == System.Net.NetworkInformation.OperationalStatus.Up)\n {\n // 获取该网卡的所有IP地址\n foreach (System.Net.NetworkInformation.UnicastIPAddressInformation ip in ni.GetIPProperties().UnicastAddresses)\n {\n // 只添加IPv4地址且不是回环地址\n if (ip.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork &&\n !System.Net.IPAddress.IsLoopback(ip.Address))\n {\n lanIPs.Add(ip.Address.ToString());\n }\n }\n }\n }\n\n // 如果没有找到任何IP地址,返回本地回环地址\n if (lanIPs.Count == 0)\n {\n return \"127.0.0.1\";\n }\n // 如果只找到一个IP地址,直接返回\n else if (lanIPs.Count == 1)\n {\n return lanIPs[0];\n }\n // 如果有多个IP地址,让用户选择\n else\n {\n // 创建选择窗口\n Form selectForm = new Form();\n selectForm.Text = \"选择局域网IP地址\";\n selectForm.StartPosition = FormStartPosition.CenterParent;\n /*\n selectForm.Width = 520; // 保持宽度\n selectForm.Height = 320; // 增加高度以容纳额外的警告标签\n selectForm.FormBorderStyle = FormBorderStyle.FixedDialog;\n */\n selectForm.AutoSize = true; // 启用自动大小调整\n selectForm.AutoSizeMode = AutoSizeMode.GrowAndShrink; // 根据内容调整大小\n selectForm.FormBorderStyle = FormBorderStyle.FixedSingle; // 使用固定但可调整的边框\n selectForm.ShowIcon = false;\n selectForm.MaximizeBox = false;\n selectForm.MinimizeBox = false;\n\n // 添加说明标签\n Label label = new Label();\n label.Text = \"发现多个局域网IP地址:\\n\\n\" +\n \"· 仅在本机访问:直接点击【取消】,将使用127.0.0.1\\n\\n\" +\n \"· 局域网内其他设备访问:请在下面列表中选择一个正确的局域网IP\";\n label.Location = new Point(15, 10);\n label.AutoSize = true;\n label.MaximumSize = new Size(380, 0); // 设置最大宽度,允许自动换行\n selectForm.Controls.Add(label);\n\n // 计算标签高度以正确放置列表框\n int labelHeight = label.Height + 20;\n\n // 添加IP地址列表框\n ListBox listBox = new ListBox();\n listBox.Location = new Point(15, labelHeight);\n listBox.Width = 380;\n listBox.Height = 130; // 保持列表框高度\n foreach (string ip in lanIPs)\n {\n listBox.Items.Add(ip);\n }\n // 查找非\".1\"结尾的IP地址,如果所有IP都以\".1\"结尾,则使用第一个IP\n int selectedIndex = 0;\n for (int i = 0; i < lanIPs.Count; i++)\n {\n if (!lanIPs[i].EndsWith(\".1\"))\n {\n selectedIndex = i;\n break;\n }\n }\n\n // 设置选中的索引\n listBox.SelectedIndex = selectedIndex;\n selectForm.Controls.Add(listBox);\n\n // 添加警告标签(放在列表框下方)\n Label warningLabel = new Label();\n warningLabel.Text = \"注意:选择错误的IP会导致局域网内其他设备无法访问。\\n\\n   推荐您可以先尝试使用非“.1”结尾的IP!\";\n warningLabel.Location = new Point(15, labelHeight + listBox.Height + 10);\n warningLabel.AutoSize = true;\n warningLabel.ForeColor = Color.Red; // 警告文本使用红色\n selectForm.Controls.Add(warningLabel);\n\n // 计算按钮位置(居中排布)\n int buttonY = labelHeight + listBox.Height + warningLabel.Height + 20;\n int buttonTotalWidth = 75 * 2 + 15; // 两个按钮的宽度加间距\n int buttonStartX = (selectForm.ClientSize.Width - buttonTotalWidth) / 2;\n\n // 添加确定按钮\n Button okButton = new Button();\n okButton.Text = \"确定\";\n okButton.DialogResult = DialogResult.OK;\n okButton.Location = new Point(buttonStartX, buttonY);\n okButton.Width = 75;\n selectForm.Controls.Add(okButton);\n selectForm.AcceptButton = okButton;\n\n // 添加取消按钮\n Button cancelButton = new Button();\n cancelButton.Text = \"取消\";\n cancelButton.DialogResult = DialogResult.Cancel;\n cancelButton.Location = new Point(buttonStartX + 90, buttonY);\n cancelButton.Width = 75;\n selectForm.Controls.Add(cancelButton);\n selectForm.CancelButton = cancelButton;\n\n // 显示选择窗口\n if (selectForm.ShowDialog() == DialogResult.OK)\n {\n return listBox.SelectedItem.ToString();\n }\n else\n {\n return \"127.0.0.1\"; // 如果用户取消,返回本地回环地址\n }\n }\n\n\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"获取局域网IP地址时出错: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n return \"127.0.0.1\";\n }\n }\n\n private void button3_Click(object sender, EventArgs e)\n {\n string 本地IP = GetLocalLANIP();\n try\n {\n // 构造URL\n string url = comboBox4.Text == \"Clash\" ? $\"http://{本地IP}:{numericUpDown7.Value}/api/file/mihomo\" : $\"http://{本地IP}:{numericUpDown7.Value}/download/sub\";\n\n // 将URL复制到剪贴板\n Clipboard.SetText(url);\n button3.Text = \"复制成功\";\n timer2.Enabled = true;\n // 可选:显示提示消息\n //MessageBox.Show($\"URL已复制到剪贴板:\\n{url}\", \"复制成功\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"复制到剪贴板时出错:{ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n private void timer2_Tick(object sender, EventArgs e)\n {\n button3.Text = \"复制订阅\";\n }\n\n private void comboBox3_Leave(object sender, EventArgs e)\n {\n // 检查是否有内容\n if (string.IsNullOrWhiteSpace(comboBox3.Text)) \n {\n comboBox3.Text = \"自动选择\";\n return;\n }\n\n string input = comboBox3.Text.Trim();\n\n // 检查是否存在 \"://\" 协议部分\n int protocolIndex = input.IndexOf(\"://\");\n if (protocolIndex >= 0)\n {\n // 保留 \"://\" 之后的内容\n input = input.Substring(protocolIndex + 3);\n }\n\n // 检查是否存在 \"/\" 路径部分\n int pathIndex = input.IndexOf('/');\n if (pathIndex >= 0)\n {\n // 只保留 \"/\" 之前的域名部分\n input = input.Substring(0, pathIndex);\n }\n\n // 更新 comboBox3 的文本\n comboBox3.Text = input;\n }\n\n private void 判断保存类型()\n {\n if (comboBox1.Text == \"本地\" || button2.Text == \"高级设置∨\")\n {\n groupBox4.Visible = false;\n groupBox5.Visible = false;\n groupBox6.Visible = false;\n }\n else if (comboBox1.Text == \"gist\" && button2.Text == \"高级设置∧\")\n {\n groupBox4.Visible = true;\n\n groupBox5.Visible = false;\n groupBox6.Visible = false;\n }\n else if (comboBox1.Text == \"r2\" && button2.Text == \"高级设置∧\")\n {\n groupBox5.Location = groupBox4.Location;\n groupBox5.Visible = true;\n\n groupBox4.Visible = false;\n groupBox6.Visible = false;\n }\n else if (comboBox1.Text == \"webdav\" && button2.Text == \"高级设置∧\")\n {\n groupBox6.Location = groupBox4.Location;\n groupBox6.Visible = true;\n\n groupBox4.Visible = false;\n groupBox5.Visible = false;\n }\n }\n\n private void comboBox1_TextChanged(object sender, EventArgs e)\n {\n 判断保存类型();\n if(!(comboBox1.Text == \"本地\" || comboBox1.Text == \"\") && button2.Text == \"高级设置∨\") button2_Click(sender, e);\n }\n\n private void textBox3_Enter(object sender, EventArgs e)\n {\n textBox3.PasswordChar = '\\0';\n textBox6.PasswordChar = '\\0';\n textBox8.PasswordChar = '\\0';\n }\n\n private void textBox3_Leave(object sender, EventArgs e)\n {\n textBox3.PasswordChar = '*';\n textBox6.PasswordChar = '*';\n textBox8.PasswordChar = '*';\n }\n\n private void textBox10_Enter(object sender, EventArgs e)\n {\n textBox10.PasswordChar = '\\0';\n if (textBox10.Text == \"请输入密钥\")\n {\n textBox10.Text = \"\";\n textBox10.ForeColor = Color.Black;\n }\n }\n\n private void textBox10_Leave(object sender, EventArgs e)\n {\n \n if (textBox10.Text == \"\")\n {\n textBox10.PasswordChar = '\\0';\n textBox10.Text = \"请输入密钥\";\n textBox10.ForeColor = Color.Gray;\n }\n else\n {\n textBox10.ForeColor = Color.Black;\n textBox10.PasswordChar = '*';\n }\n }\n\n private void textBox7_Leave(object sender, EventArgs e)\n {\n // 检查是否有内容\n if (string.IsNullOrWhiteSpace(textBox7.Text))\n return;\n\n string input = textBox7.Text.Trim();\n\n try\n {\n // 尝试解析为 URI\n Uri uri = new Uri(input);\n\n // 构建基础 URL (scheme + authority)\n string baseUrl = $\"{uri.Scheme}://{uri.Authority}\";\n\n // 更新 textBox7 的文本为基础 URL\n textBox7.Text = baseUrl;\n }\n catch (UriFormatException)\n {\n // 如果输入的不是有效 URI,尝试使用简单的字符串处理\n // 查找双斜杠后的第一个斜杠\n int schemeIndex = input.IndexOf(\"://\");\n if (schemeIndex >= 0)\n {\n int pathStartIndex = input.IndexOf('/', schemeIndex + 3);\n if (pathStartIndex >= 0)\n {\n // 截取到路径开始之前\n textBox7.Text = input.Substring(0, pathStartIndex);\n }\n }\n }\n }\n\n private void Log(string message, bool isError = false)\n {\n string timestamp = DateTime.Now.ToString(\"yyyy-MM-dd HH:mm:ss\");\n string logType = isError ? \"ERR\" : \"INF\";\n richTextBox1.AppendText($\"{timestamp} {logType} {message}\\r\\n\");\n\n if (richTextBox1.IsHandleCreated)\n {\n richTextBox1.BeginInvoke((MethodInvoker)(() =>\n {\n // 滚动到最底部\n richTextBox1.SelectionStart = richTextBox1.Text.Length;\n richTextBox1.ScrollToCaret();\n }));\n }\n }\n\n private void 恢复窗口()\n {\n // 首先显示窗体\n this.Show();\n\n // 强制停止当前布局逻辑\n this.SuspendLayout();\n\n // 恢复窗口状态\n this.WindowState = FormWindowState.Normal;\n\n // 强制重新布局\n this.ResumeLayout(true); // 参数true表示立即执行布局\n\n // 调用刷新布局的方法\n this.PerformLayout();\n\n // 处理WindowsForms消息队列中的所有挂起消息\n Application.DoEvents();\n\n // 激活窗口(使其获得焦点)\n this.Activate();\n }\n\n private void 隐藏窗口()\n {\n // 隐藏窗体(从任务栏消失)\n this.Hide();\n\n // 确保通知图标可见\n notifyIcon1.Visible = true;\n\n // 可选:显示气泡提示\n notifyIcon1.ShowBalloonTip(1000, \"SubsCheck\", \"程序已最小化到系统托盘\", ToolTipIcon.Info);\n }\n\n private void notifyIcon1_MouseClick(object sender, MouseEventArgs e)\n {\n if (e.Button == MouseButtons.Left)\n {\n // 检查窗口是否可见\n if (this.Visible)\n {\n // 如果窗口当前可见,则隐藏窗口\n 隐藏窗口();\n }\n else\n {\n // 如果窗口当前不可见,则恢复窗口\n 恢复窗口();\n }\n }\n }\n\n // 创建专用方法用于异步检测GitHub代理\n private async Task DetectGitHubProxyAsync(List proxyItems)\n {\n bool proxyFound = false;\n string detectedProxyURL = \"\";\n\n Log(\"检测可用 GitHub 代理...\");\n\n // 遍历随机排序后的代理列表\n foreach (string proxyItem in proxyItems)\n {\n string checkUrl = $\"https://{proxyItem}/https://raw.githubusercontent.com/cmliu/SubsCheck-Win-GUI/master/packages.config\";\n Log($\"正在测试 GitHub 代理: {proxyItem}\");\n richTextBox1.Refresh();\n\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); // 设置5秒超时\n // 添加User-Agent头,避免被拒绝访问\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n\n // 使用异步方式\n HttpResponseMessage response = await client.GetAsync(checkUrl);\n if (response.IsSuccessStatusCode)\n {\n // 找到可用代理\n detectedProxyURL = $\"https://{proxyItem}/\";\n Log($\"找到可用 GitHub 代理: {proxyItem}\");\n proxyFound = true;\n break;\n }\n }\n }\n catch (Exception ex)\n {\n // 记录错误但继续尝试下一个\n Log($\"代理 {proxyItem} 测试失败: {ex.Message}\", true);\n richTextBox1.Refresh();\n }\n }\n\n // 如果没有找到可用的代理\n if (!proxyFound)\n {\n Log(\"未找到可用的 GitHub 代理,请在高级设置中手动设置。\", true);\n MessageBox.Show(\"未找到可用的 GitHub 代理。\\n\\n请打开高级设置手动填入一个可用的Github Proxy,或检查您的网络连接。\",\n \"代理检测失败\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Warning);\n }\n\n return detectedProxyURL;\n }\n\n private async void button5_Click(object sender, EventArgs e)\n {\n try\n {\n button5.Enabled = false;\n button1.Enabled = false;\n // 清空日志\n richTextBox1.Clear();\n Log(\"开始检查和下载最新版本的 subs-check.exe...\");\n\n // 获取当前应用程序目录\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string subsCheckPath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 检查文件是否存在\n if (File.Exists(subsCheckPath))\n {\n Log($\"发现 subs-check.exe,正在删除...\");\n\n try\n {\n // 首先检查是否有进程正在运行\n Process[] processes = Process.GetProcessesByName(\"subs-check\");\n if (processes.Length > 0)\n {\n Log(\"发现正在运行的 subs-check.exe 进程,正在强制结束...\");\n foreach (Process process in processes)\n {\n try\n {\n process.Kill();\n process.WaitForExit();\n Log($\"成功结束 subs-check.exe 进程(ID: {process.Id})\");\n }\n catch (Exception ex)\n {\n Log($\"结束进程时出错(ID: {process.Id}): {ex.Message}\", true);\n }\n }\n }\n\n // 删除文件\n File.Delete(subsCheckPath);\n Log(\"成功删除旧版本 subs-check.exe\");\n }\n catch (Exception ex)\n {\n Log($\"删除 subs-check.exe 时出错: {ex.Message}\", true);\n MessageBox.Show($\"无法删除现有的 subs-check.exe 文件: {ex.Message}\\n\\n请手动删除后重试,或者检查文件是否被其他程序占用。\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n button5.Enabled = true;\n return;\n }\n }\n else\n {\n Log(\"未找到现有的 subs-check.exe 文件,将直接下载最新版本\");\n }\n\n // 检测可用的 GitHub 代理\n if (!string.IsNullOrEmpty(comboBox3.Text) && comboBox3.Text == \"自动选择\")\n {\n // 创建不包含\"自动选择\"的代理列表\n List proxyItems = new List();\n for (int j = 0; j < comboBox3.Items.Count; j++)\n {\n string proxyItem = comboBox3.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n\n // 随机打乱列表顺序\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n\n // 异步检测可用代理\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n\n // 如果未能找到可用代理,提示用户\n if (string.IsNullOrEmpty(githubProxyURL))\n {\n Log(\"未能找到可用的 GitHub 代理,下载可能会失败\", true);\n }\n }\n else if (!string.IsNullOrEmpty(comboBox3.Text))\n {\n githubProxyURL = $\"https://{comboBox3.Text}/\";\n Log($\"使用指定的 GitHub 代理: {comboBox3.Text}\");\n }\n else\n {\n Log(\"未设置 GitHub 代理,将尝试直接下载\", true);\n }\n\n // 下载最新版本的 subs-check.exe\n await DownloadSubsCheckEXE();\n\n // 完成\n Log(\"内核更新完成!\");\n }\n catch (Exception ex)\n {\n Log($\"操作过程中出错: {ex.Message}\", true);\n MessageBox.Show($\"处理过程中出现错误: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n finally\n {\n button5.Enabled = true;\n button1.Enabled = true;\n }\n }\n\n private decimal 订阅端口;\n private decimal SubStore端口;\n private void numericUpDown6_ValueChanged(object sender, EventArgs e)\n {\n // 检查numericUpDown7是否存在并且与numericUpDown6的值相等\n if (numericUpDown6.Value == numericUpDown7.Value)\n {\n // 显示警告消息\n MessageBox.Show(\"订阅端口 和 Sub-Store端口 不能相同!\",\n \"端口冲突\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Warning);\n\n // 将numericUpDown6的值恢复为更改前的值\n numericUpDown6.Value = 订阅端口;\n numericUpDown7.Value = SubStore端口;\n }\n else\n {\n // 保存当前值作为下次比较的基准\n 订阅端口 = numericUpDown6.Value;\n SubStore端口 = numericUpDown7.Value;\n }\n }\n\n /// \n /// 异步检测并强制终止所有程序目录下的output\\node.exe进程\n /// \n private async Task KillNodeProcessAsync()\n {\n try\n {\n Log(\"检查 node.exe 进程状态...\");\n\n // 获取当前应用程序的执行目录\n string executablePath = Path.GetDirectoryName(Application.ExecutablePath);\n string nodeExePath = Path.Combine(executablePath, \"output\", \"node.exe\");\n\n // 获取所有node.exe进程\n Process[] nodeProcesses = Process.GetProcessesByName(\"node\");\n\n if (nodeProcesses.Length == 0)\n {\n Log(\"未发现运行中的 node.exe 进程\");\n return;\n }\n\n Log($\"发现 {nodeProcesses.Length} 个 node.exe 进程,开始检查并终止匹配路径的进程...\");\n\n int terminatedCount = 0;\n\n foreach (Process process in nodeProcesses)\n {\n try\n {\n // 使用Task.Run将可能耗时的操作放在后台线程执行\n string processPath = await Task.Run(() => {\n try\n {\n return process.MainModule?.FileName;\n }\n catch (Exception)\n {\n return null;\n }\n });\n\n // 检查是否匹配我们要查找的node.exe路径\n if (!string.IsNullOrEmpty(processPath) &&\n processPath.Equals(nodeExePath, StringComparison.OrdinalIgnoreCase))\n {\n // 找到匹配的进程,终止它\n Log($\"发现匹配路径的 node.exe 进程(ID: {process.Id}),正在强制结束...\");\n\n await Task.Run(() => {\n process.Kill();\n process.WaitForExit();\n });\n\n Log($\"成功结束 node.exe 进程(ID: {process.Id})\");\n terminatedCount++;\n }\n }\n catch (Exception ex)\n {\n // 访问进程信息时可能会因为权限问题抛出异常\n Log($\"访问或终止进程(ID: {process.Id})时出错: {ex.Message}\", true);\n }\n }\n\n if (terminatedCount > 0)\n {\n Log($\"总共终止了 {terminatedCount} 个匹配路径的 node.exe 进程\");\n }\n else\n {\n Log(\"未发现需要终止的 node.exe 进程\");\n }\n }\n catch (Exception ex)\n {\n Log($\"检查或终止 node.exe 进程时出错: {ex.Message}\", true);\n }\n }\n\n private async void textBox1_DoubleClick(object sender, EventArgs e)\n {\n if (textBox1.Enabled)\n {\n // 创建EditURLs窗口的实例\n EditURLs editURLsForm = new EditURLs();\n\n // 传递当前textBox1的内容到EditURLs窗口\n editURLsForm.UrlContent = textBox1.Text + \"\\n\";\n editURLsForm.githubProxys = comboBox3.Items;\n editURLsForm.githubProxy = comboBox3.Text;\n // 显示对话框并等待结果\n DialogResult result = editURLsForm.ShowDialog();\n\n // 如果用户点击了\"保存并关闭\"按钮(返回DialogResult.OK)\n if (result == DialogResult.OK)\n {\n // 获取编辑后的内容,按行拆分,过滤空行\n string[] lines = editURLsForm.UrlContent.Split(\n new[] { \"\\r\\n\", \"\\r\", \"\\n\" },\n StringSplitOptions.RemoveEmptyEntries);\n\n // 去除每行首尾的空白字符\n for (int i = 0; i < lines.Length; i++)\n {\n lines[i] = lines[i].Trim();\n }\n\n // 再次过滤掉空行\n lines = lines.Where(line => !string.IsNullOrWhiteSpace(line)).ToArray();\n\n // 将处理后的内容更新到Form1的textBox1\n textBox1.Text = string.Join(Environment.NewLine, lines);\n await SaveConfig(false);\n Log(\"已保存订阅地址列表。\");\n }\n }\n\n }\n\n private void checkBox1_CheckedChanged(object sender, EventArgs e)\n {\n if (checkBox1.Checked == false) checkBox2.Checked = false;\n }\n\n private void checkBox2_CheckedChanged(object sender, EventArgs e)\n {\n if (checkBox2.Checked == true) checkBox1.Checked = true;\n }\n\n private async void timer3_Tick(object sender, EventArgs e)\n {\n if (button1.Text == \"⏹️ 停止\") \n {\n Log(\"subs-check.exe 运行时满24小时,自动重启清理内存占用。\");\n // 停止 subs-check.exe 程序\n StopSubsCheckProcess();\n // 结束 Sub-Store\n await KillNodeProcessAsync();\n // 重新启动 subs-check.exe 程序\n StartSubsCheckProcess();\n numericUpDown1.Enabled = false;\n numericUpDown2.Enabled = false;\n numericUpDown3.Enabled = false;\n numericUpDown4.Enabled = false;\n numericUpDown5.Enabled = false;\n numericUpDown6.Enabled = false;\n numericUpDown7.Enabled = false;\n comboBox1.Enabled = false;\n textBox1.Enabled = false;\n groupBox3.Enabled = false;\n groupBox4.Enabled = false;\n groupBox5.Enabled = false;\n groupBox6.Enabled = false;\n button1.Text = \"⏹️ 停止\";\n }\n }\n\n private void button4_Click(object sender, EventArgs e)\n {\n // 创建 CheckUpdates 窗口实例\n CheckUpdates checkUpdatesForm = new CheckUpdates();\n\n // 传递必要的数据和状态\n checkUpdatesForm.githubProxys = comboBox3.Items;\n checkUpdatesForm.githubProxy = comboBox3.Text;\n\n checkUpdatesForm.当前subsCheck版本号 = 当前subsCheck版本号;\n checkUpdatesForm.当前GUI版本号 = 当前GUI版本号;\n checkUpdatesForm.最新GUI版本号 = 最新GUI版本号;\n\n // 为 CheckUpdates 的 button2 添加点击事件处理程序\n checkUpdatesForm.FormClosed += (s, args) => {\n // 移除事件处理,避免内存泄漏\n if (checkUpdatesForm.DialogResult == DialogResult.OK)\n {\n // 如果返回OK结果,表示按钮被点击并需要更新内核\n button5_Click(this, EventArgs.Empty);\n }\n };\n\n // 设置 button2 点击后关闭窗口并返回 DialogResult.OK\n // 这需要在 CheckUpdates.cs 中修改 button2_Click 方法\n\n // 显示 CheckUpdates 窗口\n checkUpdatesForm.ShowDialog();\n }\n\n private void checkBox3_CheckedChanged(object sender, EventArgs e)\n {\n if (checkBox3.Checked) numericUpDown8.Enabled = true;\n else numericUpDown8.Enabled = false;\n }\n\n private async void comboBox5_SelectedIndexChanged(object sender, EventArgs e)\n {\n if (comboBox5.Text.Contains(\"[内置]\")) await ProcessComboBox5Selection(true);\n }\n\n private async Task ProcessComboBox5Selection(bool 汇报Log = false)\n {\n // 确定文件名和下载URL\n string fileName;\n string downloadFilePath;\n string downloadUrl;\n string displayName;\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n if (comboBox5.Text.Contains(\"[内置]布丁狗\"))\n {\n fileName = \"bdg.yaml\";\n displayName = \"[内置]布丁狗的订阅转换\";\n downloadUrl = \"https://raw.githubusercontent.com/cmliu/ACL4SSR/main/yaml/bdg.yaml\";\n }\n else // [内置]ACL4SSR\n {\n fileName = \"ACL4SSR_Online_Full.yaml\";\n displayName = \"[内置]ACL4SSR_Online_Full\";\n downloadUrl = \"https://raw.githubusercontent.com/beck-8/override-hub/main/yaml/ACL4SSR_Online_Full.yaml\";\n }\n\n // 确保output文件夹存在\n string outputFolderPath = Path.Combine(executablePath, \"output\");\n if (!Directory.Exists(outputFolderPath))\n {\n Directory.CreateDirectory(outputFolderPath);\n }\n\n // 确定文件完整路径\n downloadFilePath = Path.Combine(outputFolderPath, fileName);\n\n // 检查文件是否存在\n if (!File.Exists(downloadFilePath))\n {\n Log($\"{displayName} 覆写配置文件 未找到,正在下载...\");\n\n // 重置进度条\n progressBar1.Value = 0;\n\n // 添加GitHub代理前缀如果有\n string fullDownloadUrl = githubProxyURL + downloadUrl;\n\n try\n {\n // 创建不使用系统代理的HttpClientHandler\n using (HttpClientHandler handler = new HttpClientHandler { UseProxy = false, Proxy = null })\n using (HttpClient client = new HttpClient(handler))\n {\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n client.Timeout = TimeSpan.FromSeconds(15); // 设置15秒超时\n\n // 先获取文件大小\n HttpResponseMessage headResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Head, fullDownloadUrl));\n long totalBytes = headResponse.Content.Headers.ContentLength ?? 0;\n\n // 如果无法获取文件大小,显示不确定进度\n if (totalBytes == 0)\n {\n Console.WriteLine($\"无法获取 {displayName} 文件大小,将显示不确定进度\");\n }\n\n // 创建下载请求并获取响应流\n using (var response = await client.GetAsync(fullDownloadUrl, HttpCompletionOption.ResponseHeadersRead))\n {\n if (response.IsSuccessStatusCode)\n {\n using (var contentStream = await response.Content.ReadAsStreamAsync())\n using (var fileStream = new FileStream(downloadFilePath, FileMode.Create, FileAccess.Write, FileShare.None, 8192, true))\n {\n byte[] buffer = new byte[8192];\n long totalBytesRead = 0;\n int bytesRead;\n\n while ((bytesRead = await contentStream.ReadAsync(buffer, 0, buffer.Length)) > 0)\n {\n await fileStream.WriteAsync(buffer, 0, bytesRead);\n totalBytesRead += bytesRead;\n\n // 更新进度条\n if (totalBytes > 0)\n {\n int progressPercentage = (int)((totalBytesRead * 100) / totalBytes);\n // 确保进度值在有效范围内 (0-100)\n progressPercentage = Math.Min(100, Math.Max(0, progressPercentage));\n progressBar1.Value = progressPercentage;\n }\n }\n\n // 确保进度条显示100%\n progressBar1.Value = 100;\n }\n\n Log($\"{displayName} 覆写配置文件 下载成功\");\n }\n else\n {\n Log($\"{displayName} 覆写配置文件 下载失败: HTTP {(int)response.StatusCode} {response.ReasonPhrase}\", true);\n }\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"{displayName} 覆写配置文件 下载失败: {ex.Message}\", true);\n // 出错时重置进度条\n progressBar1.Value = 0;\n }\n }\n else\n {\n if (汇报Log) Log($\"{displayName} 覆写配置文件 已就绪。\");\n }\n }\n\n private void numericUpDown1_ValueChanged(object sender, EventArgs e)\n {\n if (numericUpDown1.Value > 128)\n {\n string warningMessage =\n \"⚠️ 高并发风险提醒 ⚠️\\n\\n\" +\n \"您设置的并发数值过高,可能导致:\\n\\n\" +\n \"• 运营商判定为异常流量并限制网络\\n\" +\n \"• 路由器性能压力过大\\n\" +\n \"• 测速结果不准确\\n\\n\" +\n \"并发数设置建议:\\n\" +\n \"• 宽带峰值/50Mbps:一般对网络无影响\\n\" +\n \"• 宽带峰值/25Mbps:可能会影响同网络下载任务\\n\" +\n \"• 宽带峰值/10Mbps:可能会影响同网络下其他设备的上网体验\\n\";\n\n Log(warningMessage);\n }\n }\n\n private void checkBox4_CheckedChanged(object sender, EventArgs e)\n {\n if(checkBox4.Checked) textBox10.Enabled = true;\n else textBox10.Enabled = false;\n }\n\n private void button6_Click(object sender, EventArgs e)\n {\n string 本地IP = GetLocalLANIP();\n try\n {\n // 构造URL\n string url = $\"http://{本地IP}:{numericUpDown6.Value}/admin\";\n\n // 使用系统默认浏览器打开URL\n System.Diagnostics.Process.Start(url);\n\n Log($\"正在浏览器中打开 Subs-Check 配置管理: {url}\");\n }\n catch (Exception ex)\n {\n Log($\"打开浏览器失败: {ex.Message}\", true);\n MessageBox.Show($\"打开浏览器时出错: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n /// \n /// 获取API状态信息并返回包含6个元素的字符串数组\n /// \n /// \n /// 包含6个元素的字符串数组:\n /// [0] - 状态类型 (\"checking\"/\"idle\"/\"error\")\n /// [1] - 状态图标类别 (\"primary\"/\"success\"/\"danger\")\n /// [2] - 状态文本 (\"正在检测中...\"/\"空闲\"/\"获取状态失败\")\n /// [3] - 节点总数 (proxyCount或\"N/A\")\n /// [4] - 进度百分比 (progress或\"N/A\")\n /// [5] - 可用节点数量 (available或\"N/A\")\n /// \n private async Task GetApiStatusAsync()\n {\n string[] resultArray = new string[6];\n string baseUrl = $\"http://127.0.0.1:{numericUpDown6.Value}\";\n\n try\n {\n using (HttpClient client = new HttpClient())\n {\n // 设置基础URL\n client.BaseAddress = new Uri(baseUrl);\n\n // 添加API密钥请求头\n client.DefaultRequestHeaders.Add(\"X-API-Key\", WebUIapiKey);\n\n // 设置超时时间\n client.Timeout = TimeSpan.FromSeconds(5);\n\n // 发送请求\n HttpResponseMessage response = await client.GetAsync(\"/api/status\");\n\n // 检查响应状态\n if (response.IsSuccessStatusCode)\n {\n // 读取响应内容\n string content = await response.Content.ReadAsStringAsync();\n\n // 解析JSON\n JObject data = JObject.Parse(content);\n\n if (data[\"checking\"] != null && data[\"checking\"].Value())\n {\n // 正在检测状态\n resultArray[0] = \"checking\";\n resultArray[1] = \"primary\";\n resultArray[2] = \"正在检测中...\";\n\n // 提取节点数据\n resultArray[3] = data[\"proxyCount\"]?.ToString() ?? \"0\";\n resultArray[4] = data[\"progress\"]?.ToString() ?? \"0\";\n resultArray[5] = data[\"available\"]?.ToString() ?? \"0\";\n }\n else\n {\n // 空闲状态\n resultArray[0] = \"idle\";\n resultArray[1] = \"success\";\n resultArray[2] = \"空闲\";\n\n // 空闲时相关数据设为N/A\n resultArray[3] = \"N/A\";\n resultArray[4] = \"N/A\";\n resultArray[5] = \"N/A\";\n }\n }\n else\n {\n // 请求失败,例如未授权\n resultArray[0] = \"error\";\n resultArray[1] = \"danger\";\n resultArray[2] = $\"API请求失败: {(int)response.StatusCode}\";\n resultArray[3] = \"N/A\";\n resultArray[4] = \"N/A\";\n resultArray[5] = \"N/A\";\n }\n }\n }\n catch (Exception ex)\n {\n // 发生异常\n resultArray[0] = \"error\";\n resultArray[1] = \"danger\";\n resultArray[2] = $\"获取状态失败: {ex.Message}\";\n resultArray[3] = \"N/A\";\n resultArray[4] = \"N/A\";\n resultArray[5] = \"N/A\";\n\n // 可选:记录错误到日志\n Log($\"获取API状态失败: {ex.Message}\", true);\n }\n\n return resultArray;\n }\n\n private async void timer4_Tick(object sender, EventArgs e)\n {\n //if (!button7.Enabled) button7.Enabled = true;\n string[] subscheck状态 = await GetApiStatusAsync();\n string 状态类型 = subscheck状态[0];\n string 状态图标类别 = subscheck状态[1];\n string 状态文本 = subscheck状态[2];\n string 节点总数 = subscheck状态[3];\n string 进度百分比 = subscheck状态[4];\n string 可用节点数量 = subscheck状态[5];\n // 更新状态文本\n\n if (状态类型 == \"checking\")\n {\n button7.Text = \"⏸️ 暂停\";\n nodeInfo = $\"({进度百分比}/{节点总数}) 可用: {可用节点数量}\";\n int nodeTotal = int.Parse(节点总数);\n if (nodeTotal > 0) {\n int 进度条百分比 = int.Parse(进度百分比) * 100 / nodeTotal;\n progressBar1.Value = 进度条百分比;\n if (!button7.Enabled) button7.Enabled = true;\n }\n \n // 确保通知图标文本不超过63个字符\n string notifyText = \"SubsCheck: \" + nodeInfo;\n if (notifyText.Length > 63)\n {\n notifyText = notifyText.Substring(0, 60) + \"...\";\n }\n notifyIcon1.Text = notifyText;\n textBox1.Enabled = false;\n }\n else if (状态类型 == \"idle\")\n {\n button7.Text = \"⏯️ 开始\";\n progressBar1.Value = 100;\n nodeInfo = $\"等待{nextCheckTime}\";\n notifyIcon1.Text = \"SubsCheck: 已就绪\\n\" + nextCheckTime; ;\n textBox1.Enabled = true;\n }\n else if (状态类型 == \"error\")\n {\n button7.Text = \"🔀 未知\";\n nodeInfo = 状态文本;\n }\n groupBox2.Text = $\"实时日志 {nodeInfo}\";\n }\n\n private async void button7_Click(object sender, EventArgs e)\n {\n button7.Enabled = false;\n timer4.Enabled = false;\n\n try\n {\n bool isSuccess;\n\n if (button7.Text == \"⏯️ 开始\")\n {\n isSuccess = await SendApiRequestAsync(\"/api/trigger-check\", \"节点检查\");\n if (isSuccess)\n {\n button7.Text = \"⏸️ 暂停\";\n textBox1.Enabled = false; // 检查开始后禁用订阅编辑\n }\n }\n else // \"⏸️ 暂停\"\n {\n isSuccess = await SendApiRequestAsync(\"/api/force-close\", \"强制关闭\");\n }\n\n // 如果请求失败,更新按钮状态为未知\n if (!isSuccess) button7.Text = \"🔀 未知\";\n }\n finally\n {\n // 无论成功失败都重新启用定时器和按钮\n timer4.Enabled = true;\n timer4.Start();\n //button7.Enabled = true;\n }\n }\n\n /// \n /// 发送API请求到SubsCheck服务\n /// \n /// API端点路径\n /// 操作名称(用于日志)\n /// 操作是否成功\n private async Task SendApiRequestAsync(string endpoint, string operationName)\n {\n try\n {\n // 获取API基础地址和API密钥\n string baseUrl = $\"http://127.0.0.1:{numericUpDown6.Value}\";\n\n using (HttpClient client = new HttpClient())\n {\n client.BaseAddress = new Uri(baseUrl);\n client.DefaultRequestHeaders.Add(\"X-API-Key\", WebUIapiKey);\n client.Timeout = TimeSpan.FromSeconds(10);\n\n // 发送POST请求\n HttpResponseMessage response = await client.PostAsync(endpoint, new StringContent(\"\"));\n\n // 检查响应状态\n if (response.IsSuccessStatusCode)\n {\n Log($\"成功{operationName}\");\n return true;\n }\n else\n {\n string errorContent = await response.Content.ReadAsStringAsync();\n Log($\"{operationName}失败: HTTP {(int)response.StatusCode} {response.ReasonPhrase}\\n{errorContent}\", true);\n return false;\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"{operationName}时发生错误: {ex.Message}\", true);\n return false;\n }\n }\n\n private void textBox11_Leave(object sender, EventArgs e)\n {\n if (IsValidCronExpression(textBox11.Text))\n {\n // 计算并显示cron表达式的说明\n string cronDescription = GetCronExpressionDescription(textBox11.Text);\n // 可以用工具提示或者消息框显示,这里使用消息框\n //MessageBox.Show(cronDescription, \"Cron表达式说明\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n Log($\"Cron表达式说明 {cronDescription}\");\n }\n else\n {\n MessageBox.Show(\"请输入有效的cron表达式,例如:*/30 * * * *\", \"无效的cron表达式\",\n MessageBoxButtons.OK, MessageBoxIcon.Warning);\n textBox11.Focus();\n textBox11.Text = \"0 */2 * * *\"; // 恢复默认值\n }\n }\n\n /// \n /// 验证输入文本是否是合法的cron表达式\n /// \n /// 如果是合法的cron表达式,则返回true;否则返回false\n private bool IsValidCronExpression(string cron表达式)\n {\n string cronExpression = cron表达式.Trim();\n\n // 如果是空字符串,则不是有效表达式\n if (string.IsNullOrWhiteSpace(cronExpression))\n return false;\n\n // 分割cron表达式为5个部分:分钟 小时 日期 月份 星期\n string[] parts = cronExpression.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n\n // cron表达式必须有5个部分\n if (parts.Length != 5)\n return false;\n\n try\n {\n // 验证每个部分\n // 分钟 (0-59)\n if (!IsValidCronField(parts[0], 0, 59))\n return false;\n\n // 小时 (0-23)\n if (!IsValidCronField(parts[1], 0, 23))\n return false;\n\n // 日期 (1-31)\n if (!IsValidCronField(parts[2], 1, 31))\n return false;\n\n // 月份 (1-12)\n if (!IsValidCronField(parts[3], 1, 12))\n return false;\n\n // 星期 (0-7,0和7都表示星期日)\n if (!IsValidCronField(parts[4], 0, 7))\n return false;\n\n return true;\n }\n catch\n {\n return false;\n }\n }\n\n /// \n /// 验证cron表达式中的单个字段是否合法\n /// \n /// 字段值\n /// 最小允许值\n /// 最大允许值\n /// 如果字段合法,则返回true;否则返回false\n private bool IsValidCronField(string field, int min, int max)\n {\n // 处理通配符 \"*\"\n if (field == \"*\")\n return true;\n\n // 处理步长 \"*/n\"\n if (field.StartsWith(\"*/\"))\n {\n string stepStr = field.Substring(2);\n if (int.TryParse(stepStr, out int step))\n return step > 0 && step <= max;\n return false;\n }\n\n // 处理范围 \"n-m\"\n if (field.Contains(\"-\"))\n {\n string[] range = field.Split('-');\n if (range.Length != 2)\n return false;\n\n if (int.TryParse(range[0], out int start) && int.TryParse(range[1], out int end))\n return start >= min && end <= max && start <= end;\n return false;\n }\n\n // 处理列表 \"n,m,k\"\n if (field.Contains(\",\"))\n {\n string[] values = field.Split(',');\n foreach (string item in values)\n {\n if (!int.TryParse(item, out int itemValue) || itemValue < min || itemValue > max)\n return false;\n }\n return true;\n }\n\n // 处理单个数字\n if (int.TryParse(field, out int fieldValue))\n return fieldValue >= min && fieldValue <= max;\n\n return false;\n }\n\n /// \n /// 获取cron表达式的友好文本说明\n /// \n /// 要解析的cron表达式\n /// 返回cron表达式的执行时间说明\n private string GetCronExpressionDescription(string cron表达式)\n {\n try\n {\n string cronExpression = cron表达式.Trim();\n string[] parts = cronExpression.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n\n if (parts.Length != 5)\n return \"无效的cron表达式\";\n\n // 分别解析每个部分\n string minuteDesc = ParseCronPart(parts[0], \"分钟\", 0, 59);\n string hourDesc = ParseCronPart(parts[1], \"小时\", 0, 23);\n string dayDesc = ParseCronPart(parts[2], \"日\", 1, 31);\n string monthDesc = ParseCronPart(parts[3], \"月\", 1, 12);\n string weekDesc = ParseCronPart(parts[4], \"星期\", 0, 7, true);\n\n // 组合最终说明\n string description = \"执行时间: \";\n\n // 月份\n if (monthDesc != \"每月\")\n description += monthDesc + \"的\";\n\n // 星期与日期的关系\n if (parts[2] == \"*\" && parts[4] != \"*\")\n description += weekDesc + \"的\";\n else if (parts[2] != \"*\" && parts[4] == \"*\")\n description += dayDesc;\n else if (parts[2] != \"*\" && parts[4] != \"*\")\n description += $\"{dayDesc}或{weekDesc}\";\n else\n description += \"每天\";\n\n // 时间(小时:分钟)\n description += $\"{hourDesc}{minuteDesc}\";\n\n return description;\n }\n catch\n {\n return \"无法解析cron表达式\";\n }\n }\n\n /// \n /// 解析cron表达式的单个部分\n /// \n private string ParseCronPart(string part, string unit, int min, int max, bool isWeekday = false)\n {\n // 处理星号,表示每个时间单位\n if (part == \"*\")\n {\n return $\"每{unit}\";\n }\n\n // 处理步长 */n\n if (part.StartsWith(\"*/\"))\n {\n int step = int.Parse(part.Substring(2));\n return $\"每{step}{unit}\";\n }\n\n // 处理范围 n-m\n if (part.Contains(\"-\"))\n {\n string[] range = part.Split('-');\n int start = int.Parse(range[0]);\n int end = int.Parse(range[1]);\n\n if (isWeekday)\n {\n string[] weekdays = { \"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\", \"星期日\" };\n return $\"从{weekdays[start]}到{weekdays[end]}\";\n }\n\n return $\"从{start}{unit}到{end}{unit}\";\n }\n\n // 处理列表 n,m,k\n if (part.Contains(\",\"))\n {\n string[] values = part.Split(',');\n if (isWeekday)\n {\n string[] weekdays = { \"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\", \"星期日\" };\n return string.Join(\"、\", values.Select(v => weekdays[int.Parse(v)]));\n }\n return $\"{string.Join(\"、\", values)}{unit}\";\n }\n\n // 处理单个数字\n int value = int.Parse(part);\n if (isWeekday)\n {\n string[] weekdays = { \"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\", \"星期日\" };\n return weekdays[value];\n }\n return $\"{value}{unit}\";\n }\n\n private void 切换cron表达式(object sender, EventArgs e)\n {\n if (textBox11.Visible)\n {\n textBox11.Visible = false;\n label2.Visible = true;\n numericUpDown2.Visible = true;\n Log(\"下次检查时间间隔 使用分钟倒计时\");\n }\n else\n {\n textBox11.Location = new Point(9, 48);\n textBox11.Visible = true;\n label2.Visible = false;\n numericUpDown2.Visible = false;\n Log(\"下次检查时间间隔 使用cron表达式\");\n }\n }\n\n /// \n /// 获取计算机名的MD5哈希值\n /// \n /// 返回计算机名的MD5哈希字符串(32位小写)\n private string GetComputerNameMD5()\n {\n try\n {\n // 获取计算机名\n string computerName = System.Environment.MachineName;\n\n // 引入必要的命名空间\n using (System.Security.Cryptography.MD5 md5 = System.Security.Cryptography.MD5.Create())\n {\n // 将计算机名转换为字节数组\n byte[] inputBytes = System.Text.Encoding.UTF8.GetBytes(computerName);\n\n // 计算MD5哈希值\n byte[] hashBytes = md5.ComputeHash(inputBytes);\n\n // 将字节数组转换为十六进制字符串\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < hashBytes.Length; i++)\n {\n sb.Append(hashBytes[i].ToString(\"x2\"));\n }\n\n return sb.ToString();\n }\n }\n catch (Exception ex)\n {\n Log($\"计算计算机名MD5时出错: {ex.Message}\", true);\n return \"CMLiussss\";\n }\n }\n\n // 添加辅助下载方法\n async Task DownloadFileAsync(HttpClient httpClient, string url, string filePath)\n {\n try\n {\n // 获取文件大小\n HttpResponseMessage headResponse = await httpClient.SendAsync(new HttpRequestMessage(HttpMethod.Head, url));\n headResponse.EnsureSuccessStatusCode(); // 确保请求成功\n long totalBytes = headResponse.Content.Headers.ContentLength ?? 0;\n\n // 下载文件\n using (var response = await httpClient.GetAsync(url, HttpCompletionOption.ResponseHeadersRead))\n {\n response.EnsureSuccessStatusCode(); // 确保请求成功\n\n using (var contentStream = await response.Content.ReadAsStreamAsync())\n using (var fileStream = new FileStream(filePath, FileMode.Create, FileAccess.Write, FileShare.None, 8192, true))\n {\n byte[] buffer = new byte[8192];\n long totalBytesRead = 0;\n int bytesRead;\n\n while ((bytesRead = await contentStream.ReadAsync(buffer, 0, buffer.Length)) > 0)\n {\n await fileStream.WriteAsync(buffer, 0, bytesRead);\n totalBytesRead += bytesRead;\n\n // 更新进度条\n if (totalBytes > 0)\n {\n int progressPercentage = (int)((totalBytesRead * 100) / totalBytes);\n progressPercentage = Math.Min(100, Math.Max(0, progressPercentage));\n progressBar1.Value = progressPercentage;\n }\n }\n }\n }\n\n return true; // 下载成功\n }\n catch\n {\n throw; // 重新抛出异常,让调用者处理\n }\n }\n\n private static about aboutWindow = null;\n private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n // 检查窗口是否已经打开\n if (aboutWindow != null && !aboutWindow.IsDisposed)\n {\n // 窗口已经存在,激活它\n aboutWindow.Activate();\n return;\n }\n\n // 需要创建新窗口\n this.BeginInvoke(new Action(() =>\n {\n // 创建about窗口实例\n aboutWindow = new about();\n\n // 传递版本号信息\n aboutWindow.GuiVersion = 当前GUI版本号;\n aboutWindow.CoreVersion = 当前subsCheck版本号;\n\n // 添加窗口关闭时的处理,清除静态引用\n aboutWindow.FormClosed += (s, args) => aboutWindow = null;\n\n // 非模态显示窗口\n aboutWindow.Show(this);\n\n // 设置TopMost确保窗口显示在最前面\n aboutWindow.TopMost = true;\n }));\n }\n\n private void button8_Click(object sender, EventArgs e)\n {\n try\n {\n // 创建MoreYAML窗口实例\n MoreYAML moreYamlWindow = new MoreYAML();\n\n // 显示为模态对话框,这会阻塞主线程直到窗口关闭\n DialogResult result = moreYamlWindow.ShowDialog(this);\n\n // 如果需要,可以处理对话框的返回结果\n if (result == DialogResult.OK)\n {\n // 用户点击了\"确定\"或某种完成操作的按钮\n Log(\"补充参数配置已成功保存到 more.yaml 文件!设置已应用\");\n }\n }\n catch (Exception ex)\n {\n Log($\"打开MoreYAML窗口时出错: {ex.Message}\", true);\n MessageBox.Show($\"打开MoreYAML窗口时出错: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n private async void checkBox5_CheckedChanged(object sender, EventArgs e)\n {\n checkBox5.Enabled = false;\n try\n {\n // 获取当前应用程序的可执行文件路径\n string appPath = Application.ExecutablePath;\n // 获取应用程序名称(不包含扩展名)\n string appName = Path.GetFileNameWithoutExtension(appPath);\n // 获取启动文件夹的路径\n string startupFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.Startup);\n // 快捷方式文件的完整路径\n string shortcutPath = Path.Combine(startupFolderPath, $\"{appName}.lnk\");\n\n if (checkBox5.Checked)\n {\n // 检查启动文件夹中是否已存在该快捷方式\n if (File.Exists(shortcutPath))\n {\n Log(\"开机启动项已存在,无需重复创建\");\n }\n else\n {\n // 创建快捷方式\n CreateShortcut(appPath, shortcutPath, \"-auto\");\n Log(\"已成功创建开机启动项,下次电脑启动时将自动运行程序\");\n }\n }\n else\n {\n // 删除启动项\n if (File.Exists(shortcutPath))\n {\n File.Delete(shortcutPath);\n Log(\"已移除开机启动项,下次开机将不会自动启动\");\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"设置开机启动项时出错: {ex.Message}\", true);\n MessageBox.Show($\"设置开机启动项失败: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n\n // 恢复CheckBox状态,避免UI状态与实际状态不一致\n checkBox5.CheckedChanged -= checkBox5_CheckedChanged;\n checkBox5.Checked = !checkBox5.Checked;\n checkBox5.CheckedChanged += checkBox5_CheckedChanged;\n }\n checkBox5.Enabled = true;\n await SaveConfig(false);\n }\n\n /// \n /// 创建指向指定路径应用程序的快捷方式\n /// \n /// 目标应用程序的完整路径\n /// 要创建的快捷方式的完整路径\n /// 可选的启动参数\n private void CreateShortcut(string targetPath, string shortcutPath, string arguments = \"\")\n {\n // 使用COM接口创建快捷方式\n Type t = Type.GetTypeFromProgID(\"WScript.Shell\");\n dynamic shell = Activator.CreateInstance(t);\n var shortcut = shell.CreateShortcut(shortcutPath);\n\n shortcut.TargetPath = targetPath;\n if (!string.IsNullOrEmpty(arguments))\n shortcut.Arguments = arguments; // 设置启动参数\n\n shortcut.WorkingDirectory = Path.GetDirectoryName(targetPath);\n shortcut.WindowStyle = 7; // 最小化启动: 7, 正常启动: 1, 最大化启动: 3\n shortcut.Description = \"SubsCheck Win GUI自启动快捷方式\";\n shortcut.IconLocation = targetPath + \",0\"; // 使用应用程序自身的图标\n\n // 保存快捷方式\n shortcut.Save();\n\n // 释放COM对象\n System.Runtime.InteropServices.Marshal.FinalReleaseComObject(shortcut);\n System.Runtime.InteropServices.Marshal.FinalReleaseComObject(shell);\n }\n\n /// \n /// 检查启动参数中是否包含指定的参数\n /// \n /// 要检查的参数名称,例如\"-autoup\"\n /// 如果存在指定参数,则返回true;否则返回false\n private bool CheckCommandLineParameter(string parameterName)\n {\n // 获取命令行参数数组\n string[] args = Environment.GetCommandLineArgs();\n\n // 遍历所有参数,检查是否有匹配的参数\n foreach (string arg in args)\n {\n // 不区分大小写比较\n if (string.Equals(arg, parameterName, StringComparison.OrdinalIgnoreCase))\n {\n return true;\n }\n }\n\n return false;\n }\n\n private void richTextBox1_DoubleClick(object sender, EventArgs e)\n {\n // 检查是否有日志内容\n if (richTextBox1.TextLength > 0)\n {\n // 显示确认对话框,询问用户是否要清空日志\n DialogResult result = MessageBox.Show(\n \"是否要清空当前日志?\",\n \"清空日志确认\",\n MessageBoxButtons.YesNo,\n MessageBoxIcon.Question,\n MessageBoxDefaultButton.Button2); // 默认选择\"否\"按钮\n\n if (result == DialogResult.Yes)\n {\n // 清空richTextBox1内容\n richTextBox1.Clear();\n // 记录一条清空日志的操作信息\n Log(\"日志已清空\");\n }\n }\n }\n\n private void numericUpDown4_ValueChanged(object sender, EventArgs e)\n {\n if (numericUpDown4.Value > 4096)\n {\n string warningMessage =\n \"⚠️ 测速下限设置提醒 ⚠️\\n\\n\" +\n \"您设置的测速下限值过高,可能导致:\\n\\n\" +\n \"• 可用节点数量显著减少\\n\" +\n \"• 部分低速但稳定的节点被过滤\\n\" +\n \"测速下限设置建议:\\n\" +\n \"• 日常浏览:512-1024 KB/s\\n\" +\n \"• 视频观看:1024-2048 KB/s\\n\" +\n \"• 大文件下载:根据实际需求设置\\n\";\n\n Log(warningMessage);\n }\n }\n\n private void numericUpDown3_ValueChanged(object sender, EventArgs e)\n {\n if (numericUpDown3.Value < 5000)\n {\n string warningMessage =\n \"⚠️ 超时时间设置提醒 ⚠️\\n\\n\" +\n \"该超时时间并非延迟时间,除非您的网络极其优秀,否则超时时间过低会导致无可用节点。\\n\\n\" +\n \"• 超时时间是真连接测试的最大等待时间\\n\" +\n \"• 设置过低会导致大部分节点连接失败\\n\" +\n \"• 推荐设置不低于5000ms\\n\\n\" +\n \"建议超时时间设置:\\n\" +\n \"• 普通网络环境:5000± ms\\n\" +\n \"• 极好网络环境:3000± ms\\n\";\n\n Log(warningMessage);\n }\n\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/MoreYAML.cs", "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Diagnostics;\nusing System.Drawing;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\n\nnamespace subs_check.win.gui\n{\n public partial class MoreYAML : Form\n {\n string 初始化;\n public MoreYAML()\n {\n InitializeComponent();\n\n \n // 移除文本框的等待光标\n textBox1.UseWaitCursor = false;\n 初始化 = textBox1.Text;\n\n // 设置 groupBox1 的 Anchor 属性,使其跟随窗体四边缩放\n groupBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;\n\n // 设置文本框跟随 groupBox1 缩放\n textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;\n\n // 设置 linkLabel1 固定在右上角\n linkLabel1.Anchor = AnchorStyles.Top | AnchorStyles.Right;\n\n // 设置按钮固定在底部\n button1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;\n button3.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;\n button2.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;\n \n // 检查并加载配置文件\n LoadMoreYamlConfig();\n }\n\n /// \n /// 检查并加载 more.yaml 配置文件\n /// \n private void LoadMoreYamlConfig()\n {\n try\n {\n // 获取当前程序的执行路径\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n // 指定config目录路径\n string configFolderPath = System.IO.Path.Combine(executablePath, \"config\");\n // 指定more.yaml文件的完整路径\n string moreYamlFilePath = System.IO.Path.Combine(configFolderPath, \"more.yaml\");\n\n // 检查文件是否存在\n if (System.IO.File.Exists(moreYamlFilePath))\n {\n // 读取文件内容并赋值给textBox1\n string yamlContent = System.IO.File.ReadAllText(moreYamlFilePath, Encoding.UTF8);\n textBox1.Text = yamlContent;\n }\n }\n catch (Exception ex)\n {\n // 读取文件时出错,可以选择是否显示错误信息\n MessageBox.Show($\"读取配置文件时发生错误:{ex.Message}\", \"提示\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n this.Close();\n }\n\n private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/beck-8/subs-check/blob/master/config/config.example.yaml\");\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n try\n {\n // 验证textbox1的内容是否符合YAML格式\n if (!IsValidYaml(textBox1.Text))\n {\n MessageBox.Show(\"输入的内容不符合YAML格式,请检查后重试!\", \"格式错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Warning);\n return;\n }\n\n // 获取当前程序的执行路径\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n // 指定config目录路径\n string configFolderPath = System.IO.Path.Combine(executablePath, \"config\");\n // 指定more.yaml文件的完整路径\n string moreYamlFilePath = System.IO.Path.Combine(configFolderPath, \"more.yaml\");\n\n // 确保config目录存在\n if (!System.IO.Directory.Exists(configFolderPath))\n {\n System.IO.Directory.CreateDirectory(configFolderPath);\n }\n\n // 将textBox1的内容写入more.yaml文件\n System.IO.File.WriteAllText(moreYamlFilePath, textBox1.Text, Encoding.UTF8);\n\n // 设置对话框结果为OK并关闭窗口\n this.DialogResult = DialogResult.OK;\n this.Close();\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"保存配置文件时发生错误:{ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n /// \n /// 验证字符串是否为有效的YAML格式\n /// \n /// 要验证的YAML字符串\n /// 如果是有效的YAML格式,返回true;否则返回false\n private bool IsValidYaml(string yamlContent)\n {\n if (string.IsNullOrWhiteSpace(yamlContent))\n return true; // 空内容被视为有效(可以根据需要更改)\n\n try\n {\n // 使用YamlDotNet尝试解析YAML内容\n var deserializer = new YamlDotNet.Serialization.Deserializer();\n deserializer.Deserialize(yamlContent);\n return true;\n }\n catch (YamlDotNet.Core.YamlException)\n {\n // 捕获YAML解析异常,表示格式无效\n return false;\n }\n catch (Exception)\n {\n // 其他异常也视为格式无效\n return false;\n }\n }\n\n private void button3_Click(object sender, EventArgs e)\n {\n textBox1.Text = 初始化;\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/Form1.Designer.cs", "namespace subs_check.win.gui\n{\n partial class Form1\n {\n /// \n /// 必需的设计器变量。\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// 清理所有正在使用的资源。\n /// \n /// 如果应释放托管资源,为 true;否则为 false。\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows 窗体设计器生成的代码\n\n /// \n /// 设计器支持所需的方法 - 不要修改\n /// 使用代码编辑器修改此方法的内容。\n /// \n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));\n this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.checkBox5 = new System.Windows.Forms.CheckBox();\n this.textBox11 = new System.Windows.Forms.TextBox();\n this.button7 = new System.Windows.Forms.Button();\n this.button6 = new System.Windows.Forms.Button();\n this.comboBox4 = new System.Windows.Forms.ComboBox();\n this.button3 = new System.Windows.Forms.Button();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.numericUpDown4 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown3 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();\n this.label7 = new System.Windows.Forms.Label();\n this.label6 = new System.Windows.Forms.Label();\n this.label3 = new System.Windows.Forms.Label();\n this.label2 = new System.Windows.Forms.Label();\n this.label1 = new System.Windows.Forms.Label();\n this.button2 = new System.Windows.Forms.Button();\n this.button1 = new System.Windows.Forms.Button();\n this.label8 = new System.Windows.Forms.Label();\n this.numericUpDown6 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown5 = new System.Windows.Forms.NumericUpDown();\n this.label4 = new System.Windows.Forms.Label();\n this.label5 = new System.Windows.Forms.Label();\n this.numericUpDown7 = new System.Windows.Forms.NumericUpDown();\n this.label20 = new System.Windows.Forms.Label();\n this.groupBox2 = new System.Windows.Forms.GroupBox();\n this.linkLabel1 = new System.Windows.Forms.LinkLabel();\n this.button5 = new System.Windows.Forms.Button();\n this.richTextBox1 = new System.Windows.Forms.RichTextBox();\n this.groupBox3 = new System.Windows.Forms.GroupBox();\n this.button8 = new System.Windows.Forms.Button();\n this.textBox10 = new System.Windows.Forms.TextBox();\n this.checkBox4 = new System.Windows.Forms.CheckBox();\n this.numericUpDown8 = new System.Windows.Forms.NumericUpDown();\n this.checkBox3 = new System.Windows.Forms.CheckBox();\n this.button4 = new System.Windows.Forms.Button();\n this.checkBox1 = new System.Windows.Forms.CheckBox();\n this.checkBox2 = new System.Windows.Forms.CheckBox();\n this.comboBox5 = new System.Windows.Forms.ComboBox();\n this.label19 = new System.Windows.Forms.Label();\n this.comboBox3 = new System.Windows.Forms.ComboBox();\n this.label10 = new System.Windows.Forms.Label();\n this.comboBox2 = new System.Windows.Forms.ComboBox();\n this.label9 = new System.Windows.Forms.Label();\n this.progressBar1 = new System.Windows.Forms.ProgressBar();\n this.timer2 = new System.Windows.Forms.Timer(this.components);\n this.groupBox4 = new System.Windows.Forms.GroupBox();\n this.textBox4 = new System.Windows.Forms.TextBox();\n this.label13 = new System.Windows.Forms.Label();\n this.textBox3 = new System.Windows.Forms.TextBox();\n this.label12 = new System.Windows.Forms.Label();\n this.textBox2 = new System.Windows.Forms.TextBox();\n this.label11 = new System.Windows.Forms.Label();\n this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);\n this.groupBox5 = new System.Windows.Forms.GroupBox();\n this.textBox6 = new System.Windows.Forms.TextBox();\n this.label15 = new System.Windows.Forms.Label();\n this.textBox7 = new System.Windows.Forms.TextBox();\n this.label16 = new System.Windows.Forms.Label();\n this.groupBox6 = new System.Windows.Forms.GroupBox();\n this.textBox5 = new System.Windows.Forms.TextBox();\n this.label14 = new System.Windows.Forms.Label();\n this.textBox8 = new System.Windows.Forms.TextBox();\n this.label17 = new System.Windows.Forms.Label();\n this.textBox9 = new System.Windows.Forms.TextBox();\n this.label18 = new System.Windows.Forms.Label();\n this.timer3 = new System.Windows.Forms.Timer(this.components);\n this.timer4 = new System.Windows.Forms.Timer(this.components);\n this.groupBox1.SuspendLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown7)).BeginInit();\n this.groupBox2.SuspendLayout();\n this.groupBox3.SuspendLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown8)).BeginInit();\n this.groupBox4.SuspendLayout();\n this.groupBox5.SuspendLayout();\n this.groupBox6.SuspendLayout();\n this.SuspendLayout();\n // \n // notifyIcon1\n // \n this.notifyIcon1.BalloonTipTitle = \"Subs-Check\";\n this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject(\"notifyIcon1.Icon\")));\n this.notifyIcon1.Text = \"Subs-Check:未运行\";\n this.notifyIcon1.Visible = true;\n this.notifyIcon1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon1_MouseClick);\n // \n // timer1\n // \n this.timer1.Enabled = true;\n this.timer1.Interval = 1;\n this.timer1.Tick += new System.EventHandler(this.timer1_Tick);\n // \n // groupBox1\n // \n this.groupBox1.Controls.Add(this.checkBox5);\n this.groupBox1.Controls.Add(this.textBox11);\n this.groupBox1.Controls.Add(this.button7);\n this.groupBox1.Controls.Add(this.button6);\n this.groupBox1.Controls.Add(this.comboBox4);\n this.groupBox1.Controls.Add(this.button3);\n this.groupBox1.Controls.Add(this.textBox1);\n this.groupBox1.Controls.Add(this.comboBox1);\n this.groupBox1.Controls.Add(this.numericUpDown4);\n this.groupBox1.Controls.Add(this.numericUpDown3);\n this.groupBox1.Controls.Add(this.numericUpDown2);\n this.groupBox1.Controls.Add(this.numericUpDown1);\n this.groupBox1.Controls.Add(this.label7);\n this.groupBox1.Controls.Add(this.label6);\n this.groupBox1.Controls.Add(this.label3);\n this.groupBox1.Controls.Add(this.label2);\n this.groupBox1.Controls.Add(this.label1);\n this.groupBox1.Controls.Add(this.button2);\n this.groupBox1.Controls.Add(this.button1);\n this.groupBox1.Controls.Add(this.label8);\n this.groupBox1.Location = new System.Drawing.Point(13, 13);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(174, 484);\n this.groupBox1.TabIndex = 0;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"参数设置\";\n // \n // checkBox5\n // \n this.checkBox5.AutoSize = true;\n this.checkBox5.Location = new System.Drawing.Point(91, 428);\n this.checkBox5.Name = \"checkBox5\";\n this.checkBox5.Size = new System.Drawing.Size(72, 16);\n this.checkBox5.TabIndex = 30;\n this.checkBox5.Text = \"开机自启\";\n this.checkBox5.UseVisualStyleBackColor = true;\n this.checkBox5.CheckedChanged += new System.EventHandler(this.checkBox5_CheckedChanged);\n // \n // textBox11\n // \n this.textBox11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox11.Location = new System.Drawing.Point(9, 343);\n this.textBox11.Name = \"textBox11\";\n this.textBox11.Size = new System.Drawing.Size(154, 21);\n this.textBox11.TabIndex = 21;\n this.textBox11.Text = \"0 */2 * * *\";\n this.textBox11.Visible = false;\n this.textBox11.DoubleClick += new System.EventHandler(this.切换cron表达式);\n this.textBox11.Leave += new System.EventHandler(this.textBox11_Leave);\n // \n // button7\n // \n this.button7.Enabled = false;\n this.button7.Location = new System.Drawing.Point(7, 399);\n this.button7.Name = \"button7\";\n this.button7.Size = new System.Drawing.Size(75, 23);\n this.button7.TabIndex = 30;\n this.button7.Text = \"🔀未启动\";\n this.button7.UseVisualStyleBackColor = true;\n this.button7.Click += new System.EventHandler(this.button7_Click);\n // \n // button6\n // \n this.button6.Enabled = false;\n this.button6.Location = new System.Drawing.Point(88, 399);\n this.button6.Name = \"button6\";\n this.button6.Size = new System.Drawing.Size(75, 23);\n this.button6.TabIndex = 29;\n this.button6.Text = \"访问WebUI\";\n this.button6.UseVisualStyleBackColor = true;\n this.button6.Click += new System.EventHandler(this.button6_Click);\n // \n // comboBox4\n // \n this.comboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\n this.comboBox4.FormattingEnabled = true;\n this.comboBox4.Items.AddRange(new object[] {\n \"通用订阅\",\n \"Clash\"});\n this.comboBox4.Location = new System.Drawing.Point(8, 372);\n this.comboBox4.Name = \"comboBox4\";\n this.comboBox4.Size = new System.Drawing.Size(74, 20);\n this.comboBox4.TabIndex = 19;\n // \n // button3\n // \n this.button3.Enabled = false;\n this.button3.Location = new System.Drawing.Point(88, 370);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 18;\n this.button3.Text = \"复制订阅\";\n this.button3.UseVisualStyleBackColor = true;\n this.button3.Click += new System.EventHandler(this.button3_Click);\n // \n // textBox1\n // \n this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox1.Location = new System.Drawing.Point(9, 179);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ReadOnly = true;\n this.textBox1.Size = new System.Drawing.Size(154, 185);\n this.textBox1.TabIndex = 17;\n this.textBox1.Text = resources.GetString(\"textBox1.Text\");\n this.textBox1.WordWrap = false;\n this.textBox1.Click += new System.EventHandler(this.textBox1_DoubleClick);\n this.textBox1.DoubleClick += new System.EventHandler(this.textBox1_DoubleClick);\n // \n // comboBox1\n // \n this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\n this.comboBox1.FormattingEnabled = true;\n this.comboBox1.Items.AddRange(new object[] {\n \"本地\",\n \"gist\",\n \"r2\",\n \"webdav\"});\n this.comboBox1.Location = new System.Drawing.Point(105, 135);\n this.comboBox1.Name = \"comboBox1\";\n this.comboBox1.Size = new System.Drawing.Size(58, 20);\n this.comboBox1.TabIndex = 16;\n this.comboBox1.TextChanged += new System.EventHandler(this.comboBox1_TextChanged);\n // \n // numericUpDown4\n // \n this.numericUpDown4.Location = new System.Drawing.Point(105, 106);\n this.numericUpDown4.Maximum = new decimal(new int[] {\n 20480,\n 0,\n 0,\n 0});\n this.numericUpDown4.Minimum = new decimal(new int[] {\n 128,\n 0,\n 0,\n 0});\n this.numericUpDown4.Name = \"numericUpDown4\";\n this.numericUpDown4.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown4.TabIndex = 13;\n this.numericUpDown4.Value = new decimal(new int[] {\n 1024,\n 0,\n 0,\n 0});\n this.numericUpDown4.ValueChanged += new System.EventHandler(this.numericUpDown4_ValueChanged);\n // \n // numericUpDown3\n // \n this.numericUpDown3.Location = new System.Drawing.Point(105, 77);\n this.numericUpDown3.Maximum = new decimal(new int[] {\n 10000,\n 0,\n 0,\n 0});\n this.numericUpDown3.Minimum = new decimal(new int[] {\n 1000,\n 0,\n 0,\n 0});\n this.numericUpDown3.Name = \"numericUpDown3\";\n this.numericUpDown3.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown3.TabIndex = 12;\n this.numericUpDown3.Value = new decimal(new int[] {\n 5000,\n 0,\n 0,\n 0});\n this.numericUpDown3.ValueChanged += new System.EventHandler(this.numericUpDown3_ValueChanged);\n // \n // numericUpDown2\n // \n this.numericUpDown2.Location = new System.Drawing.Point(105, 48);\n this.numericUpDown2.Maximum = new decimal(new int[] {\n 1440,\n 0,\n 0,\n 0});\n this.numericUpDown2.Minimum = new decimal(new int[] {\n 30,\n 0,\n 0,\n 0});\n this.numericUpDown2.Name = \"numericUpDown2\";\n this.numericUpDown2.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown2.TabIndex = 11;\n this.numericUpDown2.Value = new decimal(new int[] {\n 120,\n 0,\n 0,\n 0});\n this.numericUpDown2.DoubleClick += new System.EventHandler(this.切换cron表达式);\n // \n // numericUpDown1\n // \n this.numericUpDown1.Location = new System.Drawing.Point(105, 19);\n this.numericUpDown1.Maximum = new decimal(new int[] {\n 1024,\n 0,\n 0,\n 0});\n this.numericUpDown1.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown1.Name = \"numericUpDown1\";\n this.numericUpDown1.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown1.TabIndex = 10;\n this.numericUpDown1.Value = new decimal(new int[] {\n 32,\n 0,\n 0,\n 0});\n this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);\n // \n // label7\n // \n this.label7.AutoSize = true;\n this.label7.Location = new System.Drawing.Point(7, 137);\n this.label7.Name = \"label7\";\n this.label7.Size = new System.Drawing.Size(65, 12);\n this.label7.TabIndex = 8;\n this.label7.Text = \"保存方法:\";\n // \n // label6\n // \n this.label6.AutoSize = true;\n this.label6.Location = new System.Drawing.Point(7, 108);\n this.label6.Name = \"label6\";\n this.label6.Size = new System.Drawing.Size(101, 12);\n this.label6.TabIndex = 5;\n this.label6.Text = \"测速下限(KB/s):\";\n // \n // label3\n // \n this.label3.AutoSize = true;\n this.label3.Location = new System.Drawing.Point(7, 79);\n this.label3.Name = \"label3\";\n this.label3.Size = new System.Drawing.Size(101, 12);\n this.label3.TabIndex = 4;\n this.label3.Text = \"超时时间(毫秒):\";\n // \n // label2\n // \n this.label2.AutoSize = true;\n this.label2.Location = new System.Drawing.Point(7, 50);\n this.label2.Name = \"label2\";\n this.label2.Size = new System.Drawing.Size(101, 12);\n this.label2.TabIndex = 3;\n this.label2.Text = \"检查间隔(分钟):\";\n this.label2.DoubleClick += new System.EventHandler(this.切换cron表达式);\n // \n // label1\n // \n this.label1.AutoSize = true;\n this.label1.Location = new System.Drawing.Point(7, 21);\n this.label1.Name = \"label1\";\n this.label1.Size = new System.Drawing.Size(77, 12);\n this.label1.TabIndex = 2;\n this.label1.Text = \"并发线程数:\";\n // \n // button2\n // \n this.button2.Location = new System.Drawing.Point(88, 450);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 1;\n this.button2.Text = \"高级设置∧\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n // \n // button1\n // \n this.button1.Font = new System.Drawing.Font(\"宋体\", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.button1.Location = new System.Drawing.Point(7, 428);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 45);\n this.button1.TabIndex = 0;\n this.button1.Text = \"▶️ 启动\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // label8\n // \n this.label8.AutoSize = true;\n this.label8.Location = new System.Drawing.Point(7, 164);\n this.label8.Name = \"label8\";\n this.label8.Size = new System.Drawing.Size(161, 12);\n this.label8.TabIndex = 9;\n this.label8.Text = \"节点池订阅链接(点击编辑):\";\n this.label8.Click += new System.EventHandler(this.textBox1_DoubleClick);\n // \n // numericUpDown6\n // \n this.numericUpDown6.Location = new System.Drawing.Point(281, 19);\n this.numericUpDown6.Maximum = new decimal(new int[] {\n 65535,\n 0,\n 0,\n 0});\n this.numericUpDown6.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown6.Name = \"numericUpDown6\";\n this.numericUpDown6.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown6.TabIndex = 15;\n this.numericUpDown6.Value = new decimal(new int[] {\n 8199,\n 0,\n 0,\n 0});\n this.numericUpDown6.ValueChanged += new System.EventHandler(this.numericUpDown6_ValueChanged);\n // \n // numericUpDown5\n // \n this.numericUpDown5.Location = new System.Drawing.Point(281, 45);\n this.numericUpDown5.Maximum = new decimal(new int[] {\n 10,\n 0,\n 0,\n 0});\n this.numericUpDown5.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown5.Name = \"numericUpDown5\";\n this.numericUpDown5.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown5.TabIndex = 14;\n this.numericUpDown5.Value = new decimal(new int[] {\n 10,\n 0,\n 0,\n 0});\n // \n // label4\n // \n this.label4.AutoSize = true;\n this.label4.Location = new System.Drawing.Point(191, 21);\n this.label4.Name = \"label4\";\n this.label4.Size = new System.Drawing.Size(89, 12);\n this.label4.TabIndex = 7;\n this.label4.Text = \"HTTP服务端口:\";\n // \n // label5\n // \n this.label5.AutoSize = true;\n this.label5.Location = new System.Drawing.Point(191, 48);\n this.label5.Name = \"label5\";\n this.label5.Size = new System.Drawing.Size(89, 12);\n this.label5.TabIndex = 6;\n this.label5.Text = \"测速时间(秒):\";\n // \n // numericUpDown7\n // \n this.numericUpDown7.Location = new System.Drawing.Point(441, 19);\n this.numericUpDown7.Maximum = new decimal(new int[] {\n 65535,\n 0,\n 0,\n 0});\n this.numericUpDown7.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown7.Name = \"numericUpDown7\";\n this.numericUpDown7.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown7.TabIndex = 21;\n this.numericUpDown7.Value = new decimal(new int[] {\n 8299,\n 0,\n 0,\n 0});\n this.numericUpDown7.ValueChanged += new System.EventHandler(this.numericUpDown6_ValueChanged);\n // \n // label20\n // \n this.label20.AutoSize = true;\n this.label20.Location = new System.Drawing.Point(345, 21);\n this.label20.Name = \"label20\";\n this.label20.Size = new System.Drawing.Size(95, 12);\n this.label20.TabIndex = 20;\n this.label20.Text = \"Sub-Store端口:\";\n // \n // groupBox2\n // \n this.groupBox2.Controls.Add(this.linkLabel1);\n this.groupBox2.Controls.Add(this.button5);\n this.groupBox2.Controls.Add(this.richTextBox1);\n this.groupBox2.Location = new System.Drawing.Point(193, 13);\n this.groupBox2.Name = \"groupBox2\";\n this.groupBox2.Size = new System.Drawing.Size(600, 484);\n this.groupBox2.TabIndex = 1;\n this.groupBox2.TabStop = false;\n this.groupBox2.Text = \"实时日志\";\n // \n // linkLabel1\n // \n this.linkLabel1.AutoSize = true;\n this.linkLabel1.Location = new System.Drawing.Point(460, 2);\n this.linkLabel1.Name = \"linkLabel1\";\n this.linkLabel1.Size = new System.Drawing.Size(137, 12);\n this.linkLabel1.TabIndex = 21;\n this.linkLabel1.TabStop = true;\n this.linkLabel1.Text = \"关于 SubsCheck Win GUI\";\n this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);\n // \n // button5\n // \n this.button5.Location = new System.Drawing.Point(515, 450);\n this.button5.Name = \"button5\";\n this.button5.Size = new System.Drawing.Size(75, 23);\n this.button5.TabIndex = 20;\n this.button5.Text = \"更新内核\";\n this.button5.UseVisualStyleBackColor = true;\n this.button5.Visible = false;\n this.button5.Click += new System.EventHandler(this.button5_Click);\n // \n // richTextBox1\n // \n this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;\n this.richTextBox1.Location = new System.Drawing.Point(3, 17);\n this.richTextBox1.Name = \"richTextBox1\";\n this.richTextBox1.ReadOnly = true;\n this.richTextBox1.Size = new System.Drawing.Size(594, 464);\n this.richTextBox1.TabIndex = 0;\n this.richTextBox1.Text = \"\";\n this.richTextBox1.DoubleClick += new System.EventHandler(this.richTextBox1_DoubleClick);\n // \n // groupBox3\n // \n this.groupBox3.Controls.Add(this.button8);\n this.groupBox3.Controls.Add(this.textBox10);\n this.groupBox3.Controls.Add(this.checkBox4);\n this.groupBox3.Controls.Add(this.numericUpDown8);\n this.groupBox3.Controls.Add(this.checkBox3);\n this.groupBox3.Controls.Add(this.button4);\n this.groupBox3.Controls.Add(this.checkBox1);\n this.groupBox3.Controls.Add(this.numericUpDown6);\n this.groupBox3.Controls.Add(this.checkBox2);\n this.groupBox3.Controls.Add(this.numericUpDown5);\n this.groupBox3.Controls.Add(this.comboBox5);\n this.groupBox3.Controls.Add(this.label19);\n this.groupBox3.Controls.Add(this.comboBox3);\n this.groupBox3.Controls.Add(this.label10);\n this.groupBox3.Controls.Add(this.label4);\n this.groupBox3.Controls.Add(this.comboBox2);\n this.groupBox3.Controls.Add(this.label9);\n this.groupBox3.Controls.Add(this.label5);\n this.groupBox3.Controls.Add(this.numericUpDown7);\n this.groupBox3.Controls.Add(this.label20);\n this.groupBox3.Location = new System.Drawing.Point(13, 503);\n this.groupBox3.Name = \"groupBox3\";\n this.groupBox3.Size = new System.Drawing.Size(780, 103);\n this.groupBox3.TabIndex = 2;\n this.groupBox3.TabStop = false;\n this.groupBox3.Text = \"高级设置\";\n this.groupBox3.Visible = false;\n // \n // button8\n // \n this.button8.Location = new System.Drawing.Point(695, 43);\n this.button8.Name = \"button8\";\n this.button8.Size = new System.Drawing.Size(75, 23);\n this.button8.TabIndex = 29;\n this.button8.Text = \"补充参数\";\n this.button8.UseVisualStyleBackColor = true;\n this.button8.Click += new System.EventHandler(this.button8_Click);\n // \n // textBox10\n // \n this.textBox10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox10.Enabled = false;\n this.textBox10.Location = new System.Drawing.Point(141, 73);\n this.textBox10.Name = \"textBox10\";\n this.textBox10.PasswordChar = '*';\n this.textBox10.Size = new System.Drawing.Size(110, 21);\n this.textBox10.TabIndex = 6;\n this.textBox10.Text = \"admin\";\n this.textBox10.Enter += new System.EventHandler(this.textBox10_Enter);\n this.textBox10.Leave += new System.EventHandler(this.textBox10_Leave);\n // \n // checkBox4\n // \n this.checkBox4.AutoSize = true;\n this.checkBox4.Location = new System.Drawing.Point(9, 75);\n this.checkBox4.Name = \"checkBox4\";\n this.checkBox4.Size = new System.Drawing.Size(138, 16);\n this.checkBox4.TabIndex = 28;\n this.checkBox4.Text = \"启用WebUI API密钥:\";\n this.checkBox4.UseVisualStyleBackColor = true;\n this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox4_CheckedChanged);\n // \n // numericUpDown8\n // \n this.numericUpDown8.Enabled = false;\n this.numericUpDown8.Location = new System.Drawing.Point(122, 45);\n this.numericUpDown8.Maximum = new decimal(new int[] {\n 65535,\n 0,\n 0,\n 0});\n this.numericUpDown8.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown8.Name = \"numericUpDown8\";\n this.numericUpDown8.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown8.TabIndex = 22;\n this.numericUpDown8.Value = new decimal(new int[] {\n 100,\n 0,\n 0,\n 0});\n // \n // checkBox3\n // \n this.checkBox3.AutoSize = true;\n this.checkBox3.Location = new System.Drawing.Point(9, 48);\n this.checkBox3.Name = \"checkBox3\";\n this.checkBox3.Size = new System.Drawing.Size(108, 16);\n this.checkBox3.TabIndex = 27;\n this.checkBox3.Text = \"节点保存数目:\";\n this.checkBox3.UseVisualStyleBackColor = true;\n this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged);\n // \n // button4\n // \n this.button4.Location = new System.Drawing.Point(695, 71);\n this.button4.Name = \"button4\";\n this.button4.Size = new System.Drawing.Size(75, 23);\n this.button4.TabIndex = 26;\n this.button4.Text = \"检查更新\";\n this.button4.UseVisualStyleBackColor = true;\n this.button4.Click += new System.EventHandler(this.button4_Click);\n // \n // checkBox1\n // \n this.checkBox1.AutoSize = true;\n this.checkBox1.Checked = true;\n this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;\n this.checkBox1.Location = new System.Drawing.Point(9, 20);\n this.checkBox1.Name = \"checkBox1\";\n this.checkBox1.Size = new System.Drawing.Size(96, 16);\n this.checkBox1.TabIndex = 22;\n this.checkBox1.Text = \"节点地址查询\";\n this.checkBox1.UseVisualStyleBackColor = true;\n this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);\n // \n // checkBox2\n // \n this.checkBox2.AutoSize = true;\n this.checkBox2.Location = new System.Drawing.Point(106, 20);\n this.checkBox2.Name = \"checkBox2\";\n this.checkBox2.Size = new System.Drawing.Size(84, 16);\n this.checkBox2.TabIndex = 25;\n this.checkBox2.Text = \"流媒体检测\";\n this.checkBox2.UseVisualStyleBackColor = true;\n this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);\n // \n // comboBox5\n // \n this.comboBox5.FormattingEnabled = true;\n this.comboBox5.Items.AddRange(new object[] {\n \"[内置]布丁狗的订阅转换\",\n \"[内置]ACL4SSR_Online_Full\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/布丁狗的订阅转\" +\n \"换.yaml\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/ACL4SSR\" +\n \"_Online_Full.yaml\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/ACL4SSR\" +\n \"_Online_Full_WithIcon.yaml\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/添加直连规则.\" +\n \"yaml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/布丁狗的订阅转换.y\" +\n \"aml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/ACL4SSR_On\" +\n \"line_Full.yaml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/ACL4SSR_On\" +\n \"line_Full_WithIcon.yaml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/添加直连规则.yam\" +\n \"l\"});\n this.comboBox5.Location = new System.Drawing.Point(414, 73);\n this.comboBox5.Name = \"comboBox5\";\n this.comboBox5.Size = new System.Drawing.Size(275, 20);\n this.comboBox5.TabIndex = 24;\n this.comboBox5.SelectedIndexChanged += new System.EventHandler(this.comboBox5_SelectedIndexChanged);\n // \n // label19\n // \n this.label19.AutoSize = true;\n this.label19.Location = new System.Drawing.Point(260, 76);\n this.label19.Name = \"label19\";\n this.label19.Size = new System.Drawing.Size(149, 12);\n this.label19.TabIndex = 23;\n this.label19.Text = \"Clash订阅 覆写配置文件:\";\n // \n // comboBox3\n // \n this.comboBox3.FormattingEnabled = true;\n this.comboBox3.Items.AddRange(new object[] {\n \"自动选择\",\n \"1.github.010716.xyz\",\n \"113355.kabaka.xyz\",\n \"80888888.xyz\",\n \"aa.w0x7ce.eu\",\n \"acc.meiqer.com\",\n \"api-ghp.fjy.zone\",\n \"armg1.jyhk.tk\",\n \"armg2.jyhk.tk\",\n \"b.yesican.top\",\n \"bakht1.jsdelivr.fyi\",\n \"bakht2.jsdelivr.fyi\",\n \"bakht3.jsdelivr.fyi\",\n \"booster.ookkk.ggff.net\",\n \"c.gatepro.cn\",\n \"cc.ikakatoo.us\",\n \"ccgit1.5gyh.cf\",\n \"ccgit2.5gyh.cf\",\n \"cdn-gh.141888.xyz\",\n \"cfghproxy.165683.xyz\",\n \"chirophy.online\",\n \"choner.eu.org\",\n \"d.scyun.top\",\n \"daili.6dot.cn\",\n \"dh.guluy.top\",\n \"dh.jeblove.com\",\n \"dl.github.mirror.shalo.link\",\n \"dnsvip.uk\",\n \"docker.bkxhkoo.com\",\n \"docker.ppp.ac.cn\",\n \"down.avi.gs\",\n \"download.ojbk.one\",\n \"download.serein.cc\",\n \"f.shenbing.nyc.mn\",\n \"fastgithub.starryfun.icu\",\n \"file.justgame.top\",\n \"ft.v1k1.xin\",\n \"fuck-flow.nobige.cn\",\n \"g.108964.xyz\",\n \"g.blfrp.cn\",\n \"g.bravexist.cn\",\n \"g.down.0ms.net\",\n \"g.jscdn.cn\",\n \"g.yeyuqiufeng.cn\",\n \"gh.136361.xyz\",\n \"gh.13x.plus\",\n \"gh.19121912.xyz\",\n \"gh.193.gs\",\n \"gh.220106.xyz\",\n \"gh.222322.xyz\",\n \"gh.244224659.xyz\",\n \"gh.2i.gs\",\n \"gh.316688.xyz\",\n \"gh.321122.xyz\",\n \"gh.334433.xyz\",\n \"gh.39.al\",\n \"gh.518298.xyz\",\n \"gh.52099520.xyz\",\n \"gh.654535.xyz\",\n \"gh.777000.best\",\n \"gh.799154.xyz\",\n \"gh.860686.xyz\",\n \"gh.8p.gs\",\n \"gh.960980.xyz\",\n \"gh.accn.eu.org\",\n \"gh.amirrors.com\",\n \"gh.andiest.com\",\n \"gh.aurzex.top\",\n \"gh.avmine.com\",\n \"gh.b52m.cn\",\n \"gh.bhexo.cn\",\n \"gh.cdn.fullcone.cn\",\n \"gh.chewable.eu.org\",\n \"gh.chillwaytech.com\",\n \"gh.cnbattle.com\",\n \"gh.crond.dev\",\n \"gh.dev.438250.xyz\",\n \"gh.duang.io\",\n \"gh.duckcc.com\",\n \"gh.dwsy.link\",\n \"gh.ecdn.ip-ddns.com\",\n \"gh.flewsea.news\",\n \"gh.flewsea.pw\",\n \"gh.flyrr.cc\",\n \"gh.gongyi.tk\",\n \"gh.gorun.eu.org\",\n \"gh.gxb.pub\",\n \"gh.haloless.com\",\n \"gh.heshiheng.top\",\n \"gh.hitcs.cc\",\n \"gh.i3.pw\",\n \"gh.ibridge.eu.org\",\n \"gh.iinx.top\",\n \"gh.j8.work\",\n \"gh.jadelive.top\",\n \"gh.jscdn.cn\",\n \"gh.jxq.io\",\n \"gh.kejilion.pro\",\n \"gh.kemon.ai\",\n \"gh.kmxm.online\",\n \"gh.lib.cx\",\n \"gh.lkwplus.com\",\n \"gh.lux1983.com\",\n \"gh.luzy.top\",\n \"gh.lyh.moe\",\n \"gh.miaomiao.video\",\n \"gh.micedns.cloudns.org\",\n \"gh.mirror.190211.xyz\",\n \"gh.mirror.coolfeature.top\",\n \"gh.moetools.net\",\n \"gh.momonomi.xyz\",\n \"gh.mrskye.cn\",\n \"gh.mtx72.cc\",\n \"gh.nekhill.top\",\n \"gh.nekorect.eu.org\",\n \"gh.nextfuture.top\",\n \"gh.oevery.me\",\n \"gh.oneproxy.top\",\n \"gh.opsproxy.com\",\n \"gh.osspub.cn\",\n \"gh.padao.fun\",\n \"gh.prlrr.com\",\n \"gh.pylas.xyz\",\n \"gh.qptf.eu.org\",\n \"gh.qsd.onl\",\n \"gh.qsq.one\",\n \"gh.rem.asia\",\n \"gh.riye.de\",\n \"gh.scy.ink\",\n \"gh.someo.top\",\n \"gh.stanl.ee\",\n \"gh.stewitch.com\",\n \"gh.suite.eu.org\",\n \"gh.tbw.wiki\",\n \"gh.tou.lu\",\n \"gh.tryxd.cn\",\n \"gh.uclort.com\",\n \"gh.wglee.org\",\n \"gh.wowforever.xyz\",\n \"gh.wuuu.cc\",\n \"gh.wwang.de\",\n \"gh.wygg.us.kg\",\n \"gh.xbzza.cn\",\n \"gh.xda.plus\",\n \"gh.yahool.com.cn\",\n \"gh.yushum.com\",\n \"ghac.760710.xyz\",\n \"ghacc.cpuhk.eu.org\",\n \"ghb.wglee.org\",\n \"gh-boost.oneboy.app\",\n \"gh-deno.mocn.top\",\n \"ghfast.top\",\n \"ghjs.131412.eu.org\",\n \"ghp.618032.xyz\",\n \"ghp.9e6.site\",\n \"ghp.dnsplus.uk\",\n \"ghp.fit2.fun\",\n \"ghp.imc.re\",\n \"ghp.jokeme.top\",\n \"ghp.lanchonghai.com\",\n \"ghp.miaostay.com\",\n \"ghp.opendatahub.xyz\",\n \"ghp.pbren.com\",\n \"ghp.src.moe\",\n \"ghp.tryanks.com\",\n \"ghp.vatery.com\",\n \"ghp.xiaopan.ai\",\n \"ghp.ybot.xin\",\n \"ghp.yeye.f5.si\",\n \"ghproxy.0081024.xyz\",\n \"ghproxy.053000.xyz\",\n \"ghproxy.200502.xyz\",\n \"ghproxy.943689.xyz\",\n \"ghproxy.alltobid.cc\",\n \"ghproxy.amayakite.xyz\",\n \"ghproxy.bugungu.top\",\n \"gh-proxy.dorz.tech\",\n \"ghproxy.dsdog.tk\",\n \"ghproxy.ducknet.work\",\n \"ghproxy.gopher.ink\",\n \"ghproxy.gpnu.org\",\n \"ghproxy.hoshizukimio.top\",\n \"gh-proxy.iflyelf.com\",\n \"ghproxy.imoyuapp.win\",\n \"gh-proxy.jacksixth.top\",\n \"gh-proxy.jmper.me\",\n \"ghproxy.joylian.com\",\n \"gh-proxy.just520.top\",\n \"ghproxy.licardo.vip\",\n \"gh-proxy.mereith.com\",\n \"ghproxy.minge.dev\",\n \"ghproxy.missfuture.eu.org\",\n \"ghproxy.moweilong.com\",\n \"ghproxy.nanakorobi.com\",\n \"ghproxy.net\",\n \"gh-proxy.not.icu\",\n \"ghproxy.ownyuan.top\",\n \"gh-proxy.rxliuli.com\",\n \"ghproxy.sakuramoe.dev\",\n \"ghproxy.smallfawn.work\",\n \"ghproxy.sveir.xyz\",\n \"ghproxy.temoa.fun\",\n \"ghproxy.thefoxnet.com\",\n \"ghproxy.tracemouse.top\",\n \"ghproxy.txq.life\",\n \"ghproxy.viper.pub\",\n \"ghproxy.vyronlee-lab.com\",\n \"ghproxy.weizhiwen.net\",\n \"ghproxy.wjsphy.top\",\n \"ghproxy.workers.haoutil.com\",\n \"ghproxy.xiaohei-studio-chatgpt-proxy.com.cn\",\n \"gh-proxy.yuntao.me\",\n \"git.1999111.xyz\",\n \"git.22345678.xyz\",\n \"git.40609891.xyz\",\n \"git.5gyh.cf\",\n \"git.988896.xyz\",\n \"git.aaltozz.info\",\n \"git.acap.cc\",\n \"git.amoluo.win\",\n \"git.anye.in\",\n \"git.binbow.link\",\n \"git.blaow.cloudns.org\",\n \"git.closersyu.top\",\n \"git.ifso.site\",\n \"git.imvery.moe\",\n \"git.ixdd.de\",\n \"git.ldvx.de\",\n \"git.lincloud.pro\",\n \"git.liunasc.xyz\",\n \"git.llvho.com\",\n \"git.loushi.site\",\n \"git.lzzz.ink\",\n \"git.maomao.ovh\",\n \"git.mokoc.live\",\n \"git.niege.app\",\n \"git.nyar.work\",\n \"git.o8.cx\",\n \"git.outtw.com\",\n \"git.ppp.ac.cn\",\n \"git.repcz.link\",\n \"git.txaff.com\",\n \"git.verynb.org\",\n \"git.wsl.icu\",\n \"git.wyy.sh\",\n \"git.xiny.eu.org\",\n \"git.xuantan.icu\",\n \"git.zlong.eu.org\",\n \"git3.openapi.site\",\n \"git-clone.ccrui.dev\",\n \"github.08050611.xyz\",\n \"github.143760.xyz\",\n \"github.170011.xyz\",\n \"github.17263241.xyz\",\n \"github.180280.xyz\",\n \"github.197909.xyz\",\n \"github.19890821.xyz\",\n \"github.201068.xyz\",\n \"github.333033.xyz\",\n \"github.4240333.xyz\",\n \"github.564456.xyz\",\n \"github.732086.xyz\",\n \"github.776884.xyz\",\n \"github.789056.xyz\",\n \"github.818668.xyz\",\n \"github.8void.sbs\",\n \"github.9394961.xyz\",\n \"github.960118.xyz\",\n \"github.abyss.moe\",\n \"github.atzzz.com\",\n \"github.axcio.dns-dynamic.net\",\n \"github.boki.moe\",\n \"github.boringhex.top\",\n \"github.bullb.net\",\n \"github.c1g.top\",\n \"github.cf.xihale.top\",\n \"github.chasun.top\",\n \"github.chuancey.eu.org\",\n \"github.cnxiaobai.com\",\n \"github.computerqwq.top\",\n \"github.cswklt.top\",\n \"github.ctios.cn\",\n \"github.ddlink.asia\",\n \"github.dockerspeed.site\",\n \"github.eejsq.net\",\n \"github.ffffffff0x.com\",\n \"github.gdzja.site\",\n \"github.haodiy.xyz\",\n \"github.hhh.sd\",\n \"github.hi.edu.rs\",\n \"github.hostscc.top\",\n \"github.hx208.top\",\n \"github.ilxyz.xyz\",\n \"github.intellisensing.tech\",\n \"github.jerryliang.win\",\n \"github.jimmyshjj.top\",\n \"github.jinenyy.vip\",\n \"github.jscdn.cn\",\n \"github.kidos.top\",\n \"github.kuugo.top\",\n \"github.lao.plus\",\n \"github.mayx.eu.org\",\n \"github.mirror.qlnu-sec.cn\",\n \"github.mirror.vurl.eu.org\",\n \"github.mirrors.hikafeng.com\",\n \"github.mistudio.top\",\n \"github.orangbus.cn\",\n \"github.pipers.cn\",\n \"github.proxy.zerozone.tech\",\n \"github.pxy.lnsee.com\",\n \"github.quickso.net\",\n \"github.ruxi.org\",\n \"github.sagolu.top\",\n \"github.serein.cc\",\n \"github.snakexgc.com\",\n \"github.space520.eu.org\",\n \"github.sssss.work\",\n \"github.static.cv\",\n \"github.suyijun.top\",\n \"github.try255.com\",\n \"github.unipus.site\",\n \"github.verynb.org\",\n \"github.vipchanel.com\",\n \"github.widiazine.top\",\n \"github.workers.lv10.ren\",\n \"github.workersnail.com\",\n \"github.xin-yu.cloud\",\n \"github.xiongmx.com\",\n \"github.xwb009.xyz\",\n \"github.xxlab.tech\",\n \"github.xxqq.de\",\n \"github.xykcloud.com\",\n \"github.yeep6.eu.org\",\n \"github.ylyhtools.top\",\n \"github.yoloarea.com\",\n \"github.yunfile.fun\",\n \"github.zhaolele.top\",\n \"github.zhou2008.cn\",\n \"github.zhulin240520.buzz\",\n \"github.zyhmifan.top\",\n \"githubacc.caiaiwan.com\",\n \"githubapi.jjchizha.com\",\n \"githubgo.856798.xyz\",\n \"github-proxy.ai-lulu.top\",\n \"github-proxy.caoayu.top\",\n \"github-proxy.explorexd.uk\",\n \"github-proxy.fjiabinc.cn\",\n \"github-proxy.sharefree.site\",\n \"githubproxy.unix.do\",\n \"github-quick.1ms.dev\",\n \"github-raw-download.nekhill.top\",\n \"githubsg.lilyya.top\",\n \"gitproxy.mrhjx.cn\",\n \"gitproxy.ozoo.top\",\n \"godlike.ezpull.top\",\n \"gp.19841106.xyz\",\n \"gp.dahe.now.cc\",\n \"gp.daxei.now.cc\",\n \"g-p.loli.us\",\n \"gp.ownorigin.top\",\n \"gt.changqqq.xyz\",\n \"gxb.pub\",\n \"hay.uxio.cn\",\n \"hg.19840228.top\",\n \"hh.newhappy.cf\",\n \"hk.114914.xyz\",\n \"hub.12138.3653655.xyz\",\n \"hub.326998.xyz\",\n \"hub.885666.xyz\",\n \"hub.fnas64.xin\",\n \"hub.jeblove.com\",\n \"hub.naloong.de\",\n \"hub.vps.861020.xyz\",\n \"hub.vvn.me\",\n \"hub.why-ing.top\",\n \"hub.xjl.ch\",\n \"jh.ussh.net\",\n \"jias.ayanjiu.top\",\n \"jiasu.iwtriptqt1016.eu.org\",\n \"jiasughapi.lingjun.cc\",\n \"jiasuqi.167889.xyz\",\n \"jisuan.xyz\",\n \"js.wd666.cloudns.biz\",\n \"l0l0l.cc\",\n \"m.seafood.loan\",\n \"mc.cn.eu.org\",\n \"mdv.162899.xyz\",\n \"micromatrix.gq\",\n \"mip.cnzzla.com\",\n \"my.iiso.site\",\n \"my.losesw.live\",\n \"mygh.api.xiaomao.eu.org\",\n \"nav.253874.net\",\n \"nav.cxycsx.vip\",\n \"nav.gjcloak.xyz\",\n \"nav.hgd1999.com\",\n \"nav.hoiho.cn\",\n \"nav.syss.fun\",\n \"nav.tossp.com\",\n \"nav.wxapp.xyz\",\n \"nav.yyxw.tk\",\n \"navs.itmax.cn\",\n \"neoz.chat\",\n \"noad.keliyan.top\",\n \"node2.txq.life\",\n \"or.tianba.eu.org\",\n \"p.jackyu.cn\",\n \"privateghproxy.iil.im\",\n \"proxy.191027.xyz\",\n \"proxy.atoposs.com\",\n \"proxy.ccc8.vip\",\n \"proxy.dragontea.cc\",\n \"proxy.fakups.cn\",\n \"proxydl.lcayun.cn\",\n \"proxy-gh.1l1.icu\",\n \"q-github.cnxiaobai.com\",\n \"ql.l50.top\",\n \"raw.nmd.im\",\n \"rst.567812.xyz\",\n \"static.kaixinwu.vip\",\n \"static.yiwangmeng.com\",\n \"t.992699.xyz\",\n \"tpe.corpa.me\",\n \"tube.20140301.xyz\",\n \"vps.pansen626.com\",\n \"wfgithub.xiaonuomi.ie.eu.org\"});\n this.comboBox3.Location = new System.Drawing.Point(600, 19);\n this.comboBox3.Name = \"comboBox3\";\n this.comboBox3.Size = new System.Drawing.Size(170, 20);\n this.comboBox3.TabIndex = 21;\n this.comboBox3.Leave += new System.EventHandler(this.comboBox3_Leave);\n // \n // label10\n // \n this.label10.AutoSize = true;\n this.label10.Location = new System.Drawing.Point(505, 21);\n this.label10.Name = \"label10\";\n this.label10.Size = new System.Drawing.Size(89, 12);\n this.label10.TabIndex = 20;\n this.label10.Text = \"Github Proxy:\";\n // \n // comboBox2\n // \n this.comboBox2.FormattingEnabled = true;\n this.comboBox2.Items.AddRange(new object[] {\n \"https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases/download/v2.21.12/\" +\n \"Waifu2x-Extension-GUI-v2.21.12-Portable.7z\",\n \"https://github.com/2dust/v2rayN/releases/download/7.10.4/v2rayN-windows-64-deskto\" +\n \"p.zip\",\n \"https://github.com/VSCodium/vscodium/releases/download/1.98.0.25067/codium-1.98.0\" +\n \".25067-el9.aarch64.rpm\"});\n this.comboBox2.Location = new System.Drawing.Point(414, 45);\n this.comboBox2.Name = \"comboBox2\";\n this.comboBox2.Size = new System.Drawing.Size(275, 20);\n this.comboBox2.TabIndex = 19;\n this.comboBox2.Text = \"https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases/download/v2.21.12/\" +\n \"Waifu2x-Extension-GUI-v2.21.12-Portable.7z\";\n // \n // label9\n // \n this.label9.AutoSize = true;\n this.label9.Location = new System.Drawing.Point(344, 48);\n this.label9.Name = \"label9\";\n this.label9.Size = new System.Drawing.Size(65, 12);\n this.label9.TabIndex = 18;\n this.label9.Text = \"测速地址:\";\n // \n // progressBar1\n // \n this.progressBar1.Location = new System.Drawing.Point(13, 3);\n this.progressBar1.Name = \"progressBar1\";\n this.progressBar1.Size = new System.Drawing.Size(780, 3);\n this.progressBar1.TabIndex = 3;\n // \n // timer2\n // \n this.timer2.Interval = 2000;\n this.timer2.Tick += new System.EventHandler(this.timer2_Tick);\n // \n // groupBox4\n // \n this.groupBox4.Controls.Add(this.textBox4);\n this.groupBox4.Controls.Add(this.label13);\n this.groupBox4.Controls.Add(this.textBox3);\n this.groupBox4.Controls.Add(this.label12);\n this.groupBox4.Controls.Add(this.textBox2);\n this.groupBox4.Controls.Add(this.label11);\n this.groupBox4.Location = new System.Drawing.Point(13, 612);\n this.groupBox4.Name = \"groupBox4\";\n this.groupBox4.Size = new System.Drawing.Size(780, 51);\n this.groupBox4.TabIndex = 4;\n this.groupBox4.TabStop = false;\n this.groupBox4.Text = \"Gist 上传参数\";\n this.groupBox4.Visible = false;\n // \n // textBox4\n // \n this.textBox4.Location = new System.Drawing.Point(467, 18);\n this.textBox4.Name = \"textBox4\";\n this.textBox4.Size = new System.Drawing.Size(306, 21);\n this.textBox4.TabIndex = 5;\n // \n // label13\n // \n this.label13.AutoSize = true;\n this.label13.Location = new System.Drawing.Point(359, 21);\n this.label13.Name = \"label13\";\n this.label13.Size = new System.Drawing.Size(113, 12);\n this.label13.TabIndex = 4;\n this.label13.Text = \"API Mirror(可选):\";\n // \n // textBox3\n // \n this.textBox3.Location = new System.Drawing.Point(253, 18);\n this.textBox3.Name = \"textBox3\";\n this.textBox3.PasswordChar = '*';\n this.textBox3.Size = new System.Drawing.Size(100, 21);\n this.textBox3.TabIndex = 3;\n this.textBox3.Enter += new System.EventHandler(this.textBox3_Enter);\n this.textBox3.Leave += new System.EventHandler(this.textBox3_Leave);\n // \n // label12\n // \n this.label12.AutoSize = true;\n this.label12.Location = new System.Drawing.Point(168, 21);\n this.label12.Name = \"label12\";\n this.label12.Size = new System.Drawing.Size(89, 12);\n this.label12.TabIndex = 2;\n this.label12.Text = \"Github Token:\";\n // \n // textBox2\n // \n this.textBox2.Location = new System.Drawing.Point(62, 18);\n this.textBox2.Name = \"textBox2\";\n this.textBox2.Size = new System.Drawing.Size(100, 21);\n this.textBox2.TabIndex = 1;\n // \n // label11\n // \n this.label11.AutoSize = true;\n this.label11.Location = new System.Drawing.Point(7, 21);\n this.label11.Name = \"label11\";\n this.label11.Size = new System.Drawing.Size(59, 12);\n this.label11.TabIndex = 0;\n this.label11.Text = \"Gist ID:\";\n // \n // toolTip1\n // \n this.toolTip1.AutoPopDelay = 5000;\n this.toolTip1.InitialDelay = 500;\n this.toolTip1.ReshowDelay = 500;\n this.toolTip1.ShowAlways = true;\n // \n // groupBox5\n // \n this.groupBox5.Controls.Add(this.textBox6);\n this.groupBox5.Controls.Add(this.label15);\n this.groupBox5.Controls.Add(this.textBox7);\n this.groupBox5.Controls.Add(this.label16);\n this.groupBox5.Location = new System.Drawing.Point(13, 669);\n this.groupBox5.Name = \"groupBox5\";\n this.groupBox5.Size = new System.Drawing.Size(780, 51);\n this.groupBox5.TabIndex = 6;\n this.groupBox5.TabStop = false;\n this.groupBox5.Text = \"R2 上传参数\";\n this.groupBox5.Visible = false;\n // \n // textBox6\n // \n this.textBox6.Location = new System.Drawing.Point(467, 18);\n this.textBox6.Name = \"textBox6\";\n this.textBox6.PasswordChar = '*';\n this.textBox6.Size = new System.Drawing.Size(306, 21);\n this.textBox6.TabIndex = 3;\n this.textBox6.Text = \"1234567890\";\n this.textBox6.Enter += new System.EventHandler(this.textBox3_Enter);\n this.textBox6.Leave += new System.EventHandler(this.textBox3_Leave);\n // \n // label15\n // \n this.label15.AutoSize = true;\n this.label15.Location = new System.Drawing.Point(382, 21);\n this.label15.Name = \"label15\";\n this.label15.Size = new System.Drawing.Size(89, 12);\n this.label15.TabIndex = 2;\n this.label15.Text = \"Worker Token:\";\n // \n // textBox7\n // \n this.textBox7.Location = new System.Drawing.Point(88, 18);\n this.textBox7.Name = \"textBox7\";\n this.textBox7.Size = new System.Drawing.Size(285, 21);\n this.textBox7.TabIndex = 1;\n this.textBox7.Text = \"https://example.worker.dev\";\n this.textBox7.Leave += new System.EventHandler(this.textBox7_Leave);\n // \n // label16\n // \n this.label16.AutoSize = true;\n this.label16.Location = new System.Drawing.Point(7, 21);\n this.label16.Name = \"label16\";\n this.label16.Size = new System.Drawing.Size(77, 12);\n this.label16.TabIndex = 0;\n this.label16.Text = \"Worker URL:\";\n // \n // groupBox6\n // \n this.groupBox6.Controls.Add(this.textBox5);\n this.groupBox6.Controls.Add(this.label14);\n this.groupBox6.Controls.Add(this.textBox8);\n this.groupBox6.Controls.Add(this.label17);\n this.groupBox6.Controls.Add(this.textBox9);\n this.groupBox6.Controls.Add(this.label18);\n this.groupBox6.Location = new System.Drawing.Point(13, 726);\n this.groupBox6.Name = \"groupBox6\";\n this.groupBox6.Size = new System.Drawing.Size(780, 51);\n this.groupBox6.TabIndex = 6;\n this.groupBox6.TabStop = false;\n this.groupBox6.Text = \"Webdav 上传参数\";\n this.groupBox6.Visible = false;\n // \n // textBox5\n // \n this.textBox5.Location = new System.Drawing.Point(467, 18);\n this.textBox5.Name = \"textBox5\";\n this.textBox5.Size = new System.Drawing.Size(306, 21);\n this.textBox5.TabIndex = 5;\n this.textBox5.Text = \"https://example.com/dav/\";\n // \n // label14\n // \n this.label14.AutoSize = true;\n this.label14.Location = new System.Drawing.Point(382, 21);\n this.label14.Name = \"label14\";\n this.label14.Size = new System.Drawing.Size(77, 12);\n this.label14.TabIndex = 4;\n this.label14.Text = \"Webdav URL:\";\n // \n // textBox8\n // \n this.textBox8.Location = new System.Drawing.Point(257, 18);\n this.textBox8.Name = \"textBox8\";\n this.textBox8.PasswordChar = '*';\n this.textBox8.Size = new System.Drawing.Size(110, 21);\n this.textBox8.TabIndex = 3;\n this.textBox8.Text = \"admin\";\n this.textBox8.Enter += new System.EventHandler(this.textBox3_Enter);\n this.textBox8.Leave += new System.EventHandler(this.textBox3_Leave);\n // \n // label17\n // \n this.label17.AutoSize = true;\n this.label17.Location = new System.Drawing.Point(186, 21);\n this.label17.Name = \"label17\";\n this.label17.Size = new System.Drawing.Size(65, 12);\n this.label17.TabIndex = 2;\n this.label17.Text = \"Password:\";\n // \n // textBox9\n // \n this.textBox9.Location = new System.Drawing.Point(70, 18);\n this.textBox9.Name = \"textBox9\";\n this.textBox9.Size = new System.Drawing.Size(110, 21);\n this.textBox9.TabIndex = 1;\n this.textBox9.Text = \"admin\";\n // \n // label18\n // \n this.label18.AutoSize = true;\n this.label18.Location = new System.Drawing.Point(7, 21);\n this.label18.Name = \"label18\";\n this.label18.Size = new System.Drawing.Size(65, 12);\n this.label18.TabIndex = 0;\n this.label18.Text = \"Username:\";\n // \n // timer3\n // \n this.timer3.Interval = 86400000;\n this.timer3.Tick += new System.EventHandler(this.timer3_Tick);\n // \n // timer4\n // \n this.timer4.Interval = 1000;\n this.timer4.Tick += new System.EventHandler(this.timer4_Tick);\n // \n // Form1\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.AutoSize = true;\n this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\n this.ClientSize = new System.Drawing.Size(800, 784);\n this.Controls.Add(this.groupBox6);\n this.Controls.Add(this.groupBox5);\n this.Controls.Add(this.groupBox4);\n this.Controls.Add(this.groupBox3);\n this.Controls.Add(this.groupBox2);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.progressBar1);\n this.Icon = ((System.Drawing.Icon)(resources.GetObject(\"$this.Icon\")));\n this.MaximizeBox = false;\n this.Name = \"Form1\";\n this.Text = \"SubsCheck Win GUI\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown7)).EndInit();\n this.groupBox2.ResumeLayout(false);\n this.groupBox2.PerformLayout();\n this.groupBox3.ResumeLayout(false);\n this.groupBox3.PerformLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown8)).EndInit();\n this.groupBox4.ResumeLayout(false);\n this.groupBox4.PerformLayout();\n this.groupBox5.ResumeLayout(false);\n this.groupBox5.PerformLayout();\n this.groupBox6.ResumeLayout(false);\n this.groupBox6.PerformLayout();\n this.ResumeLayout(false);\n\n }\n\n #endregion\n\n private System.Windows.Forms.NotifyIcon notifyIcon1;\n private System.Windows.Forms.Timer timer1;\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.GroupBox groupBox2;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.GroupBox groupBox3;\n private System.Windows.Forms.Label label8;\n private System.Windows.Forms.Label label7;\n private System.Windows.Forms.Label label4;\n private System.Windows.Forms.Label label5;\n private System.Windows.Forms.Label label6;\n private System.Windows.Forms.Label label3;\n private System.Windows.Forms.Label label2;\n private System.Windows.Forms.Label label1;\n private System.Windows.Forms.NumericUpDown numericUpDown6;\n private System.Windows.Forms.NumericUpDown numericUpDown5;\n private System.Windows.Forms.NumericUpDown numericUpDown4;\n private System.Windows.Forms.NumericUpDown numericUpDown3;\n private System.Windows.Forms.NumericUpDown numericUpDown2;\n private System.Windows.Forms.NumericUpDown numericUpDown1;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.ComboBox comboBox1;\n private System.Windows.Forms.ComboBox comboBox2;\n private System.Windows.Forms.Label label9;\n private System.Windows.Forms.ComboBox comboBox3;\n private System.Windows.Forms.Label label10;\n private System.Windows.Forms.CheckBox checkBox1;\n private System.Windows.Forms.RichTextBox richTextBox1;\n private System.Windows.Forms.ProgressBar progressBar1;\n private System.Windows.Forms.Button button3;\n private System.Windows.Forms.Timer timer2;\n private System.Windows.Forms.GroupBox groupBox4;\n private System.Windows.Forms.TextBox textBox4;\n private System.Windows.Forms.Label label13;\n private System.Windows.Forms.TextBox textBox3;\n private System.Windows.Forms.Label label12;\n private System.Windows.Forms.TextBox textBox2;\n private System.Windows.Forms.Label label11;\n private System.Windows.Forms.ToolTip toolTip1;\n private System.Windows.Forms.GroupBox groupBox5;\n private System.Windows.Forms.TextBox textBox6;\n private System.Windows.Forms.Label label15;\n private System.Windows.Forms.TextBox textBox7;\n private System.Windows.Forms.Label label16;\n private System.Windows.Forms.GroupBox groupBox6;\n private System.Windows.Forms.TextBox textBox5;\n private System.Windows.Forms.Label label14;\n private System.Windows.Forms.TextBox textBox8;\n private System.Windows.Forms.Label label17;\n private System.Windows.Forms.TextBox textBox9;\n private System.Windows.Forms.Label label18;\n private System.Windows.Forms.Button button5;\n private System.Windows.Forms.ComboBox comboBox4;\n private System.Windows.Forms.NumericUpDown numericUpDown7;\n private System.Windows.Forms.Label label20;\n private System.Windows.Forms.Label label19;\n private System.Windows.Forms.ComboBox comboBox5;\n private System.Windows.Forms.CheckBox checkBox2;\n private System.Windows.Forms.Timer timer3;\n private System.Windows.Forms.Button button4;\n private System.Windows.Forms.NumericUpDown numericUpDown8;\n private System.Windows.Forms.CheckBox checkBox3;\n private System.Windows.Forms.TextBox textBox10;\n private System.Windows.Forms.CheckBox checkBox4;\n private System.Windows.Forms.Button button6;\n private System.Windows.Forms.Timer timer4;\n private System.Windows.Forms.Button button7;\n private System.Windows.Forms.TextBox textBox11;\n private System.Windows.Forms.LinkLabel linkLabel1;\n private System.Windows.Forms.Button button8;\n private System.Windows.Forms.CheckBox checkBox5;\n }\n}\n\n"], ["/SubsCheck-Win-GUI/EditURLs.Designer.cs", "namespace subs_check.win.gui\n{\n partial class EditURLs\n {\n /// \n /// Required designer variable.\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// Clean up any resources being used.\n /// \n /// true if managed resources should be disposed; otherwise, false.\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows Form Designer generated code\n\n /// \n /// Required method for Designer support - do not modify\n /// the contents of this method with the code editor.\n /// \n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n this.button1 = new System.Windows.Forms.Button();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.button2 = new System.Windows.Forms.Button();\n this.button3 = new System.Windows.Forms.Button();\n this.button4 = new System.Windows.Forms.Button();\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.SuspendLayout();\n // \n // button1\n // \n this.button1.Font = new System.Drawing.Font(\"宋体\", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.button1.Location = new System.Drawing.Point(12, 415);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"保存\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // textBox1\n // \n this.textBox1.Location = new System.Drawing.Point(12, 12);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both;\n this.textBox1.Size = new System.Drawing.Size(776, 397);\n this.textBox1.TabIndex = 1;\n // \n // button2\n // \n this.button2.Enabled = false;\n this.button2.Location = new System.Drawing.Point(174, 415);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"等待获取\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n // \n // button3\n // \n this.button3.Location = new System.Drawing.Point(93, 415);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 3;\n this.button3.Text = \"去重\";\n this.button3.UseVisualStyleBackColor = true;\n this.button3.Click += new System.EventHandler(this.button3_Click);\n // \n // button4\n // \n this.button4.Location = new System.Drawing.Point(713, 415);\n this.button4.Name = \"button4\";\n this.button4.Size = new System.Drawing.Size(75, 23);\n this.button4.TabIndex = 4;\n this.button4.Text = \"返回\";\n this.button4.UseVisualStyleBackColor = true;\n this.button4.Click += new System.EventHandler(this.button4_Click);\n // \n // timer1\n // \n this.timer1.Tick += new System.EventHandler(this.timer1_Tick);\n // \n // comboBox1\n // \n this.comboBox1.FormattingEnabled = true;\n this.comboBox1.Location = new System.Drawing.Point(255, 418);\n this.comboBox1.Name = \"comboBox1\";\n this.comboBox1.Size = new System.Drawing.Size(120, 20);\n this.comboBox1.TabIndex = 22;\n this.comboBox1.Visible = false;\n // \n // EditURLs\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.ClientSize = new System.Drawing.Size(800, 450);\n this.Controls.Add(this.comboBox1);\n this.Controls.Add(this.button4);\n this.Controls.Add(this.button3);\n this.Controls.Add(this.button2);\n this.Controls.Add(this.textBox1);\n this.Controls.Add(this.button1);\n this.MinimizeBox = false;\n this.Name = \"EditURLs\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"编辑 节点池订阅链接\";\n this.ResumeLayout(false);\n this.PerformLayout();\n\n }\n\n #endregion\n\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.Button button3;\n private System.Windows.Forms.Button button4;\n private System.Windows.Forms.Timer timer1;\n private System.Windows.Forms.ComboBox comboBox1;\n }\n}"], ["/SubsCheck-Win-GUI/Program.cs", "using System;\nusing System.Threading;\nusing System.Windows.Forms;\n\nnamespace subs_check.win.gui\n{\n static class Program\n {\n // 定义一个全局唯一的标识符,使用项目名称作为互斥体的名称\n private static string appMutexName = \"cmliu/SubsCheck-Win-GUI\";\n private static Mutex mutex;\n\n /// \n /// 应用程序的主入口点。\n /// \n [STAThread]\n static void Main()\n {\n // 尝试创建一个命名互斥体,如果已存在,则获取它\n bool createdNew;\n mutex = new Mutex(true, appMutexName, out createdNew);\n\n if (!createdNew)\n {\n // 如果互斥体已存在(即程序已在运行),则终止当前实例\n MessageBox.Show(\"应用程序已经在运行中。\", \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n return;\n }\n\n try\n {\n Application.EnableVisualStyles();\n Application.SetCompatibleTextRenderingDefault(false);\n Application.Run(new Form1());\n }\n finally\n {\n // 确保释放互斥体\n mutex.ReleaseMutex();\n }\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/about.cs", "using System;\nusing System.Windows.Forms;\nusing System.Diagnostics;\n\nnamespace subs_check.win.gui\n{\n public partial class about : Form\n {\n // 添加两个公共属性来接收版本号\n public string GuiVersion { set { label2.Text = value; } }\n public string CoreVersion { set { label3.Text = value; } }\n\n public about()\n {\n InitializeComponent();\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n this.Close();\n }\n\n private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/beck-8/subs-check\");\n }\n\n private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://t.me/CMLiussss\");\n }\n\n private void linkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://url.cmliussss.com/SCWinGUI\");\n }\n\n private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/cmliu/SubsCheck-Win-GUI\");\n }\n\n private void linkLabel5_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/beck-8/subs-check\");\n }\n\n private void linkLabel6_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/bestruirui/BestSub\");\n }\n\n private void linkLabel8_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/sub-store-org/Sub-Store\");\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/about.Designer.cs", "namespace subs_check.win.gui\n{\n partial class about\n {\n /// \n /// Required designer variable.\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// Clean up any resources being used.\n /// \n /// true if managed resources should be disposed; otherwise, false.\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows Form Designer generated code\n\n /// \n /// Required method for Designer support - do not modify\n /// the contents of this method with the code editor.\n /// \n private void InitializeComponent()\n {\n System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(about));\n this.button1 = new System.Windows.Forms.Button();\n this.label1 = new System.Windows.Forms.Label();\n this.label2 = new System.Windows.Forms.Label();\n this.label3 = new System.Windows.Forms.Label();\n this.label5 = new System.Windows.Forms.Label();\n this.linkLabel1 = new System.Windows.Forms.LinkLabel();\n this.label6 = new System.Windows.Forms.Label();\n this.label7 = new System.Windows.Forms.Label();\n this.linkLabel2 = new System.Windows.Forms.LinkLabel();\n this.label8 = new System.Windows.Forms.Label();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.label13 = new System.Windows.Forms.Label();\n this.linkLabel4 = new System.Windows.Forms.LinkLabel();\n this.label12 = new System.Windows.Forms.Label();\n this.linkLabel3 = new System.Windows.Forms.LinkLabel();\n this.label11 = new System.Windows.Forms.Label();\n this.label10 = new System.Windows.Forms.Label();\n this.label9 = new System.Windows.Forms.Label();\n this.groupBox2 = new System.Windows.Forms.GroupBox();\n this.label14 = new System.Windows.Forms.Label();\n this.groupBox3 = new System.Windows.Forms.GroupBox();\n this.label15 = new System.Windows.Forms.Label();\n this.linkLabel8 = new System.Windows.Forms.LinkLabel();\n this.linkLabel6 = new System.Windows.Forms.LinkLabel();\n this.linkLabel5 = new System.Windows.Forms.LinkLabel();\n this.groupBox4 = new System.Windows.Forms.GroupBox();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.label4 = new System.Windows.Forms.Label();\n this.groupBox1.SuspendLayout();\n this.groupBox2.SuspendLayout();\n this.groupBox3.SuspendLayout();\n this.groupBox4.SuspendLayout();\n this.SuspendLayout();\n // \n // button1\n // \n this.button1.Location = new System.Drawing.Point(513, 619);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"确定\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // label1\n // \n this.label1.AutoSize = true;\n this.label1.Font = new System.Drawing.Font(\"微软雅黑\", 24.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.label1.Location = new System.Drawing.Point(10, 9);\n this.label1.Name = \"label1\";\n this.label1.Size = new System.Drawing.Size(354, 44);\n this.label1.TabIndex = 1;\n this.label1.Text = \"SubsCheck-Win-GUI\";\n // \n // label2\n // \n this.label2.AutoSize = true;\n this.label2.Location = new System.Drawing.Point(113, 19);\n this.label2.Name = \"label2\";\n this.label2.Size = new System.Drawing.Size(53, 12);\n this.label2.TabIndex = 2;\n this.label2.Text = \"未知版本\";\n // \n // label3\n // \n this.label3.AutoSize = true;\n this.label3.Location = new System.Drawing.Point(113, 119);\n this.label3.Name = \"label3\";\n this.label3.Size = new System.Drawing.Size(53, 12);\n this.label3.TabIndex = 3;\n this.label3.Text = \"未知版本\";\n // \n // label5\n // \n this.label5.AutoSize = true;\n this.label5.Location = new System.Drawing.Point(18, 119);\n this.label5.Name = \"label5\";\n this.label5.Size = new System.Drawing.Size(65, 12);\n this.label5.TabIndex = 5;\n this.label5.Text = \"内核版本:\";\n // \n // linkLabel1\n // \n this.linkLabel1.AutoSize = true;\n this.linkLabel1.Location = new System.Drawing.Point(113, 39);\n this.linkLabel1.Name = \"linkLabel1\";\n this.linkLabel1.Size = new System.Drawing.Size(257, 12);\n this.linkLabel1.TabIndex = 6;\n this.linkLabel1.TabStop = true;\n this.linkLabel1.Text = \"https://github.com/cmliu/SubsCheck-Win-GUI\";\n this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);\n // \n // label6\n // \n this.label6.AutoSize = true;\n this.label6.Location = new System.Drawing.Point(18, 139);\n this.label6.Name = \"label6\";\n this.label6.Size = new System.Drawing.Size(89, 12);\n this.label6.TabIndex = 8;\n this.label6.Text = \"内核项目地址:\";\n // \n // label7\n // \n this.label7.AutoSize = true;\n this.label7.Location = new System.Drawing.Point(18, 39);\n this.label7.Name = \"label7\";\n this.label7.Size = new System.Drawing.Size(65, 12);\n this.label7.TabIndex = 7;\n this.label7.Text = \"项目地址:\";\n // \n // linkLabel2\n // \n this.linkLabel2.AutoSize = true;\n this.linkLabel2.Location = new System.Drawing.Point(113, 139);\n this.linkLabel2.Name = \"linkLabel2\";\n this.linkLabel2.Size = new System.Drawing.Size(221, 12);\n this.linkLabel2.TabIndex = 9;\n this.linkLabel2.TabStop = true;\n this.linkLabel2.Text = \"https://github.com/beck-8/subs-check\";\n this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked);\n // \n // label8\n // \n this.label8.AutoSize = true;\n this.label8.Location = new System.Drawing.Point(18, 159);\n this.label8.Name = \"label8\";\n this.label8.Size = new System.Drawing.Size(317, 12);\n this.label8.TabIndex = 10;\n this.label8.Text = \"基于.NET Framework 4.7.2 开发 开源协议:MIT License\";\n // \n // groupBox1\n // \n this.groupBox1.Controls.Add(this.label4);\n this.groupBox1.Controls.Add(this.label13);\n this.groupBox1.Controls.Add(this.linkLabel4);\n this.groupBox1.Controls.Add(this.label12);\n this.groupBox1.Controls.Add(this.linkLabel3);\n this.groupBox1.Controls.Add(this.label11);\n this.groupBox1.Controls.Add(this.label10);\n this.groupBox1.Controls.Add(this.label9);\n this.groupBox1.Controls.Add(this.label8);\n this.groupBox1.Controls.Add(this.label2);\n this.groupBox1.Controls.Add(this.linkLabel2);\n this.groupBox1.Controls.Add(this.label3);\n this.groupBox1.Controls.Add(this.label6);\n this.groupBox1.Controls.Add(this.label5);\n this.groupBox1.Controls.Add(this.label7);\n this.groupBox1.Controls.Add(this.linkLabel1);\n this.groupBox1.Location = new System.Drawing.Point(12, 105);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(576, 183);\n this.groupBox1.TabIndex = 11;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"基本信息:\";\n // \n // label13\n // \n this.label13.AutoSize = true;\n this.label13.Location = new System.Drawing.Point(113, 59);\n this.label13.Name = \"label13\";\n this.label13.Size = new System.Drawing.Size(215, 12);\n this.label13.TabIndex = 17;\n this.label13.Text = \"CM 就是这么简单!就是这么方便!!!\";\n // \n // linkLabel4\n // \n this.linkLabel4.AutoSize = true;\n this.linkLabel4.Location = new System.Drawing.Point(113, 79);\n this.linkLabel4.Name = \"linkLabel4\";\n this.linkLabel4.Size = new System.Drawing.Size(47, 12);\n this.linkLabel4.TabIndex = 16;\n this.linkLabel4.TabStop = true;\n this.linkLabel4.Text = \"Youtube\";\n this.linkLabel4.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel4_LinkClicked);\n // \n // label12\n // \n this.label12.AutoSize = true;\n this.label12.Location = new System.Drawing.Point(18, 79);\n this.label12.Name = \"label12\";\n this.label12.Size = new System.Drawing.Size(65, 12);\n this.label12.TabIndex = 15;\n this.label12.Text = \"视频教程:\";\n // \n // linkLabel3\n // \n this.linkLabel3.AutoSize = true;\n this.linkLabel3.Location = new System.Drawing.Point(113, 99);\n this.linkLabel3.Name = \"linkLabel3\";\n this.linkLabel3.Size = new System.Drawing.Size(89, 12);\n this.linkLabel3.TabIndex = 14;\n this.linkLabel3.TabStop = true;\n this.linkLabel3.Text = \"Telegram交流群\";\n this.linkLabel3.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel3_LinkClicked);\n // \n // label11\n // \n this.label11.AutoSize = true;\n this.label11.Location = new System.Drawing.Point(18, 99);\n this.label11.Name = \"label11\";\n this.label11.Size = new System.Drawing.Size(65, 12);\n this.label11.TabIndex = 13;\n this.label11.Text = \"联系方式:\";\n // \n // label10\n // \n this.label10.AutoSize = true;\n this.label10.Location = new System.Drawing.Point(18, 59);\n this.label10.Name = \"label10\";\n this.label10.Size = new System.Drawing.Size(53, 12);\n this.label10.TabIndex = 12;\n this.label10.Text = \"开发者:\";\n // \n // label9\n // \n this.label9.AutoSize = true;\n this.label9.Location = new System.Drawing.Point(18, 19);\n this.label9.Name = \"label9\";\n this.label9.Size = new System.Drawing.Size(65, 12);\n this.label9.TabIndex = 11;\n this.label9.Text = \"当前版本:\";\n // \n // groupBox2\n // \n this.groupBox2.Controls.Add(this.label14);\n this.groupBox2.Location = new System.Drawing.Point(12, 58);\n this.groupBox2.Name = \"groupBox2\";\n this.groupBox2.Size = new System.Drawing.Size(576, 41);\n this.groupBox2.TabIndex = 12;\n this.groupBox2.TabStop = false;\n this.groupBox2.Text = \"软件简介:\";\n // \n // label14\n // \n this.label14.AutoSize = true;\n this.label14.Location = new System.Drawing.Point(18, 19);\n this.label14.Name = \"label14\";\n this.label14.Size = new System.Drawing.Size(365, 12);\n this.label14.TabIndex = 0;\n this.label14.Text = \"节点测速与订阅管理工具,可帮助用户测试、筛选和管理网络节点。\";\n // \n // groupBox3\n // \n this.groupBox3.Controls.Add(this.label15);\n this.groupBox3.Controls.Add(this.linkLabel8);\n this.groupBox3.Controls.Add(this.linkLabel6);\n this.groupBox3.Controls.Add(this.linkLabel5);\n this.groupBox3.Location = new System.Drawing.Point(12, 294);\n this.groupBox3.Name = \"groupBox3\";\n this.groupBox3.Size = new System.Drawing.Size(576, 43);\n this.groupBox3.TabIndex = 13;\n this.groupBox3.TabStop = false;\n this.groupBox3.Text = \"诚挚感谢下列开源项目及其维护者为软件开发提供的支持(排名不分先后,未能及时列出也会心存感激)\";\n // \n // label15\n // \n this.label15.AutoSize = true;\n this.label15.Location = new System.Drawing.Point(201, 19);\n this.label15.Name = \"label15\";\n this.label15.Size = new System.Drawing.Size(65, 12);\n this.label15.TabIndex = 19;\n this.label15.Text = \"ChatGPT 等\";\n // \n // linkLabel8\n // \n this.linkLabel8.AutoSize = true;\n this.linkLabel8.Location = new System.Drawing.Point(136, 19);\n this.linkLabel8.Name = \"linkLabel8\";\n this.linkLabel8.Size = new System.Drawing.Size(59, 12);\n this.linkLabel8.TabIndex = 20;\n this.linkLabel8.TabStop = true;\n this.linkLabel8.Text = \"Sub-Store\";\n this.linkLabel8.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel8_LinkClicked);\n // \n // linkLabel6\n // \n this.linkLabel6.AutoSize = true;\n this.linkLabel6.Location = new System.Drawing.Point(65, 19);\n this.linkLabel6.Name = \"linkLabel6\";\n this.linkLabel6.Size = new System.Drawing.Size(65, 12);\n this.linkLabel6.TabIndex = 19;\n this.linkLabel6.TabStop = true;\n this.linkLabel6.Text = \"bestruirui\";\n this.linkLabel6.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel6_LinkClicked);\n // \n // linkLabel5\n // \n this.linkLabel5.AutoSize = true;\n this.linkLabel5.Location = new System.Drawing.Point(18, 19);\n this.linkLabel5.Name = \"linkLabel5\";\n this.linkLabel5.Size = new System.Drawing.Size(41, 12);\n this.linkLabel5.TabIndex = 18;\n this.linkLabel5.TabStop = true;\n this.linkLabel5.Text = \"beck-8\";\n this.linkLabel5.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel5_LinkClicked);\n // \n // groupBox4\n // \n this.groupBox4.Controls.Add(this.textBox1);\n this.groupBox4.Location = new System.Drawing.Point(12, 343);\n this.groupBox4.Name = \"groupBox4\";\n this.groupBox4.Size = new System.Drawing.Size(576, 270);\n this.groupBox4.TabIndex = 14;\n this.groupBox4.TabStop = false;\n this.groupBox4.Text = \"使用条款 与 免责声明\";\n // \n // textBox1\n // \n this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;\n this.textBox1.Location = new System.Drawing.Point(6, 20);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ReadOnly = true;\n this.textBox1.Size = new System.Drawing.Size(564, 244);\n this.textBox1.TabIndex = 0;\n this.textBox1.Text = resources.GetString(\"textBox1.Text\");\n // \n // label4\n // \n this.label4.AutoSize = true;\n this.label4.Location = new System.Drawing.Point(166, 79);\n this.label4.Name = \"label4\";\n this.label4.Size = new System.Drawing.Size(390, 12);\n this.label4.TabIndex = 18;\n this.label4.Text = \"公益项目!请给我一个免费的点赞和订阅!ヾ(≧∇≦*)ゝ万分感谢!!!\";\n // \n // about\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.AutoSize = true;\n this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\n this.ClientSize = new System.Drawing.Size(598, 651);\n this.Controls.Add(this.groupBox4);\n this.Controls.Add(this.button1);\n this.Controls.Add(this.groupBox3);\n this.Controls.Add(this.groupBox2);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.label1);\n this.MaximizeBox = false;\n this.MinimizeBox = false;\n this.Name = \"about\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"关于 SubsCheck Win GUI\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.groupBox2.ResumeLayout(false);\n this.groupBox2.PerformLayout();\n this.groupBox3.ResumeLayout(false);\n this.groupBox3.PerformLayout();\n this.groupBox4.ResumeLayout(false);\n this.groupBox4.PerformLayout();\n this.ResumeLayout(false);\n this.PerformLayout();\n\n }\n\n #endregion\n\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.Label label1;\n private System.Windows.Forms.Label label2;\n private System.Windows.Forms.Label label3;\n private System.Windows.Forms.Label label5;\n private System.Windows.Forms.LinkLabel linkLabel1;\n private System.Windows.Forms.Label label6;\n private System.Windows.Forms.Label label7;\n private System.Windows.Forms.LinkLabel linkLabel2;\n private System.Windows.Forms.Label label8;\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.LinkLabel linkLabel3;\n private System.Windows.Forms.Label label11;\n private System.Windows.Forms.Label label10;\n private System.Windows.Forms.Label label9;\n private System.Windows.Forms.LinkLabel linkLabel4;\n private System.Windows.Forms.Label label12;\n private System.Windows.Forms.Label label13;\n private System.Windows.Forms.GroupBox groupBox2;\n private System.Windows.Forms.Label label14;\n private System.Windows.Forms.GroupBox groupBox3;\n private System.Windows.Forms.LinkLabel linkLabel6;\n private System.Windows.Forms.LinkLabel linkLabel5;\n private System.Windows.Forms.Label label15;\n private System.Windows.Forms.LinkLabel linkLabel8;\n private System.Windows.Forms.GroupBox groupBox4;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.Label label4;\n }\n}"], ["/SubsCheck-Win-GUI/CheckUpdates.Designer.cs", "namespace subs_check.win.gui\n{\n partial class CheckUpdates\n {\n /// \n /// Required designer variable.\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// Clean up any resources being used.\n /// \n /// true if managed resources should be disposed; otherwise, false.\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows Form Designer generated code\n\n /// \n /// Required method for Designer support - do not modify\n /// the contents of this method with the code editor.\n /// \n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.label4 = new System.Windows.Forms.Label();\n this.label3 = new System.Windows.Forms.Label();\n this.button1 = new System.Windows.Forms.Button();\n this.label2 = new System.Windows.Forms.Label();\n this.label1 = new System.Windows.Forms.Label();\n this.groupBox2 = new System.Windows.Forms.GroupBox();\n this.label5 = new System.Windows.Forms.Label();\n this.label6 = new System.Windows.Forms.Label();\n this.button2 = new System.Windows.Forms.Button();\n this.label7 = new System.Windows.Forms.Label();\n this.label8 = new System.Windows.Forms.Label();\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.groupBox1.SuspendLayout();\n this.groupBox2.SuspendLayout();\n this.SuspendLayout();\n // \n // groupBox1\n // \n this.groupBox1.Controls.Add(this.label4);\n this.groupBox1.Controls.Add(this.label3);\n this.groupBox1.Controls.Add(this.button1);\n this.groupBox1.Controls.Add(this.label2);\n this.groupBox1.Controls.Add(this.label1);\n this.groupBox1.Location = new System.Drawing.Point(12, 12);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(144, 89);\n this.groupBox1.TabIndex = 0;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"SubsCheck Win GUI\";\n // \n // label4\n // \n this.label4.AutoSize = true;\n this.label4.Location = new System.Drawing.Point(77, 37);\n this.label4.Name = \"label4\";\n this.label4.Size = new System.Drawing.Size(53, 12);\n this.label4.TabIndex = 4;\n this.label4.Text = \"v0.0.0.0\";\n // \n // label3\n // \n this.label3.AutoSize = true;\n this.label3.Location = new System.Drawing.Point(77, 17);\n this.label3.Name = \"label3\";\n this.label3.Size = new System.Drawing.Size(53, 12);\n this.label3.TabIndex = 3;\n this.label3.Text = \"v0.0.0.0\";\n // \n // button1\n // \n this.button1.Enabled = false;\n this.button1.Location = new System.Drawing.Point(8, 57);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(122, 23);\n this.button1.TabIndex = 2;\n this.button1.Text = \"正在获取版本\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // label2\n // \n this.label2.AutoSize = true;\n this.label2.Location = new System.Drawing.Point(10, 37);\n this.label2.Name = \"label2\";\n this.label2.Size = new System.Drawing.Size(65, 12);\n this.label2.TabIndex = 1;\n this.label2.Text = \"当前版本:\";\n // \n // label1\n // \n this.label1.AutoSize = true;\n this.label1.Location = new System.Drawing.Point(10, 17);\n this.label1.Name = \"label1\";\n this.label1.Size = new System.Drawing.Size(65, 12);\n this.label1.TabIndex = 0;\n this.label1.Text = \"最新版本:\";\n // \n // groupBox2\n // \n this.groupBox2.Controls.Add(this.label5);\n this.groupBox2.Controls.Add(this.label6);\n this.groupBox2.Controls.Add(this.button2);\n this.groupBox2.Controls.Add(this.label7);\n this.groupBox2.Controls.Add(this.label8);\n this.groupBox2.Location = new System.Drawing.Point(162, 12);\n this.groupBox2.Name = \"groupBox2\";\n this.groupBox2.Size = new System.Drawing.Size(144, 89);\n this.groupBox2.TabIndex = 5;\n this.groupBox2.TabStop = false;\n this.groupBox2.Text = \"Subs-Check 内核\";\n // \n // label5\n // \n this.label5.AutoSize = true;\n this.label5.Location = new System.Drawing.Point(77, 37);\n this.label5.Name = \"label5\";\n this.label5.Size = new System.Drawing.Size(53, 12);\n this.label5.TabIndex = 4;\n this.label5.Text = \"v0.0.0.0\";\n // \n // label6\n // \n this.label6.AutoSize = true;\n this.label6.Location = new System.Drawing.Point(77, 17);\n this.label6.Name = \"label6\";\n this.label6.Size = new System.Drawing.Size(53, 12);\n this.label6.TabIndex = 3;\n this.label6.Text = \"正在获取\";\n // \n // button2\n // \n this.button2.Enabled = false;\n this.button2.Location = new System.Drawing.Point(8, 57);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(122, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"正在获取版本\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n // \n // label7\n // \n this.label7.AutoSize = true;\n this.label7.Location = new System.Drawing.Point(10, 37);\n this.label7.Name = \"label7\";\n this.label7.Size = new System.Drawing.Size(65, 12);\n this.label7.TabIndex = 1;\n this.label7.Text = \"当前版本:\";\n // \n // label8\n // \n this.label8.AutoSize = true;\n this.label8.Location = new System.Drawing.Point(10, 17);\n this.label8.Name = \"label8\";\n this.label8.Size = new System.Drawing.Size(65, 12);\n this.label8.TabIndex = 0;\n this.label8.Text = \"最新版本:\";\n // \n // timer1\n // \n this.timer1.Tick += new System.EventHandler(this.timer1_Tick);\n // \n // comboBox1\n // \n this.comboBox1.FormattingEnabled = true;\n this.comboBox1.Location = new System.Drawing.Point(12, 107);\n this.comboBox1.Name = \"comboBox1\";\n this.comboBox1.Size = new System.Drawing.Size(294, 20);\n this.comboBox1.TabIndex = 23;\n this.comboBox1.Visible = false;\n // \n // CheckUpdates\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.AutoSize = true;\n this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\n this.ClientSize = new System.Drawing.Size(319, 138);\n this.Controls.Add(this.comboBox1);\n this.Controls.Add(this.groupBox2);\n this.Controls.Add(this.groupBox1);\n this.MaximizeBox = false;\n this.MinimizeBox = false;\n this.Name = \"CheckUpdates\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"检查更新\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.groupBox2.ResumeLayout(false);\n this.groupBox2.PerformLayout();\n this.ResumeLayout(false);\n\n }\n\n #endregion\n\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.Label label4;\n private System.Windows.Forms.Label label3;\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.Label label2;\n private System.Windows.Forms.Label label1;\n private System.Windows.Forms.GroupBox groupBox2;\n private System.Windows.Forms.Label label5;\n private System.Windows.Forms.Label label6;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.Label label7;\n private System.Windows.Forms.Label label8;\n private System.Windows.Forms.Timer timer1;\n private System.Windows.Forms.ComboBox comboBox1;\n }\n}"], ["/SubsCheck-Win-GUI/Properties/Resources.Designer.cs", "//------------------------------------------------------------------------------\n// \n// 此代码由工具生成。\n// 运行时版本:4.0.30319.42000\n//\n// 对此文件的更改可能会导致不正确的行为,并且如果\n// 重新生成代码,这些更改将会丢失。\n// \n//------------------------------------------------------------------------------\n\nnamespace subs_check.win.gui.Properties {\n using System;\n \n \n /// \n /// 一个强类型的资源类,用于查找本地化的字符串等。\n /// \n // 此类是由 StronglyTypedResourceBuilder\n // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。\n // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen\n // (以 /str 作为命令选项),或重新生成 VS 项目。\n [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Resources.Tools.StronglyTypedResourceBuilder\", \"17.0.0.0\")]\n [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\n internal class Resources {\n \n private static global::System.Resources.ResourceManager resourceMan;\n \n private static global::System.Globalization.CultureInfo resourceCulture;\n \n [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\n internal Resources() {\n }\n \n /// \n /// 返回此类使用的缓存的 ResourceManager 实例。\n /// \n [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n internal static global::System.Resources.ResourceManager ResourceManager {\n get {\n if (object.ReferenceEquals(resourceMan, null)) {\n global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(\"subs_check.win.gui.Properties.Resources\", typeof(Resources).Assembly);\n resourceMan = temp;\n }\n return resourceMan;\n }\n }\n \n /// \n /// 重写当前线程的 CurrentUICulture 属性,对\n /// 使用此强类型资源类的所有资源查找执行重写。\n /// \n [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n internal static global::System.Globalization.CultureInfo Culture {\n get {\n return resourceCulture;\n }\n set {\n resourceCulture = value;\n }\n }\n \n /// \n /// 查找 System.Byte[] 类型的本地化资源。\n /// \n internal static byte[] going {\n get {\n object obj = ResourceManager.GetObject(\"going\", resourceCulture);\n return ((byte[])(obj));\n }\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/MoreYAML.Designer.cs", "namespace subs_check.win.gui\n{\n partial class MoreYAML\n {\n /// \n /// Required designer variable.\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// Clean up any resources being used.\n /// \n /// true if managed resources should be disposed; otherwise, false.\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows Form Designer generated code\n\n /// \n /// Required method for Designer support - do not modify\n /// the contents of this method with the code editor.\n /// \n private void InitializeComponent()\n {\n System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MoreYAML));\n this.button1 = new System.Windows.Forms.Button();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.button2 = new System.Windows.Forms.Button();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.linkLabel1 = new System.Windows.Forms.LinkLabel();\n this.button3 = new System.Windows.Forms.Button();\n this.groupBox1.SuspendLayout();\n this.SuspendLayout();\n // \n // button1\n // \n this.button1.Font = new System.Drawing.Font(\"宋体\", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.button1.Location = new System.Drawing.Point(12, 415);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"保存\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // groupBox1\n // \n this.groupBox1.Controls.Add(this.linkLabel1);\n this.groupBox1.Controls.Add(this.textBox1);\n this.groupBox1.Location = new System.Drawing.Point(12, 12);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(776, 397);\n this.groupBox1.TabIndex = 1;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"YAML\";\n // \n // button2\n // \n this.button2.Location = new System.Drawing.Point(713, 415);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"返回\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n // \n // textBox1\n // \n this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox1.Font = new System.Drawing.Font(\"微软雅黑\", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.textBox1.Location = new System.Drawing.Point(6, 13);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;\n this.textBox1.Size = new System.Drawing.Size(764, 378);\n this.textBox1.TabIndex = 0;\n this.textBox1.Text = resources.GetString(\"textBox1.Text\");\n this.textBox1.UseWaitCursor = true;\n // \n // linkLabel1\n // \n this.linkLabel1.AutoSize = true;\n this.linkLabel1.Location = new System.Drawing.Point(585, 0);\n this.linkLabel1.Name = \"linkLabel1\";\n this.linkLabel1.Size = new System.Drawing.Size(191, 12);\n this.linkLabel1.TabIndex = 1;\n this.linkLabel1.TabStop = true;\n this.linkLabel1.Text = \"更多请参考 config.yaml 参数文档\";\n this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);\n // \n // button3\n // \n this.button3.Location = new System.Drawing.Point(93, 415);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 3;\n this.button3.Text = \"重置\";\n this.button3.UseVisualStyleBackColor = true;\n this.button3.Click += new System.EventHandler(this.button3_Click);\n // \n // MoreYAML\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.ClientSize = new System.Drawing.Size(800, 450);\n this.Controls.Add(this.button3);\n this.Controls.Add(this.button2);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.button1);\n this.MaximizeBox = false;\n this.MinimizeBox = false;\n this.Name = \"MoreYAML\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"编辑 补充参数\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.ResumeLayout(false);\n\n }\n\n #endregion\n\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.LinkLabel linkLabel1;\n private System.Windows.Forms.Button button3;\n }\n}"], ["/SubsCheck-Win-GUI/Properties/Settings.Designer.cs", "//------------------------------------------------------------------------------\n// \n// 此代码由工具生成。\n// 运行时版本:4.0.30319.42000\n//\n// 对此文件的更改可能会导致不正确的行为,并且如果\n// 重新生成代码,这些更改将会丢失。\n// \n//------------------------------------------------------------------------------\n\nnamespace subs_check.win.gui.Properties {\n \n \n [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\n [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator\", \"17.13.0.0\")]\n internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {\n \n private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));\n \n public static Settings Default {\n get {\n return defaultInstance;\n }\n }\n }\n}\n"]], "task_instance_info": {"created_time": "2025-08-20 18:31:17", "created_task_model": "DeepSeek-R1", "class_skeleton": "public\npartial\nclass\nEditURLs\n: Form\n{\npublic string UrlContent { get; set; }\npublic System.Windows.Forms.ComboBox.ObjectCollection githubProxys { get; set; }\npublic string githubProxy { get; set; }\nstring githubProxyURL;\nstring SubsCheckURLs;\npublic EditURLs () {}\nprotected override void OnLoad (EventArgs e) {}\nprivate void button1_Click (object sender, EventArgs e) {}\nprivate void button4_Click (object sender, EventArgs e) {}\nprivate void button3_Click (object sender, EventArgs e) {}\nprivate async void timer1_Tick (object sender, EventArgs e) {}\nprivate async Task DetectGitHubProxyAsync (List proxyItems) {}\nprivate void button2_Click (object sender, EventArgs e) {}\nprivate string NormalizeLineEndings (string text) {}\n}", "code_description": "This code segment functions to: Provide a user interface for managing and editing text-based resource lists with capabilities for network-based content retrieval, automated proxy selection, input normalization, and duplicate removal while maintaining synchronization between local edits and remote data sources."}, "inference_content": {"inference_model": "DeepSeek-R1", "inference_result": "```c_sharp\n[TASK_BEGIN]\npublic partial class EditURLs : Form\n{\n public EditURLs()\n {\n InitializeComponent();\n }\n\n protected override void OnLoad(EventArgs e)\n {\n base.OnLoad(e);\n comboBox1.Items.AddRange(githubProxys);\n comboBox1.SelectedItem = githubProxy;\n timer1.Interval = 100;\n timer1.Start();\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n UrlContent = NormalizeLineEndings(textBox1.Text);\n DialogResult = DialogResult.OK;\n Close();\n }\n\n private void button4_Click(object sender, EventArgs e)\n {\n DialogResult = DialogResult.Cancel;\n Close();\n }\n\n private void button3_Click(object sender, EventArgs e)\n {\n textBox1.Text = SubsCheckURLs;\n }\n\n private async void timer1_Tick(object sender, EventArgs e)\n {\n timer1.Stop();\n var proxyItems = comboBox1.Items.Cast().ToList();\n var proxyURL = await DetectGitHubProxyAsync(proxyItems);\n \n if (this.InvokeRequired)\n {\n this.Invoke((MethodInvoker)delegate {\n githubProxyURL = proxyURL;\n comboBox1.SelectedItem = proxyURL;\n });\n }\n else\n {\n githubProxyURL = proxyURL;\n comboBox1.SelectedItem = proxyURL;\n }\n }\n\n private async Task DetectGitHubProxyAsync(List proxyItems)\n {\n using (var client = new HttpClient { Timeout = TimeSpan.FromSeconds(3) })\n {\n foreach (var proxy in proxyItems)\n {\n try\n {\n var testUrl = $\"{proxy}https://raw.githubusercontent.com/\";\n var response = await client.SendAsync(new HttpRequestMessage(HttpMethod.Head, testUrl));\n if (response.IsSuccessStatusCode) return proxy;\n }\n catch { }\n }\n }\n return null;\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n var proxyItems = comboBox1.Items.Cast().ToList();\n var workingProxy = DetectGitHubProxyAsync(proxyItems).Result;\n MessageBox.Show(workingProxy != null \n ? $\"Working proxy: {workingProxy}\"\n : \"No working proxies found\");\n }\n\n private string NormalizeLineEndings(string text)\n {\n return text?\n .Replace(\"\\r\\n\", \"\\n\")\n .Replace(\"\\r\", \"\\n\")\n .Replace(\"\\n\", Environment.NewLine);\n }\n}\n[TASK_END]\n```", "inference_time": "2025-08-20 18-32-03"}, "editdistance_info": {"edit_distance": 16.4804, "calculate_time": "2025-08-20 18:32:03", "true_code_clean": "public partial class EditURLs: Form\n {\n public string UrlContent { get; set; }\n public System.Windows.Forms.ComboBox.ObjectCollection githubProxys { get; set; }\n public string githubProxy { get; set; }\n string githubProxyURL;\n string SubsCheckURLs;\n public EditURLs()\n {\n InitializeComponent();\n textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom;\n button1.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;\n button2.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;\n button3.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;\n button4.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;\n }\n protected override void OnLoad(EventArgs e)\n {\n base.OnLoad(e);\n if (!string.IsNullOrEmpty(UrlContent)) textBox1.Text = UrlContent;\n timer1.Enabled = true;\n if (githubProxys != null)\n {\n comboBox1.Items.Clear();\n foreach (var item in githubProxys)\n {\n comboBox1.Items.Add(item);\n }\n }\n if (!string.IsNullOrEmpty(githubProxy)) comboBox1.Text = githubProxy;\n }\n private void button1_Click(object sender, EventArgs e)\n {\n UrlContent = textBox1.Text;\n this.DialogResult = DialogResult.OK;\n this.Close();\n }\n private void button4_Click(object sender, EventArgs e)\n {\n this.Close();\n }\n private void button3_Click(object sender, EventArgs e)\n {\n if (string.IsNullOrWhiteSpace(textBox1.Text))\n return;\n string[] lines = textBox1.Text.Split(\n new[] { \"\\r\\n\", \"\\r\", \"\\n\" },\n StringSplitOptions.RemoveEmptyEntries);\n for (int i = 0; i < lines.Length; i++)\n {\n lines[i] = lines[i].Trim();\n }\n string[] uniqueLines = lines\n .Where(line => !string.IsNullOrWhiteSpace(line))\n .Distinct(StringComparer.OrdinalIgnoreCase) \n .ToArray();\n textBox1.Text = string.Join(Environment.NewLine, uniqueLines) + \"\\n\";\n int removed = lines.Length - uniqueLines.Length;\n if (removed > 0)\n {\n MessageBox.Show($\"已移除 {removed} 个重复行。\", \"去重完成\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n else\n {\n MessageBox.Show(\"没有发现重复行。\", \"去重完成\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n }\n private async void timer1_Tick(object sender, EventArgs e)\n {\n timer1.Enabled = false;\n if (comboBox1.Text == \"自动选择\")\n {\n List proxyItems = new List();\n for (int j = 0; j < comboBox1.Items.Count; j++)\n {\n string proxyItem = comboBox1.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n }\n else\n {\n githubProxyURL = $\"https:\n }\n string SubsCheckURLsURL = $\"{githubProxyURL}https:\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); \n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n HttpResponseMessage response = await client.GetAsync(SubsCheckURLsURL);\n if (response.IsSuccessStatusCode)\n {\n button2.Text = \"在线获取\";\n button2.Enabled = true;\n SubsCheckURLs = await response.Content.ReadAsStringAsync();\n }\n else\n {\n button2.Text = \"获取失败\";\n button2.Enabled = false;\n }\n }\n }\n catch (Exception ex)\n {\n Console.WriteLine($\"Error: {ex.Message}\");\n button2.Text = \"获取失败\";\n button2.Enabled = false;\n }\n }\n private async Task DetectGitHubProxyAsync(List proxyItems)\n {\n string detectedProxyURL = \"\";\n foreach (string proxyItem in proxyItems)\n {\n string checkUrl = $\"https:\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); \n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n HttpResponseMessage response = await client.GetAsync(checkUrl);\n if (response.IsSuccessStatusCode)\n {\n detectedProxyURL = $\"https:\n break;\n }\n }\n }\n catch (Exception ex)\n {\n Console.WriteLine($\"Error: {ex.Message}\");\n }\n }\n return detectedProxyURL;\n }\n private void button2_Click(object sender, EventArgs e)\n {\n if (string.IsNullOrEmpty(SubsCheckURLs))\n {\n MessageBox.Show(\"未能获取在线内容,请重试。\", \"获取失败\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n return;\n }\n DialogResult result = MessageBox.Show(\n \"请选择如何处理获取到的内容:\\n\\n\" +\n \"- 点击【是】将覆盖当前内容\\n\" +\n \"- 点击【否】将追加到当前内容后面\\n\" +\n \"- 点击【取消】不做任何操作\",\n \"操作选择\",\n MessageBoxButtons.YesNoCancel,\n MessageBoxIcon.Question);\n if (result == DialogResult.Yes)\n {\n string normalizedText = NormalizeLineEndings(SubsCheckURLs);\n textBox1.Text = normalizedText;\n MessageBox.Show(\"已用在线内容覆盖原有内容。\", \"感谢大自然的馈赠\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n else if (result == DialogResult.No)\n {\n if (!textBox1.Text.EndsWith(\"\\r\\n\") && !textBox1.Text.EndsWith(\"\\n\"))\n {\n textBox1.Text += Environment.NewLine;\n }\n textBox1.Text += NormalizeLineEndings(SubsCheckURLs);\n MessageBox.Show(\"已将在线内容追加到原有内容后。\", \"感谢大自然的馈赠\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n }\n private string NormalizeLineEndings(string text)\n {\n if (string.IsNullOrEmpty(text))\n return string.Empty;\n text = text.Replace(\"\\r\\n\", \"\\n\").Replace(\"\\r\", \"\\n\");\n text = text.Replace(\"\\n\", Environment.NewLine);\n return text;\n }\n }", "predict_code_clean": "public partial class EditURLs : Form\n{\n public EditURLs()\n {\n InitializeComponent();\n }\n protected override void OnLoad(EventArgs e)\n {\n base.OnLoad(e);\n comboBox1.Items.AddRange(githubProxys);\n comboBox1.SelectedItem = githubProxy;\n timer1.Interval = 100;\n timer1.Start();\n }\n private void button1_Click(object sender, EventArgs e)\n {\n UrlContent = NormalizeLineEndings(textBox1.Text);\n DialogResult = DialogResult.OK;\n Close();\n }\n private void button4_Click(object sender, EventArgs e)\n {\n DialogResult = DialogResult.Cancel;\n Close();\n }\n private void button3_Click(object sender, EventArgs e)\n {\n textBox1.Text = SubsCheckURLs;\n }\n private async void timer1_Tick(object sender, EventArgs e)\n {\n timer1.Stop();\n var proxyItems = comboBox1.Items.Cast().ToList();\n var proxyURL = await DetectGitHubProxyAsync(proxyItems);\n if (this.InvokeRequired)\n {\n this.Invoke((MethodInvoker)delegate {\n githubProxyURL = proxyURL;\n comboBox1.SelectedItem = proxyURL;\n });\n }\n else\n {\n githubProxyURL = proxyURL;\n comboBox1.SelectedItem = proxyURL;\n }\n }\n private async Task DetectGitHubProxyAsync(List proxyItems)\n {\n using (var client = new HttpClient { Timeout = TimeSpan.FromSeconds(3) })\n {\n foreach (var proxy in proxyItems)\n {\n try\n {\n var testUrl = $\"{proxy}https:\n var response = await client.SendAsync(new HttpRequestMessage(HttpMethod.Head, testUrl));\n if (response.IsSuccessStatusCode) return proxy;\n }\n catch { }\n }\n }\n return null;\n }\n private void button2_Click(object sender, EventArgs e)\n {\n var proxyItems = comboBox1.Items.Cast().ToList();\n var workingProxy = DetectGitHubProxyAsync(proxyItems).Result;\n MessageBox.Show(workingProxy != null \n ? $\"Working proxy: {workingProxy}\"\n : \"No working proxies found\");\n }\n private string NormalizeLineEndings(string text)\n {\n return text?\n .Replace(\"\\r\\n\", \"\\n\")\n .Replace(\"\\r\", \"\\n\")\n .Replace(\"\\n\", Environment.NewLine);\n }\n}"}} {"repo_name": "SubsCheck-Win-GUI", "file_name": "/SubsCheck-Win-GUI/MoreYAML.Designer.cs", "inference_info": {"prefix_code": "namespace subs_check.win.gui\n{\n ", "suffix_code": "\n}", "middle_code": "partial class MoreYAML\n {\n private System.ComponentModel.IContainer components = null;\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n #region Windows Form Designer generated code\n private void InitializeComponent()\n {\n System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MoreYAML));\n this.button1 = new System.Windows.Forms.Button();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.button2 = new System.Windows.Forms.Button();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.linkLabel1 = new System.Windows.Forms.LinkLabel();\n this.button3 = new System.Windows.Forms.Button();\n this.groupBox1.SuspendLayout();\n this.SuspendLayout();\n this.button1.Font = new System.Drawing.Font(\"宋体\", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.button1.Location = new System.Drawing.Point(12, 415);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"保存\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n this.groupBox1.Controls.Add(this.linkLabel1);\n this.groupBox1.Controls.Add(this.textBox1);\n this.groupBox1.Location = new System.Drawing.Point(12, 12);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(776, 397);\n this.groupBox1.TabIndex = 1;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"YAML\";\n this.button2.Location = new System.Drawing.Point(713, 415);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"返回\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox1.Font = new System.Drawing.Font(\"微软雅黑\", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.textBox1.Location = new System.Drawing.Point(6, 13);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;\n this.textBox1.Size = new System.Drawing.Size(764, 378);\n this.textBox1.TabIndex = 0;\n this.textBox1.Text = resources.GetString(\"textBox1.Text\");\n this.textBox1.UseWaitCursor = true;\n this.linkLabel1.AutoSize = true;\n this.linkLabel1.Location = new System.Drawing.Point(585, 0);\n this.linkLabel1.Name = \"linkLabel1\";\n this.linkLabel1.Size = new System.Drawing.Size(191, 12);\n this.linkLabel1.TabIndex = 1;\n this.linkLabel1.TabStop = true;\n this.linkLabel1.Text = \"更多请参考 config.yaml 参数文档\";\n this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);\n this.button3.Location = new System.Drawing.Point(93, 415);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 3;\n this.button3.Text = \"重置\";\n this.button3.UseVisualStyleBackColor = true;\n this.button3.Click += new System.EventHandler(this.button3_Click);\n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.ClientSize = new System.Drawing.Size(800, 450);\n this.Controls.Add(this.button3);\n this.Controls.Add(this.button2);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.button1);\n this.MaximizeBox = false;\n this.MinimizeBox = false;\n this.Name = \"MoreYAML\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"编辑 补充参数\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.ResumeLayout(false);\n }\n #endregion\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.LinkLabel linkLabel1;\n private System.Windows.Forms.Button button3;\n }", "code_description": null, "fill_type": "CLASS_TYPE", "language_type": "c_sharp", "sub_task_type": null}, "context_code": [["/SubsCheck-Win-GUI/about.Designer.cs", "namespace subs_check.win.gui\n{\n partial class about\n {\n /// \n /// Required designer variable.\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// Clean up any resources being used.\n /// \n /// true if managed resources should be disposed; otherwise, false.\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows Form Designer generated code\n\n /// \n /// Required method for Designer support - do not modify\n /// the contents of this method with the code editor.\n /// \n private void InitializeComponent()\n {\n System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(about));\n this.button1 = new System.Windows.Forms.Button();\n this.label1 = new System.Windows.Forms.Label();\n this.label2 = new System.Windows.Forms.Label();\n this.label3 = new System.Windows.Forms.Label();\n this.label5 = new System.Windows.Forms.Label();\n this.linkLabel1 = new System.Windows.Forms.LinkLabel();\n this.label6 = new System.Windows.Forms.Label();\n this.label7 = new System.Windows.Forms.Label();\n this.linkLabel2 = new System.Windows.Forms.LinkLabel();\n this.label8 = new System.Windows.Forms.Label();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.label13 = new System.Windows.Forms.Label();\n this.linkLabel4 = new System.Windows.Forms.LinkLabel();\n this.label12 = new System.Windows.Forms.Label();\n this.linkLabel3 = new System.Windows.Forms.LinkLabel();\n this.label11 = new System.Windows.Forms.Label();\n this.label10 = new System.Windows.Forms.Label();\n this.label9 = new System.Windows.Forms.Label();\n this.groupBox2 = new System.Windows.Forms.GroupBox();\n this.label14 = new System.Windows.Forms.Label();\n this.groupBox3 = new System.Windows.Forms.GroupBox();\n this.label15 = new System.Windows.Forms.Label();\n this.linkLabel8 = new System.Windows.Forms.LinkLabel();\n this.linkLabel6 = new System.Windows.Forms.LinkLabel();\n this.linkLabel5 = new System.Windows.Forms.LinkLabel();\n this.groupBox4 = new System.Windows.Forms.GroupBox();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.label4 = new System.Windows.Forms.Label();\n this.groupBox1.SuspendLayout();\n this.groupBox2.SuspendLayout();\n this.groupBox3.SuspendLayout();\n this.groupBox4.SuspendLayout();\n this.SuspendLayout();\n // \n // button1\n // \n this.button1.Location = new System.Drawing.Point(513, 619);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"确定\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // label1\n // \n this.label1.AutoSize = true;\n this.label1.Font = new System.Drawing.Font(\"微软雅黑\", 24.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.label1.Location = new System.Drawing.Point(10, 9);\n this.label1.Name = \"label1\";\n this.label1.Size = new System.Drawing.Size(354, 44);\n this.label1.TabIndex = 1;\n this.label1.Text = \"SubsCheck-Win-GUI\";\n // \n // label2\n // \n this.label2.AutoSize = true;\n this.label2.Location = new System.Drawing.Point(113, 19);\n this.label2.Name = \"label2\";\n this.label2.Size = new System.Drawing.Size(53, 12);\n this.label2.TabIndex = 2;\n this.label2.Text = \"未知版本\";\n // \n // label3\n // \n this.label3.AutoSize = true;\n this.label3.Location = new System.Drawing.Point(113, 119);\n this.label3.Name = \"label3\";\n this.label3.Size = new System.Drawing.Size(53, 12);\n this.label3.TabIndex = 3;\n this.label3.Text = \"未知版本\";\n // \n // label5\n // \n this.label5.AutoSize = true;\n this.label5.Location = new System.Drawing.Point(18, 119);\n this.label5.Name = \"label5\";\n this.label5.Size = new System.Drawing.Size(65, 12);\n this.label5.TabIndex = 5;\n this.label5.Text = \"内核版本:\";\n // \n // linkLabel1\n // \n this.linkLabel1.AutoSize = true;\n this.linkLabel1.Location = new System.Drawing.Point(113, 39);\n this.linkLabel1.Name = \"linkLabel1\";\n this.linkLabel1.Size = new System.Drawing.Size(257, 12);\n this.linkLabel1.TabIndex = 6;\n this.linkLabel1.TabStop = true;\n this.linkLabel1.Text = \"https://github.com/cmliu/SubsCheck-Win-GUI\";\n this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);\n // \n // label6\n // \n this.label6.AutoSize = true;\n this.label6.Location = new System.Drawing.Point(18, 139);\n this.label6.Name = \"label6\";\n this.label6.Size = new System.Drawing.Size(89, 12);\n this.label6.TabIndex = 8;\n this.label6.Text = \"内核项目地址:\";\n // \n // label7\n // \n this.label7.AutoSize = true;\n this.label7.Location = new System.Drawing.Point(18, 39);\n this.label7.Name = \"label7\";\n this.label7.Size = new System.Drawing.Size(65, 12);\n this.label7.TabIndex = 7;\n this.label7.Text = \"项目地址:\";\n // \n // linkLabel2\n // \n this.linkLabel2.AutoSize = true;\n this.linkLabel2.Location = new System.Drawing.Point(113, 139);\n this.linkLabel2.Name = \"linkLabel2\";\n this.linkLabel2.Size = new System.Drawing.Size(221, 12);\n this.linkLabel2.TabIndex = 9;\n this.linkLabel2.TabStop = true;\n this.linkLabel2.Text = \"https://github.com/beck-8/subs-check\";\n this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked);\n // \n // label8\n // \n this.label8.AutoSize = true;\n this.label8.Location = new System.Drawing.Point(18, 159);\n this.label8.Name = \"label8\";\n this.label8.Size = new System.Drawing.Size(317, 12);\n this.label8.TabIndex = 10;\n this.label8.Text = \"基于.NET Framework 4.7.2 开发 开源协议:MIT License\";\n // \n // groupBox1\n // \n this.groupBox1.Controls.Add(this.label4);\n this.groupBox1.Controls.Add(this.label13);\n this.groupBox1.Controls.Add(this.linkLabel4);\n this.groupBox1.Controls.Add(this.label12);\n this.groupBox1.Controls.Add(this.linkLabel3);\n this.groupBox1.Controls.Add(this.label11);\n this.groupBox1.Controls.Add(this.label10);\n this.groupBox1.Controls.Add(this.label9);\n this.groupBox1.Controls.Add(this.label8);\n this.groupBox1.Controls.Add(this.label2);\n this.groupBox1.Controls.Add(this.linkLabel2);\n this.groupBox1.Controls.Add(this.label3);\n this.groupBox1.Controls.Add(this.label6);\n this.groupBox1.Controls.Add(this.label5);\n this.groupBox1.Controls.Add(this.label7);\n this.groupBox1.Controls.Add(this.linkLabel1);\n this.groupBox1.Location = new System.Drawing.Point(12, 105);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(576, 183);\n this.groupBox1.TabIndex = 11;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"基本信息:\";\n // \n // label13\n // \n this.label13.AutoSize = true;\n this.label13.Location = new System.Drawing.Point(113, 59);\n this.label13.Name = \"label13\";\n this.label13.Size = new System.Drawing.Size(215, 12);\n this.label13.TabIndex = 17;\n this.label13.Text = \"CM 就是这么简单!就是这么方便!!!\";\n // \n // linkLabel4\n // \n this.linkLabel4.AutoSize = true;\n this.linkLabel4.Location = new System.Drawing.Point(113, 79);\n this.linkLabel4.Name = \"linkLabel4\";\n this.linkLabel4.Size = new System.Drawing.Size(47, 12);\n this.linkLabel4.TabIndex = 16;\n this.linkLabel4.TabStop = true;\n this.linkLabel4.Text = \"Youtube\";\n this.linkLabel4.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel4_LinkClicked);\n // \n // label12\n // \n this.label12.AutoSize = true;\n this.label12.Location = new System.Drawing.Point(18, 79);\n this.label12.Name = \"label12\";\n this.label12.Size = new System.Drawing.Size(65, 12);\n this.label12.TabIndex = 15;\n this.label12.Text = \"视频教程:\";\n // \n // linkLabel3\n // \n this.linkLabel3.AutoSize = true;\n this.linkLabel3.Location = new System.Drawing.Point(113, 99);\n this.linkLabel3.Name = \"linkLabel3\";\n this.linkLabel3.Size = new System.Drawing.Size(89, 12);\n this.linkLabel3.TabIndex = 14;\n this.linkLabel3.TabStop = true;\n this.linkLabel3.Text = \"Telegram交流群\";\n this.linkLabel3.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel3_LinkClicked);\n // \n // label11\n // \n this.label11.AutoSize = true;\n this.label11.Location = new System.Drawing.Point(18, 99);\n this.label11.Name = \"label11\";\n this.label11.Size = new System.Drawing.Size(65, 12);\n this.label11.TabIndex = 13;\n this.label11.Text = \"联系方式:\";\n // \n // label10\n // \n this.label10.AutoSize = true;\n this.label10.Location = new System.Drawing.Point(18, 59);\n this.label10.Name = \"label10\";\n this.label10.Size = new System.Drawing.Size(53, 12);\n this.label10.TabIndex = 12;\n this.label10.Text = \"开发者:\";\n // \n // label9\n // \n this.label9.AutoSize = true;\n this.label9.Location = new System.Drawing.Point(18, 19);\n this.label9.Name = \"label9\";\n this.label9.Size = new System.Drawing.Size(65, 12);\n this.label9.TabIndex = 11;\n this.label9.Text = \"当前版本:\";\n // \n // groupBox2\n // \n this.groupBox2.Controls.Add(this.label14);\n this.groupBox2.Location = new System.Drawing.Point(12, 58);\n this.groupBox2.Name = \"groupBox2\";\n this.groupBox2.Size = new System.Drawing.Size(576, 41);\n this.groupBox2.TabIndex = 12;\n this.groupBox2.TabStop = false;\n this.groupBox2.Text = \"软件简介:\";\n // \n // label14\n // \n this.label14.AutoSize = true;\n this.label14.Location = new System.Drawing.Point(18, 19);\n this.label14.Name = \"label14\";\n this.label14.Size = new System.Drawing.Size(365, 12);\n this.label14.TabIndex = 0;\n this.label14.Text = \"节点测速与订阅管理工具,可帮助用户测试、筛选和管理网络节点。\";\n // \n // groupBox3\n // \n this.groupBox3.Controls.Add(this.label15);\n this.groupBox3.Controls.Add(this.linkLabel8);\n this.groupBox3.Controls.Add(this.linkLabel6);\n this.groupBox3.Controls.Add(this.linkLabel5);\n this.groupBox3.Location = new System.Drawing.Point(12, 294);\n this.groupBox3.Name = \"groupBox3\";\n this.groupBox3.Size = new System.Drawing.Size(576, 43);\n this.groupBox3.TabIndex = 13;\n this.groupBox3.TabStop = false;\n this.groupBox3.Text = \"诚挚感谢下列开源项目及其维护者为软件开发提供的支持(排名不分先后,未能及时列出也会心存感激)\";\n // \n // label15\n // \n this.label15.AutoSize = true;\n this.label15.Location = new System.Drawing.Point(201, 19);\n this.label15.Name = \"label15\";\n this.label15.Size = new System.Drawing.Size(65, 12);\n this.label15.TabIndex = 19;\n this.label15.Text = \"ChatGPT 等\";\n // \n // linkLabel8\n // \n this.linkLabel8.AutoSize = true;\n this.linkLabel8.Location = new System.Drawing.Point(136, 19);\n this.linkLabel8.Name = \"linkLabel8\";\n this.linkLabel8.Size = new System.Drawing.Size(59, 12);\n this.linkLabel8.TabIndex = 20;\n this.linkLabel8.TabStop = true;\n this.linkLabel8.Text = \"Sub-Store\";\n this.linkLabel8.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel8_LinkClicked);\n // \n // linkLabel6\n // \n this.linkLabel6.AutoSize = true;\n this.linkLabel6.Location = new System.Drawing.Point(65, 19);\n this.linkLabel6.Name = \"linkLabel6\";\n this.linkLabel6.Size = new System.Drawing.Size(65, 12);\n this.linkLabel6.TabIndex = 19;\n this.linkLabel6.TabStop = true;\n this.linkLabel6.Text = \"bestruirui\";\n this.linkLabel6.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel6_LinkClicked);\n // \n // linkLabel5\n // \n this.linkLabel5.AutoSize = true;\n this.linkLabel5.Location = new System.Drawing.Point(18, 19);\n this.linkLabel5.Name = \"linkLabel5\";\n this.linkLabel5.Size = new System.Drawing.Size(41, 12);\n this.linkLabel5.TabIndex = 18;\n this.linkLabel5.TabStop = true;\n this.linkLabel5.Text = \"beck-8\";\n this.linkLabel5.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel5_LinkClicked);\n // \n // groupBox4\n // \n this.groupBox4.Controls.Add(this.textBox1);\n this.groupBox4.Location = new System.Drawing.Point(12, 343);\n this.groupBox4.Name = \"groupBox4\";\n this.groupBox4.Size = new System.Drawing.Size(576, 270);\n this.groupBox4.TabIndex = 14;\n this.groupBox4.TabStop = false;\n this.groupBox4.Text = \"使用条款 与 免责声明\";\n // \n // textBox1\n // \n this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;\n this.textBox1.Location = new System.Drawing.Point(6, 20);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ReadOnly = true;\n this.textBox1.Size = new System.Drawing.Size(564, 244);\n this.textBox1.TabIndex = 0;\n this.textBox1.Text = resources.GetString(\"textBox1.Text\");\n // \n // label4\n // \n this.label4.AutoSize = true;\n this.label4.Location = new System.Drawing.Point(166, 79);\n this.label4.Name = \"label4\";\n this.label4.Size = new System.Drawing.Size(390, 12);\n this.label4.TabIndex = 18;\n this.label4.Text = \"公益项目!请给我一个免费的点赞和订阅!ヾ(≧∇≦*)ゝ万分感谢!!!\";\n // \n // about\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.AutoSize = true;\n this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\n this.ClientSize = new System.Drawing.Size(598, 651);\n this.Controls.Add(this.groupBox4);\n this.Controls.Add(this.button1);\n this.Controls.Add(this.groupBox3);\n this.Controls.Add(this.groupBox2);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.label1);\n this.MaximizeBox = false;\n this.MinimizeBox = false;\n this.Name = \"about\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"关于 SubsCheck Win GUI\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.groupBox2.ResumeLayout(false);\n this.groupBox2.PerformLayout();\n this.groupBox3.ResumeLayout(false);\n this.groupBox3.PerformLayout();\n this.groupBox4.ResumeLayout(false);\n this.groupBox4.PerformLayout();\n this.ResumeLayout(false);\n this.PerformLayout();\n\n }\n\n #endregion\n\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.Label label1;\n private System.Windows.Forms.Label label2;\n private System.Windows.Forms.Label label3;\n private System.Windows.Forms.Label label5;\n private System.Windows.Forms.LinkLabel linkLabel1;\n private System.Windows.Forms.Label label6;\n private System.Windows.Forms.Label label7;\n private System.Windows.Forms.LinkLabel linkLabel2;\n private System.Windows.Forms.Label label8;\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.LinkLabel linkLabel3;\n private System.Windows.Forms.Label label11;\n private System.Windows.Forms.Label label10;\n private System.Windows.Forms.Label label9;\n private System.Windows.Forms.LinkLabel linkLabel4;\n private System.Windows.Forms.Label label12;\n private System.Windows.Forms.Label label13;\n private System.Windows.Forms.GroupBox groupBox2;\n private System.Windows.Forms.Label label14;\n private System.Windows.Forms.GroupBox groupBox3;\n private System.Windows.Forms.LinkLabel linkLabel6;\n private System.Windows.Forms.LinkLabel linkLabel5;\n private System.Windows.Forms.Label label15;\n private System.Windows.Forms.LinkLabel linkLabel8;\n private System.Windows.Forms.GroupBox groupBox4;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.Label label4;\n }\n}"], ["/SubsCheck-Win-GUI/Form1.Designer.cs", "namespace subs_check.win.gui\n{\n partial class Form1\n {\n /// \n /// 必需的设计器变量。\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// 清理所有正在使用的资源。\n /// \n /// 如果应释放托管资源,为 true;否则为 false。\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows 窗体设计器生成的代码\n\n /// \n /// 设计器支持所需的方法 - 不要修改\n /// 使用代码编辑器修改此方法的内容。\n /// \n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));\n this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.checkBox5 = new System.Windows.Forms.CheckBox();\n this.textBox11 = new System.Windows.Forms.TextBox();\n this.button7 = new System.Windows.Forms.Button();\n this.button6 = new System.Windows.Forms.Button();\n this.comboBox4 = new System.Windows.Forms.ComboBox();\n this.button3 = new System.Windows.Forms.Button();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.numericUpDown4 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown3 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();\n this.label7 = new System.Windows.Forms.Label();\n this.label6 = new System.Windows.Forms.Label();\n this.label3 = new System.Windows.Forms.Label();\n this.label2 = new System.Windows.Forms.Label();\n this.label1 = new System.Windows.Forms.Label();\n this.button2 = new System.Windows.Forms.Button();\n this.button1 = new System.Windows.Forms.Button();\n this.label8 = new System.Windows.Forms.Label();\n this.numericUpDown6 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown5 = new System.Windows.Forms.NumericUpDown();\n this.label4 = new System.Windows.Forms.Label();\n this.label5 = new System.Windows.Forms.Label();\n this.numericUpDown7 = new System.Windows.Forms.NumericUpDown();\n this.label20 = new System.Windows.Forms.Label();\n this.groupBox2 = new System.Windows.Forms.GroupBox();\n this.linkLabel1 = new System.Windows.Forms.LinkLabel();\n this.button5 = new System.Windows.Forms.Button();\n this.richTextBox1 = new System.Windows.Forms.RichTextBox();\n this.groupBox3 = new System.Windows.Forms.GroupBox();\n this.button8 = new System.Windows.Forms.Button();\n this.textBox10 = new System.Windows.Forms.TextBox();\n this.checkBox4 = new System.Windows.Forms.CheckBox();\n this.numericUpDown8 = new System.Windows.Forms.NumericUpDown();\n this.checkBox3 = new System.Windows.Forms.CheckBox();\n this.button4 = new System.Windows.Forms.Button();\n this.checkBox1 = new System.Windows.Forms.CheckBox();\n this.checkBox2 = new System.Windows.Forms.CheckBox();\n this.comboBox5 = new System.Windows.Forms.ComboBox();\n this.label19 = new System.Windows.Forms.Label();\n this.comboBox3 = new System.Windows.Forms.ComboBox();\n this.label10 = new System.Windows.Forms.Label();\n this.comboBox2 = new System.Windows.Forms.ComboBox();\n this.label9 = new System.Windows.Forms.Label();\n this.progressBar1 = new System.Windows.Forms.ProgressBar();\n this.timer2 = new System.Windows.Forms.Timer(this.components);\n this.groupBox4 = new System.Windows.Forms.GroupBox();\n this.textBox4 = new System.Windows.Forms.TextBox();\n this.label13 = new System.Windows.Forms.Label();\n this.textBox3 = new System.Windows.Forms.TextBox();\n this.label12 = new System.Windows.Forms.Label();\n this.textBox2 = new System.Windows.Forms.TextBox();\n this.label11 = new System.Windows.Forms.Label();\n this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);\n this.groupBox5 = new System.Windows.Forms.GroupBox();\n this.textBox6 = new System.Windows.Forms.TextBox();\n this.label15 = new System.Windows.Forms.Label();\n this.textBox7 = new System.Windows.Forms.TextBox();\n this.label16 = new System.Windows.Forms.Label();\n this.groupBox6 = new System.Windows.Forms.GroupBox();\n this.textBox5 = new System.Windows.Forms.TextBox();\n this.label14 = new System.Windows.Forms.Label();\n this.textBox8 = new System.Windows.Forms.TextBox();\n this.label17 = new System.Windows.Forms.Label();\n this.textBox9 = new System.Windows.Forms.TextBox();\n this.label18 = new System.Windows.Forms.Label();\n this.timer3 = new System.Windows.Forms.Timer(this.components);\n this.timer4 = new System.Windows.Forms.Timer(this.components);\n this.groupBox1.SuspendLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown7)).BeginInit();\n this.groupBox2.SuspendLayout();\n this.groupBox3.SuspendLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown8)).BeginInit();\n this.groupBox4.SuspendLayout();\n this.groupBox5.SuspendLayout();\n this.groupBox6.SuspendLayout();\n this.SuspendLayout();\n // \n // notifyIcon1\n // \n this.notifyIcon1.BalloonTipTitle = \"Subs-Check\";\n this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject(\"notifyIcon1.Icon\")));\n this.notifyIcon1.Text = \"Subs-Check:未运行\";\n this.notifyIcon1.Visible = true;\n this.notifyIcon1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon1_MouseClick);\n // \n // timer1\n // \n this.timer1.Enabled = true;\n this.timer1.Interval = 1;\n this.timer1.Tick += new System.EventHandler(this.timer1_Tick);\n // \n // groupBox1\n // \n this.groupBox1.Controls.Add(this.checkBox5);\n this.groupBox1.Controls.Add(this.textBox11);\n this.groupBox1.Controls.Add(this.button7);\n this.groupBox1.Controls.Add(this.button6);\n this.groupBox1.Controls.Add(this.comboBox4);\n this.groupBox1.Controls.Add(this.button3);\n this.groupBox1.Controls.Add(this.textBox1);\n this.groupBox1.Controls.Add(this.comboBox1);\n this.groupBox1.Controls.Add(this.numericUpDown4);\n this.groupBox1.Controls.Add(this.numericUpDown3);\n this.groupBox1.Controls.Add(this.numericUpDown2);\n this.groupBox1.Controls.Add(this.numericUpDown1);\n this.groupBox1.Controls.Add(this.label7);\n this.groupBox1.Controls.Add(this.label6);\n this.groupBox1.Controls.Add(this.label3);\n this.groupBox1.Controls.Add(this.label2);\n this.groupBox1.Controls.Add(this.label1);\n this.groupBox1.Controls.Add(this.button2);\n this.groupBox1.Controls.Add(this.button1);\n this.groupBox1.Controls.Add(this.label8);\n this.groupBox1.Location = new System.Drawing.Point(13, 13);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(174, 484);\n this.groupBox1.TabIndex = 0;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"参数设置\";\n // \n // checkBox5\n // \n this.checkBox5.AutoSize = true;\n this.checkBox5.Location = new System.Drawing.Point(91, 428);\n this.checkBox5.Name = \"checkBox5\";\n this.checkBox5.Size = new System.Drawing.Size(72, 16);\n this.checkBox5.TabIndex = 30;\n this.checkBox5.Text = \"开机自启\";\n this.checkBox5.UseVisualStyleBackColor = true;\n this.checkBox5.CheckedChanged += new System.EventHandler(this.checkBox5_CheckedChanged);\n // \n // textBox11\n // \n this.textBox11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox11.Location = new System.Drawing.Point(9, 343);\n this.textBox11.Name = \"textBox11\";\n this.textBox11.Size = new System.Drawing.Size(154, 21);\n this.textBox11.TabIndex = 21;\n this.textBox11.Text = \"0 */2 * * *\";\n this.textBox11.Visible = false;\n this.textBox11.DoubleClick += new System.EventHandler(this.切换cron表达式);\n this.textBox11.Leave += new System.EventHandler(this.textBox11_Leave);\n // \n // button7\n // \n this.button7.Enabled = false;\n this.button7.Location = new System.Drawing.Point(7, 399);\n this.button7.Name = \"button7\";\n this.button7.Size = new System.Drawing.Size(75, 23);\n this.button7.TabIndex = 30;\n this.button7.Text = \"🔀未启动\";\n this.button7.UseVisualStyleBackColor = true;\n this.button7.Click += new System.EventHandler(this.button7_Click);\n // \n // button6\n // \n this.button6.Enabled = false;\n this.button6.Location = new System.Drawing.Point(88, 399);\n this.button6.Name = \"button6\";\n this.button6.Size = new System.Drawing.Size(75, 23);\n this.button6.TabIndex = 29;\n this.button6.Text = \"访问WebUI\";\n this.button6.UseVisualStyleBackColor = true;\n this.button6.Click += new System.EventHandler(this.button6_Click);\n // \n // comboBox4\n // \n this.comboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\n this.comboBox4.FormattingEnabled = true;\n this.comboBox4.Items.AddRange(new object[] {\n \"通用订阅\",\n \"Clash\"});\n this.comboBox4.Location = new System.Drawing.Point(8, 372);\n this.comboBox4.Name = \"comboBox4\";\n this.comboBox4.Size = new System.Drawing.Size(74, 20);\n this.comboBox4.TabIndex = 19;\n // \n // button3\n // \n this.button3.Enabled = false;\n this.button3.Location = new System.Drawing.Point(88, 370);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 18;\n this.button3.Text = \"复制订阅\";\n this.button3.UseVisualStyleBackColor = true;\n this.button3.Click += new System.EventHandler(this.button3_Click);\n // \n // textBox1\n // \n this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox1.Location = new System.Drawing.Point(9, 179);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ReadOnly = true;\n this.textBox1.Size = new System.Drawing.Size(154, 185);\n this.textBox1.TabIndex = 17;\n this.textBox1.Text = resources.GetString(\"textBox1.Text\");\n this.textBox1.WordWrap = false;\n this.textBox1.Click += new System.EventHandler(this.textBox1_DoubleClick);\n this.textBox1.DoubleClick += new System.EventHandler(this.textBox1_DoubleClick);\n // \n // comboBox1\n // \n this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\n this.comboBox1.FormattingEnabled = true;\n this.comboBox1.Items.AddRange(new object[] {\n \"本地\",\n \"gist\",\n \"r2\",\n \"webdav\"});\n this.comboBox1.Location = new System.Drawing.Point(105, 135);\n this.comboBox1.Name = \"comboBox1\";\n this.comboBox1.Size = new System.Drawing.Size(58, 20);\n this.comboBox1.TabIndex = 16;\n this.comboBox1.TextChanged += new System.EventHandler(this.comboBox1_TextChanged);\n // \n // numericUpDown4\n // \n this.numericUpDown4.Location = new System.Drawing.Point(105, 106);\n this.numericUpDown4.Maximum = new decimal(new int[] {\n 20480,\n 0,\n 0,\n 0});\n this.numericUpDown4.Minimum = new decimal(new int[] {\n 128,\n 0,\n 0,\n 0});\n this.numericUpDown4.Name = \"numericUpDown4\";\n this.numericUpDown4.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown4.TabIndex = 13;\n this.numericUpDown4.Value = new decimal(new int[] {\n 1024,\n 0,\n 0,\n 0});\n this.numericUpDown4.ValueChanged += new System.EventHandler(this.numericUpDown4_ValueChanged);\n // \n // numericUpDown3\n // \n this.numericUpDown3.Location = new System.Drawing.Point(105, 77);\n this.numericUpDown3.Maximum = new decimal(new int[] {\n 10000,\n 0,\n 0,\n 0});\n this.numericUpDown3.Minimum = new decimal(new int[] {\n 1000,\n 0,\n 0,\n 0});\n this.numericUpDown3.Name = \"numericUpDown3\";\n this.numericUpDown3.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown3.TabIndex = 12;\n this.numericUpDown3.Value = new decimal(new int[] {\n 5000,\n 0,\n 0,\n 0});\n this.numericUpDown3.ValueChanged += new System.EventHandler(this.numericUpDown3_ValueChanged);\n // \n // numericUpDown2\n // \n this.numericUpDown2.Location = new System.Drawing.Point(105, 48);\n this.numericUpDown2.Maximum = new decimal(new int[] {\n 1440,\n 0,\n 0,\n 0});\n this.numericUpDown2.Minimum = new decimal(new int[] {\n 30,\n 0,\n 0,\n 0});\n this.numericUpDown2.Name = \"numericUpDown2\";\n this.numericUpDown2.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown2.TabIndex = 11;\n this.numericUpDown2.Value = new decimal(new int[] {\n 120,\n 0,\n 0,\n 0});\n this.numericUpDown2.DoubleClick += new System.EventHandler(this.切换cron表达式);\n // \n // numericUpDown1\n // \n this.numericUpDown1.Location = new System.Drawing.Point(105, 19);\n this.numericUpDown1.Maximum = new decimal(new int[] {\n 1024,\n 0,\n 0,\n 0});\n this.numericUpDown1.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown1.Name = \"numericUpDown1\";\n this.numericUpDown1.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown1.TabIndex = 10;\n this.numericUpDown1.Value = new decimal(new int[] {\n 32,\n 0,\n 0,\n 0});\n this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);\n // \n // label7\n // \n this.label7.AutoSize = true;\n this.label7.Location = new System.Drawing.Point(7, 137);\n this.label7.Name = \"label7\";\n this.label7.Size = new System.Drawing.Size(65, 12);\n this.label7.TabIndex = 8;\n this.label7.Text = \"保存方法:\";\n // \n // label6\n // \n this.label6.AutoSize = true;\n this.label6.Location = new System.Drawing.Point(7, 108);\n this.label6.Name = \"label6\";\n this.label6.Size = new System.Drawing.Size(101, 12);\n this.label6.TabIndex = 5;\n this.label6.Text = \"测速下限(KB/s):\";\n // \n // label3\n // \n this.label3.AutoSize = true;\n this.label3.Location = new System.Drawing.Point(7, 79);\n this.label3.Name = \"label3\";\n this.label3.Size = new System.Drawing.Size(101, 12);\n this.label3.TabIndex = 4;\n this.label3.Text = \"超时时间(毫秒):\";\n // \n // label2\n // \n this.label2.AutoSize = true;\n this.label2.Location = new System.Drawing.Point(7, 50);\n this.label2.Name = \"label2\";\n this.label2.Size = new System.Drawing.Size(101, 12);\n this.label2.TabIndex = 3;\n this.label2.Text = \"检查间隔(分钟):\";\n this.label2.DoubleClick += new System.EventHandler(this.切换cron表达式);\n // \n // label1\n // \n this.label1.AutoSize = true;\n this.label1.Location = new System.Drawing.Point(7, 21);\n this.label1.Name = \"label1\";\n this.label1.Size = new System.Drawing.Size(77, 12);\n this.label1.TabIndex = 2;\n this.label1.Text = \"并发线程数:\";\n // \n // button2\n // \n this.button2.Location = new System.Drawing.Point(88, 450);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 1;\n this.button2.Text = \"高级设置∧\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n // \n // button1\n // \n this.button1.Font = new System.Drawing.Font(\"宋体\", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.button1.Location = new System.Drawing.Point(7, 428);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 45);\n this.button1.TabIndex = 0;\n this.button1.Text = \"▶️ 启动\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // label8\n // \n this.label8.AutoSize = true;\n this.label8.Location = new System.Drawing.Point(7, 164);\n this.label8.Name = \"label8\";\n this.label8.Size = new System.Drawing.Size(161, 12);\n this.label8.TabIndex = 9;\n this.label8.Text = \"节点池订阅链接(点击编辑):\";\n this.label8.Click += new System.EventHandler(this.textBox1_DoubleClick);\n // \n // numericUpDown6\n // \n this.numericUpDown6.Location = new System.Drawing.Point(281, 19);\n this.numericUpDown6.Maximum = new decimal(new int[] {\n 65535,\n 0,\n 0,\n 0});\n this.numericUpDown6.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown6.Name = \"numericUpDown6\";\n this.numericUpDown6.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown6.TabIndex = 15;\n this.numericUpDown6.Value = new decimal(new int[] {\n 8199,\n 0,\n 0,\n 0});\n this.numericUpDown6.ValueChanged += new System.EventHandler(this.numericUpDown6_ValueChanged);\n // \n // numericUpDown5\n // \n this.numericUpDown5.Location = new System.Drawing.Point(281, 45);\n this.numericUpDown5.Maximum = new decimal(new int[] {\n 10,\n 0,\n 0,\n 0});\n this.numericUpDown5.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown5.Name = \"numericUpDown5\";\n this.numericUpDown5.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown5.TabIndex = 14;\n this.numericUpDown5.Value = new decimal(new int[] {\n 10,\n 0,\n 0,\n 0});\n // \n // label4\n // \n this.label4.AutoSize = true;\n this.label4.Location = new System.Drawing.Point(191, 21);\n this.label4.Name = \"label4\";\n this.label4.Size = new System.Drawing.Size(89, 12);\n this.label4.TabIndex = 7;\n this.label4.Text = \"HTTP服务端口:\";\n // \n // label5\n // \n this.label5.AutoSize = true;\n this.label5.Location = new System.Drawing.Point(191, 48);\n this.label5.Name = \"label5\";\n this.label5.Size = new System.Drawing.Size(89, 12);\n this.label5.TabIndex = 6;\n this.label5.Text = \"测速时间(秒):\";\n // \n // numericUpDown7\n // \n this.numericUpDown7.Location = new System.Drawing.Point(441, 19);\n this.numericUpDown7.Maximum = new decimal(new int[] {\n 65535,\n 0,\n 0,\n 0});\n this.numericUpDown7.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown7.Name = \"numericUpDown7\";\n this.numericUpDown7.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown7.TabIndex = 21;\n this.numericUpDown7.Value = new decimal(new int[] {\n 8299,\n 0,\n 0,\n 0});\n this.numericUpDown7.ValueChanged += new System.EventHandler(this.numericUpDown6_ValueChanged);\n // \n // label20\n // \n this.label20.AutoSize = true;\n this.label20.Location = new System.Drawing.Point(345, 21);\n this.label20.Name = \"label20\";\n this.label20.Size = new System.Drawing.Size(95, 12);\n this.label20.TabIndex = 20;\n this.label20.Text = \"Sub-Store端口:\";\n // \n // groupBox2\n // \n this.groupBox2.Controls.Add(this.linkLabel1);\n this.groupBox2.Controls.Add(this.button5);\n this.groupBox2.Controls.Add(this.richTextBox1);\n this.groupBox2.Location = new System.Drawing.Point(193, 13);\n this.groupBox2.Name = \"groupBox2\";\n this.groupBox2.Size = new System.Drawing.Size(600, 484);\n this.groupBox2.TabIndex = 1;\n this.groupBox2.TabStop = false;\n this.groupBox2.Text = \"实时日志\";\n // \n // linkLabel1\n // \n this.linkLabel1.AutoSize = true;\n this.linkLabel1.Location = new System.Drawing.Point(460, 2);\n this.linkLabel1.Name = \"linkLabel1\";\n this.linkLabel1.Size = new System.Drawing.Size(137, 12);\n this.linkLabel1.TabIndex = 21;\n this.linkLabel1.TabStop = true;\n this.linkLabel1.Text = \"关于 SubsCheck Win GUI\";\n this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);\n // \n // button5\n // \n this.button5.Location = new System.Drawing.Point(515, 450);\n this.button5.Name = \"button5\";\n this.button5.Size = new System.Drawing.Size(75, 23);\n this.button5.TabIndex = 20;\n this.button5.Text = \"更新内核\";\n this.button5.UseVisualStyleBackColor = true;\n this.button5.Visible = false;\n this.button5.Click += new System.EventHandler(this.button5_Click);\n // \n // richTextBox1\n // \n this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;\n this.richTextBox1.Location = new System.Drawing.Point(3, 17);\n this.richTextBox1.Name = \"richTextBox1\";\n this.richTextBox1.ReadOnly = true;\n this.richTextBox1.Size = new System.Drawing.Size(594, 464);\n this.richTextBox1.TabIndex = 0;\n this.richTextBox1.Text = \"\";\n this.richTextBox1.DoubleClick += new System.EventHandler(this.richTextBox1_DoubleClick);\n // \n // groupBox3\n // \n this.groupBox3.Controls.Add(this.button8);\n this.groupBox3.Controls.Add(this.textBox10);\n this.groupBox3.Controls.Add(this.checkBox4);\n this.groupBox3.Controls.Add(this.numericUpDown8);\n this.groupBox3.Controls.Add(this.checkBox3);\n this.groupBox3.Controls.Add(this.button4);\n this.groupBox3.Controls.Add(this.checkBox1);\n this.groupBox3.Controls.Add(this.numericUpDown6);\n this.groupBox3.Controls.Add(this.checkBox2);\n this.groupBox3.Controls.Add(this.numericUpDown5);\n this.groupBox3.Controls.Add(this.comboBox5);\n this.groupBox3.Controls.Add(this.label19);\n this.groupBox3.Controls.Add(this.comboBox3);\n this.groupBox3.Controls.Add(this.label10);\n this.groupBox3.Controls.Add(this.label4);\n this.groupBox3.Controls.Add(this.comboBox2);\n this.groupBox3.Controls.Add(this.label9);\n this.groupBox3.Controls.Add(this.label5);\n this.groupBox3.Controls.Add(this.numericUpDown7);\n this.groupBox3.Controls.Add(this.label20);\n this.groupBox3.Location = new System.Drawing.Point(13, 503);\n this.groupBox3.Name = \"groupBox3\";\n this.groupBox3.Size = new System.Drawing.Size(780, 103);\n this.groupBox3.TabIndex = 2;\n this.groupBox3.TabStop = false;\n this.groupBox3.Text = \"高级设置\";\n this.groupBox3.Visible = false;\n // \n // button8\n // \n this.button8.Location = new System.Drawing.Point(695, 43);\n this.button8.Name = \"button8\";\n this.button8.Size = new System.Drawing.Size(75, 23);\n this.button8.TabIndex = 29;\n this.button8.Text = \"补充参数\";\n this.button8.UseVisualStyleBackColor = true;\n this.button8.Click += new System.EventHandler(this.button8_Click);\n // \n // textBox10\n // \n this.textBox10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox10.Enabled = false;\n this.textBox10.Location = new System.Drawing.Point(141, 73);\n this.textBox10.Name = \"textBox10\";\n this.textBox10.PasswordChar = '*';\n this.textBox10.Size = new System.Drawing.Size(110, 21);\n this.textBox10.TabIndex = 6;\n this.textBox10.Text = \"admin\";\n this.textBox10.Enter += new System.EventHandler(this.textBox10_Enter);\n this.textBox10.Leave += new System.EventHandler(this.textBox10_Leave);\n // \n // checkBox4\n // \n this.checkBox4.AutoSize = true;\n this.checkBox4.Location = new System.Drawing.Point(9, 75);\n this.checkBox4.Name = \"checkBox4\";\n this.checkBox4.Size = new System.Drawing.Size(138, 16);\n this.checkBox4.TabIndex = 28;\n this.checkBox4.Text = \"启用WebUI API密钥:\";\n this.checkBox4.UseVisualStyleBackColor = true;\n this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox4_CheckedChanged);\n // \n // numericUpDown8\n // \n this.numericUpDown8.Enabled = false;\n this.numericUpDown8.Location = new System.Drawing.Point(122, 45);\n this.numericUpDown8.Maximum = new decimal(new int[] {\n 65535,\n 0,\n 0,\n 0});\n this.numericUpDown8.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown8.Name = \"numericUpDown8\";\n this.numericUpDown8.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown8.TabIndex = 22;\n this.numericUpDown8.Value = new decimal(new int[] {\n 100,\n 0,\n 0,\n 0});\n // \n // checkBox3\n // \n this.checkBox3.AutoSize = true;\n this.checkBox3.Location = new System.Drawing.Point(9, 48);\n this.checkBox3.Name = \"checkBox3\";\n this.checkBox3.Size = new System.Drawing.Size(108, 16);\n this.checkBox3.TabIndex = 27;\n this.checkBox3.Text = \"节点保存数目:\";\n this.checkBox3.UseVisualStyleBackColor = true;\n this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged);\n // \n // button4\n // \n this.button4.Location = new System.Drawing.Point(695, 71);\n this.button4.Name = \"button4\";\n this.button4.Size = new System.Drawing.Size(75, 23);\n this.button4.TabIndex = 26;\n this.button4.Text = \"检查更新\";\n this.button4.UseVisualStyleBackColor = true;\n this.button4.Click += new System.EventHandler(this.button4_Click);\n // \n // checkBox1\n // \n this.checkBox1.AutoSize = true;\n this.checkBox1.Checked = true;\n this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;\n this.checkBox1.Location = new System.Drawing.Point(9, 20);\n this.checkBox1.Name = \"checkBox1\";\n this.checkBox1.Size = new System.Drawing.Size(96, 16);\n this.checkBox1.TabIndex = 22;\n this.checkBox1.Text = \"节点地址查询\";\n this.checkBox1.UseVisualStyleBackColor = true;\n this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);\n // \n // checkBox2\n // \n this.checkBox2.AutoSize = true;\n this.checkBox2.Location = new System.Drawing.Point(106, 20);\n this.checkBox2.Name = \"checkBox2\";\n this.checkBox2.Size = new System.Drawing.Size(84, 16);\n this.checkBox2.TabIndex = 25;\n this.checkBox2.Text = \"流媒体检测\";\n this.checkBox2.UseVisualStyleBackColor = true;\n this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);\n // \n // comboBox5\n // \n this.comboBox5.FormattingEnabled = true;\n this.comboBox5.Items.AddRange(new object[] {\n \"[内置]布丁狗的订阅转换\",\n \"[内置]ACL4SSR_Online_Full\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/布丁狗的订阅转\" +\n \"换.yaml\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/ACL4SSR\" +\n \"_Online_Full.yaml\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/ACL4SSR\" +\n \"_Online_Full_WithIcon.yaml\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/添加直连规则.\" +\n \"yaml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/布丁狗的订阅转换.y\" +\n \"aml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/ACL4SSR_On\" +\n \"line_Full.yaml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/ACL4SSR_On\" +\n \"line_Full_WithIcon.yaml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/添加直连规则.yam\" +\n \"l\"});\n this.comboBox5.Location = new System.Drawing.Point(414, 73);\n this.comboBox5.Name = \"comboBox5\";\n this.comboBox5.Size = new System.Drawing.Size(275, 20);\n this.comboBox5.TabIndex = 24;\n this.comboBox5.SelectedIndexChanged += new System.EventHandler(this.comboBox5_SelectedIndexChanged);\n // \n // label19\n // \n this.label19.AutoSize = true;\n this.label19.Location = new System.Drawing.Point(260, 76);\n this.label19.Name = \"label19\";\n this.label19.Size = new System.Drawing.Size(149, 12);\n this.label19.TabIndex = 23;\n this.label19.Text = \"Clash订阅 覆写配置文件:\";\n // \n // comboBox3\n // \n this.comboBox3.FormattingEnabled = true;\n this.comboBox3.Items.AddRange(new object[] {\n \"自动选择\",\n \"1.github.010716.xyz\",\n \"113355.kabaka.xyz\",\n \"80888888.xyz\",\n \"aa.w0x7ce.eu\",\n \"acc.meiqer.com\",\n \"api-ghp.fjy.zone\",\n \"armg1.jyhk.tk\",\n \"armg2.jyhk.tk\",\n \"b.yesican.top\",\n \"bakht1.jsdelivr.fyi\",\n \"bakht2.jsdelivr.fyi\",\n \"bakht3.jsdelivr.fyi\",\n \"booster.ookkk.ggff.net\",\n \"c.gatepro.cn\",\n \"cc.ikakatoo.us\",\n \"ccgit1.5gyh.cf\",\n \"ccgit2.5gyh.cf\",\n \"cdn-gh.141888.xyz\",\n \"cfghproxy.165683.xyz\",\n \"chirophy.online\",\n \"choner.eu.org\",\n \"d.scyun.top\",\n \"daili.6dot.cn\",\n \"dh.guluy.top\",\n \"dh.jeblove.com\",\n \"dl.github.mirror.shalo.link\",\n \"dnsvip.uk\",\n \"docker.bkxhkoo.com\",\n \"docker.ppp.ac.cn\",\n \"down.avi.gs\",\n \"download.ojbk.one\",\n \"download.serein.cc\",\n \"f.shenbing.nyc.mn\",\n \"fastgithub.starryfun.icu\",\n \"file.justgame.top\",\n \"ft.v1k1.xin\",\n \"fuck-flow.nobige.cn\",\n \"g.108964.xyz\",\n \"g.blfrp.cn\",\n \"g.bravexist.cn\",\n \"g.down.0ms.net\",\n \"g.jscdn.cn\",\n \"g.yeyuqiufeng.cn\",\n \"gh.136361.xyz\",\n \"gh.13x.plus\",\n \"gh.19121912.xyz\",\n \"gh.193.gs\",\n \"gh.220106.xyz\",\n \"gh.222322.xyz\",\n \"gh.244224659.xyz\",\n \"gh.2i.gs\",\n \"gh.316688.xyz\",\n \"gh.321122.xyz\",\n \"gh.334433.xyz\",\n \"gh.39.al\",\n \"gh.518298.xyz\",\n \"gh.52099520.xyz\",\n \"gh.654535.xyz\",\n \"gh.777000.best\",\n \"gh.799154.xyz\",\n \"gh.860686.xyz\",\n \"gh.8p.gs\",\n \"gh.960980.xyz\",\n \"gh.accn.eu.org\",\n \"gh.amirrors.com\",\n \"gh.andiest.com\",\n \"gh.aurzex.top\",\n \"gh.avmine.com\",\n \"gh.b52m.cn\",\n \"gh.bhexo.cn\",\n \"gh.cdn.fullcone.cn\",\n \"gh.chewable.eu.org\",\n \"gh.chillwaytech.com\",\n \"gh.cnbattle.com\",\n \"gh.crond.dev\",\n \"gh.dev.438250.xyz\",\n \"gh.duang.io\",\n \"gh.duckcc.com\",\n \"gh.dwsy.link\",\n \"gh.ecdn.ip-ddns.com\",\n \"gh.flewsea.news\",\n \"gh.flewsea.pw\",\n \"gh.flyrr.cc\",\n \"gh.gongyi.tk\",\n \"gh.gorun.eu.org\",\n \"gh.gxb.pub\",\n \"gh.haloless.com\",\n \"gh.heshiheng.top\",\n \"gh.hitcs.cc\",\n \"gh.i3.pw\",\n \"gh.ibridge.eu.org\",\n \"gh.iinx.top\",\n \"gh.j8.work\",\n \"gh.jadelive.top\",\n \"gh.jscdn.cn\",\n \"gh.jxq.io\",\n \"gh.kejilion.pro\",\n \"gh.kemon.ai\",\n \"gh.kmxm.online\",\n \"gh.lib.cx\",\n \"gh.lkwplus.com\",\n \"gh.lux1983.com\",\n \"gh.luzy.top\",\n \"gh.lyh.moe\",\n \"gh.miaomiao.video\",\n \"gh.micedns.cloudns.org\",\n \"gh.mirror.190211.xyz\",\n \"gh.mirror.coolfeature.top\",\n \"gh.moetools.net\",\n \"gh.momonomi.xyz\",\n \"gh.mrskye.cn\",\n \"gh.mtx72.cc\",\n \"gh.nekhill.top\",\n \"gh.nekorect.eu.org\",\n \"gh.nextfuture.top\",\n \"gh.oevery.me\",\n \"gh.oneproxy.top\",\n \"gh.opsproxy.com\",\n \"gh.osspub.cn\",\n \"gh.padao.fun\",\n \"gh.prlrr.com\",\n \"gh.pylas.xyz\",\n \"gh.qptf.eu.org\",\n \"gh.qsd.onl\",\n \"gh.qsq.one\",\n \"gh.rem.asia\",\n \"gh.riye.de\",\n \"gh.scy.ink\",\n \"gh.someo.top\",\n \"gh.stanl.ee\",\n \"gh.stewitch.com\",\n \"gh.suite.eu.org\",\n \"gh.tbw.wiki\",\n \"gh.tou.lu\",\n \"gh.tryxd.cn\",\n \"gh.uclort.com\",\n \"gh.wglee.org\",\n \"gh.wowforever.xyz\",\n \"gh.wuuu.cc\",\n \"gh.wwang.de\",\n \"gh.wygg.us.kg\",\n \"gh.xbzza.cn\",\n \"gh.xda.plus\",\n \"gh.yahool.com.cn\",\n \"gh.yushum.com\",\n \"ghac.760710.xyz\",\n \"ghacc.cpuhk.eu.org\",\n \"ghb.wglee.org\",\n \"gh-boost.oneboy.app\",\n \"gh-deno.mocn.top\",\n \"ghfast.top\",\n \"ghjs.131412.eu.org\",\n \"ghp.618032.xyz\",\n \"ghp.9e6.site\",\n \"ghp.dnsplus.uk\",\n \"ghp.fit2.fun\",\n \"ghp.imc.re\",\n \"ghp.jokeme.top\",\n \"ghp.lanchonghai.com\",\n \"ghp.miaostay.com\",\n \"ghp.opendatahub.xyz\",\n \"ghp.pbren.com\",\n \"ghp.src.moe\",\n \"ghp.tryanks.com\",\n \"ghp.vatery.com\",\n \"ghp.xiaopan.ai\",\n \"ghp.ybot.xin\",\n \"ghp.yeye.f5.si\",\n \"ghproxy.0081024.xyz\",\n \"ghproxy.053000.xyz\",\n \"ghproxy.200502.xyz\",\n \"ghproxy.943689.xyz\",\n \"ghproxy.alltobid.cc\",\n \"ghproxy.amayakite.xyz\",\n \"ghproxy.bugungu.top\",\n \"gh-proxy.dorz.tech\",\n \"ghproxy.dsdog.tk\",\n \"ghproxy.ducknet.work\",\n \"ghproxy.gopher.ink\",\n \"ghproxy.gpnu.org\",\n \"ghproxy.hoshizukimio.top\",\n \"gh-proxy.iflyelf.com\",\n \"ghproxy.imoyuapp.win\",\n \"gh-proxy.jacksixth.top\",\n \"gh-proxy.jmper.me\",\n \"ghproxy.joylian.com\",\n \"gh-proxy.just520.top\",\n \"ghproxy.licardo.vip\",\n \"gh-proxy.mereith.com\",\n \"ghproxy.minge.dev\",\n \"ghproxy.missfuture.eu.org\",\n \"ghproxy.moweilong.com\",\n \"ghproxy.nanakorobi.com\",\n \"ghproxy.net\",\n \"gh-proxy.not.icu\",\n \"ghproxy.ownyuan.top\",\n \"gh-proxy.rxliuli.com\",\n \"ghproxy.sakuramoe.dev\",\n \"ghproxy.smallfawn.work\",\n \"ghproxy.sveir.xyz\",\n \"ghproxy.temoa.fun\",\n \"ghproxy.thefoxnet.com\",\n \"ghproxy.tracemouse.top\",\n \"ghproxy.txq.life\",\n \"ghproxy.viper.pub\",\n \"ghproxy.vyronlee-lab.com\",\n \"ghproxy.weizhiwen.net\",\n \"ghproxy.wjsphy.top\",\n \"ghproxy.workers.haoutil.com\",\n \"ghproxy.xiaohei-studio-chatgpt-proxy.com.cn\",\n \"gh-proxy.yuntao.me\",\n \"git.1999111.xyz\",\n \"git.22345678.xyz\",\n \"git.40609891.xyz\",\n \"git.5gyh.cf\",\n \"git.988896.xyz\",\n \"git.aaltozz.info\",\n \"git.acap.cc\",\n \"git.amoluo.win\",\n \"git.anye.in\",\n \"git.binbow.link\",\n \"git.blaow.cloudns.org\",\n \"git.closersyu.top\",\n \"git.ifso.site\",\n \"git.imvery.moe\",\n \"git.ixdd.de\",\n \"git.ldvx.de\",\n \"git.lincloud.pro\",\n \"git.liunasc.xyz\",\n \"git.llvho.com\",\n \"git.loushi.site\",\n \"git.lzzz.ink\",\n \"git.maomao.ovh\",\n \"git.mokoc.live\",\n \"git.niege.app\",\n \"git.nyar.work\",\n \"git.o8.cx\",\n \"git.outtw.com\",\n \"git.ppp.ac.cn\",\n \"git.repcz.link\",\n \"git.txaff.com\",\n \"git.verynb.org\",\n \"git.wsl.icu\",\n \"git.wyy.sh\",\n \"git.xiny.eu.org\",\n \"git.xuantan.icu\",\n \"git.zlong.eu.org\",\n \"git3.openapi.site\",\n \"git-clone.ccrui.dev\",\n \"github.08050611.xyz\",\n \"github.143760.xyz\",\n \"github.170011.xyz\",\n \"github.17263241.xyz\",\n \"github.180280.xyz\",\n \"github.197909.xyz\",\n \"github.19890821.xyz\",\n \"github.201068.xyz\",\n \"github.333033.xyz\",\n \"github.4240333.xyz\",\n \"github.564456.xyz\",\n \"github.732086.xyz\",\n \"github.776884.xyz\",\n \"github.789056.xyz\",\n \"github.818668.xyz\",\n \"github.8void.sbs\",\n \"github.9394961.xyz\",\n \"github.960118.xyz\",\n \"github.abyss.moe\",\n \"github.atzzz.com\",\n \"github.axcio.dns-dynamic.net\",\n \"github.boki.moe\",\n \"github.boringhex.top\",\n \"github.bullb.net\",\n \"github.c1g.top\",\n \"github.cf.xihale.top\",\n \"github.chasun.top\",\n \"github.chuancey.eu.org\",\n \"github.cnxiaobai.com\",\n \"github.computerqwq.top\",\n \"github.cswklt.top\",\n \"github.ctios.cn\",\n \"github.ddlink.asia\",\n \"github.dockerspeed.site\",\n \"github.eejsq.net\",\n \"github.ffffffff0x.com\",\n \"github.gdzja.site\",\n \"github.haodiy.xyz\",\n \"github.hhh.sd\",\n \"github.hi.edu.rs\",\n \"github.hostscc.top\",\n \"github.hx208.top\",\n \"github.ilxyz.xyz\",\n \"github.intellisensing.tech\",\n \"github.jerryliang.win\",\n \"github.jimmyshjj.top\",\n \"github.jinenyy.vip\",\n \"github.jscdn.cn\",\n \"github.kidos.top\",\n \"github.kuugo.top\",\n \"github.lao.plus\",\n \"github.mayx.eu.org\",\n \"github.mirror.qlnu-sec.cn\",\n \"github.mirror.vurl.eu.org\",\n \"github.mirrors.hikafeng.com\",\n \"github.mistudio.top\",\n \"github.orangbus.cn\",\n \"github.pipers.cn\",\n \"github.proxy.zerozone.tech\",\n \"github.pxy.lnsee.com\",\n \"github.quickso.net\",\n \"github.ruxi.org\",\n \"github.sagolu.top\",\n \"github.serein.cc\",\n \"github.snakexgc.com\",\n \"github.space520.eu.org\",\n \"github.sssss.work\",\n \"github.static.cv\",\n \"github.suyijun.top\",\n \"github.try255.com\",\n \"github.unipus.site\",\n \"github.verynb.org\",\n \"github.vipchanel.com\",\n \"github.widiazine.top\",\n \"github.workers.lv10.ren\",\n \"github.workersnail.com\",\n \"github.xin-yu.cloud\",\n \"github.xiongmx.com\",\n \"github.xwb009.xyz\",\n \"github.xxlab.tech\",\n \"github.xxqq.de\",\n \"github.xykcloud.com\",\n \"github.yeep6.eu.org\",\n \"github.ylyhtools.top\",\n \"github.yoloarea.com\",\n \"github.yunfile.fun\",\n \"github.zhaolele.top\",\n \"github.zhou2008.cn\",\n \"github.zhulin240520.buzz\",\n \"github.zyhmifan.top\",\n \"githubacc.caiaiwan.com\",\n \"githubapi.jjchizha.com\",\n \"githubgo.856798.xyz\",\n \"github-proxy.ai-lulu.top\",\n \"github-proxy.caoayu.top\",\n \"github-proxy.explorexd.uk\",\n \"github-proxy.fjiabinc.cn\",\n \"github-proxy.sharefree.site\",\n \"githubproxy.unix.do\",\n \"github-quick.1ms.dev\",\n \"github-raw-download.nekhill.top\",\n \"githubsg.lilyya.top\",\n \"gitproxy.mrhjx.cn\",\n \"gitproxy.ozoo.top\",\n \"godlike.ezpull.top\",\n \"gp.19841106.xyz\",\n \"gp.dahe.now.cc\",\n \"gp.daxei.now.cc\",\n \"g-p.loli.us\",\n \"gp.ownorigin.top\",\n \"gt.changqqq.xyz\",\n \"gxb.pub\",\n \"hay.uxio.cn\",\n \"hg.19840228.top\",\n \"hh.newhappy.cf\",\n \"hk.114914.xyz\",\n \"hub.12138.3653655.xyz\",\n \"hub.326998.xyz\",\n \"hub.885666.xyz\",\n \"hub.fnas64.xin\",\n \"hub.jeblove.com\",\n \"hub.naloong.de\",\n \"hub.vps.861020.xyz\",\n \"hub.vvn.me\",\n \"hub.why-ing.top\",\n \"hub.xjl.ch\",\n \"jh.ussh.net\",\n \"jias.ayanjiu.top\",\n \"jiasu.iwtriptqt1016.eu.org\",\n \"jiasughapi.lingjun.cc\",\n \"jiasuqi.167889.xyz\",\n \"jisuan.xyz\",\n \"js.wd666.cloudns.biz\",\n \"l0l0l.cc\",\n \"m.seafood.loan\",\n \"mc.cn.eu.org\",\n \"mdv.162899.xyz\",\n \"micromatrix.gq\",\n \"mip.cnzzla.com\",\n \"my.iiso.site\",\n \"my.losesw.live\",\n \"mygh.api.xiaomao.eu.org\",\n \"nav.253874.net\",\n \"nav.cxycsx.vip\",\n \"nav.gjcloak.xyz\",\n \"nav.hgd1999.com\",\n \"nav.hoiho.cn\",\n \"nav.syss.fun\",\n \"nav.tossp.com\",\n \"nav.wxapp.xyz\",\n \"nav.yyxw.tk\",\n \"navs.itmax.cn\",\n \"neoz.chat\",\n \"noad.keliyan.top\",\n \"node2.txq.life\",\n \"or.tianba.eu.org\",\n \"p.jackyu.cn\",\n \"privateghproxy.iil.im\",\n \"proxy.191027.xyz\",\n \"proxy.atoposs.com\",\n \"proxy.ccc8.vip\",\n \"proxy.dragontea.cc\",\n \"proxy.fakups.cn\",\n \"proxydl.lcayun.cn\",\n \"proxy-gh.1l1.icu\",\n \"q-github.cnxiaobai.com\",\n \"ql.l50.top\",\n \"raw.nmd.im\",\n \"rst.567812.xyz\",\n \"static.kaixinwu.vip\",\n \"static.yiwangmeng.com\",\n \"t.992699.xyz\",\n \"tpe.corpa.me\",\n \"tube.20140301.xyz\",\n \"vps.pansen626.com\",\n \"wfgithub.xiaonuomi.ie.eu.org\"});\n this.comboBox3.Location = new System.Drawing.Point(600, 19);\n this.comboBox3.Name = \"comboBox3\";\n this.comboBox3.Size = new System.Drawing.Size(170, 20);\n this.comboBox3.TabIndex = 21;\n this.comboBox3.Leave += new System.EventHandler(this.comboBox3_Leave);\n // \n // label10\n // \n this.label10.AutoSize = true;\n this.label10.Location = new System.Drawing.Point(505, 21);\n this.label10.Name = \"label10\";\n this.label10.Size = new System.Drawing.Size(89, 12);\n this.label10.TabIndex = 20;\n this.label10.Text = \"Github Proxy:\";\n // \n // comboBox2\n // \n this.comboBox2.FormattingEnabled = true;\n this.comboBox2.Items.AddRange(new object[] {\n \"https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases/download/v2.21.12/\" +\n \"Waifu2x-Extension-GUI-v2.21.12-Portable.7z\",\n \"https://github.com/2dust/v2rayN/releases/download/7.10.4/v2rayN-windows-64-deskto\" +\n \"p.zip\",\n \"https://github.com/VSCodium/vscodium/releases/download/1.98.0.25067/codium-1.98.0\" +\n \".25067-el9.aarch64.rpm\"});\n this.comboBox2.Location = new System.Drawing.Point(414, 45);\n this.comboBox2.Name = \"comboBox2\";\n this.comboBox2.Size = new System.Drawing.Size(275, 20);\n this.comboBox2.TabIndex = 19;\n this.comboBox2.Text = \"https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases/download/v2.21.12/\" +\n \"Waifu2x-Extension-GUI-v2.21.12-Portable.7z\";\n // \n // label9\n // \n this.label9.AutoSize = true;\n this.label9.Location = new System.Drawing.Point(344, 48);\n this.label9.Name = \"label9\";\n this.label9.Size = new System.Drawing.Size(65, 12);\n this.label9.TabIndex = 18;\n this.label9.Text = \"测速地址:\";\n // \n // progressBar1\n // \n this.progressBar1.Location = new System.Drawing.Point(13, 3);\n this.progressBar1.Name = \"progressBar1\";\n this.progressBar1.Size = new System.Drawing.Size(780, 3);\n this.progressBar1.TabIndex = 3;\n // \n // timer2\n // \n this.timer2.Interval = 2000;\n this.timer2.Tick += new System.EventHandler(this.timer2_Tick);\n // \n // groupBox4\n // \n this.groupBox4.Controls.Add(this.textBox4);\n this.groupBox4.Controls.Add(this.label13);\n this.groupBox4.Controls.Add(this.textBox3);\n this.groupBox4.Controls.Add(this.label12);\n this.groupBox4.Controls.Add(this.textBox2);\n this.groupBox4.Controls.Add(this.label11);\n this.groupBox4.Location = new System.Drawing.Point(13, 612);\n this.groupBox4.Name = \"groupBox4\";\n this.groupBox4.Size = new System.Drawing.Size(780, 51);\n this.groupBox4.TabIndex = 4;\n this.groupBox4.TabStop = false;\n this.groupBox4.Text = \"Gist 上传参数\";\n this.groupBox4.Visible = false;\n // \n // textBox4\n // \n this.textBox4.Location = new System.Drawing.Point(467, 18);\n this.textBox4.Name = \"textBox4\";\n this.textBox4.Size = new System.Drawing.Size(306, 21);\n this.textBox4.TabIndex = 5;\n // \n // label13\n // \n this.label13.AutoSize = true;\n this.label13.Location = new System.Drawing.Point(359, 21);\n this.label13.Name = \"label13\";\n this.label13.Size = new System.Drawing.Size(113, 12);\n this.label13.TabIndex = 4;\n this.label13.Text = \"API Mirror(可选):\";\n // \n // textBox3\n // \n this.textBox3.Location = new System.Drawing.Point(253, 18);\n this.textBox3.Name = \"textBox3\";\n this.textBox3.PasswordChar = '*';\n this.textBox3.Size = new System.Drawing.Size(100, 21);\n this.textBox3.TabIndex = 3;\n this.textBox3.Enter += new System.EventHandler(this.textBox3_Enter);\n this.textBox3.Leave += new System.EventHandler(this.textBox3_Leave);\n // \n // label12\n // \n this.label12.AutoSize = true;\n this.label12.Location = new System.Drawing.Point(168, 21);\n this.label12.Name = \"label12\";\n this.label12.Size = new System.Drawing.Size(89, 12);\n this.label12.TabIndex = 2;\n this.label12.Text = \"Github Token:\";\n // \n // textBox2\n // \n this.textBox2.Location = new System.Drawing.Point(62, 18);\n this.textBox2.Name = \"textBox2\";\n this.textBox2.Size = new System.Drawing.Size(100, 21);\n this.textBox2.TabIndex = 1;\n // \n // label11\n // \n this.label11.AutoSize = true;\n this.label11.Location = new System.Drawing.Point(7, 21);\n this.label11.Name = \"label11\";\n this.label11.Size = new System.Drawing.Size(59, 12);\n this.label11.TabIndex = 0;\n this.label11.Text = \"Gist ID:\";\n // \n // toolTip1\n // \n this.toolTip1.AutoPopDelay = 5000;\n this.toolTip1.InitialDelay = 500;\n this.toolTip1.ReshowDelay = 500;\n this.toolTip1.ShowAlways = true;\n // \n // groupBox5\n // \n this.groupBox5.Controls.Add(this.textBox6);\n this.groupBox5.Controls.Add(this.label15);\n this.groupBox5.Controls.Add(this.textBox7);\n this.groupBox5.Controls.Add(this.label16);\n this.groupBox5.Location = new System.Drawing.Point(13, 669);\n this.groupBox5.Name = \"groupBox5\";\n this.groupBox5.Size = new System.Drawing.Size(780, 51);\n this.groupBox5.TabIndex = 6;\n this.groupBox5.TabStop = false;\n this.groupBox5.Text = \"R2 上传参数\";\n this.groupBox5.Visible = false;\n // \n // textBox6\n // \n this.textBox6.Location = new System.Drawing.Point(467, 18);\n this.textBox6.Name = \"textBox6\";\n this.textBox6.PasswordChar = '*';\n this.textBox6.Size = new System.Drawing.Size(306, 21);\n this.textBox6.TabIndex = 3;\n this.textBox6.Text = \"1234567890\";\n this.textBox6.Enter += new System.EventHandler(this.textBox3_Enter);\n this.textBox6.Leave += new System.EventHandler(this.textBox3_Leave);\n // \n // label15\n // \n this.label15.AutoSize = true;\n this.label15.Location = new System.Drawing.Point(382, 21);\n this.label15.Name = \"label15\";\n this.label15.Size = new System.Drawing.Size(89, 12);\n this.label15.TabIndex = 2;\n this.label15.Text = \"Worker Token:\";\n // \n // textBox7\n // \n this.textBox7.Location = new System.Drawing.Point(88, 18);\n this.textBox7.Name = \"textBox7\";\n this.textBox7.Size = new System.Drawing.Size(285, 21);\n this.textBox7.TabIndex = 1;\n this.textBox7.Text = \"https://example.worker.dev\";\n this.textBox7.Leave += new System.EventHandler(this.textBox7_Leave);\n // \n // label16\n // \n this.label16.AutoSize = true;\n this.label16.Location = new System.Drawing.Point(7, 21);\n this.label16.Name = \"label16\";\n this.label16.Size = new System.Drawing.Size(77, 12);\n this.label16.TabIndex = 0;\n this.label16.Text = \"Worker URL:\";\n // \n // groupBox6\n // \n this.groupBox6.Controls.Add(this.textBox5);\n this.groupBox6.Controls.Add(this.label14);\n this.groupBox6.Controls.Add(this.textBox8);\n this.groupBox6.Controls.Add(this.label17);\n this.groupBox6.Controls.Add(this.textBox9);\n this.groupBox6.Controls.Add(this.label18);\n this.groupBox6.Location = new System.Drawing.Point(13, 726);\n this.groupBox6.Name = \"groupBox6\";\n this.groupBox6.Size = new System.Drawing.Size(780, 51);\n this.groupBox6.TabIndex = 6;\n this.groupBox6.TabStop = false;\n this.groupBox6.Text = \"Webdav 上传参数\";\n this.groupBox6.Visible = false;\n // \n // textBox5\n // \n this.textBox5.Location = new System.Drawing.Point(467, 18);\n this.textBox5.Name = \"textBox5\";\n this.textBox5.Size = new System.Drawing.Size(306, 21);\n this.textBox5.TabIndex = 5;\n this.textBox5.Text = \"https://example.com/dav/\";\n // \n // label14\n // \n this.label14.AutoSize = true;\n this.label14.Location = new System.Drawing.Point(382, 21);\n this.label14.Name = \"label14\";\n this.label14.Size = new System.Drawing.Size(77, 12);\n this.label14.TabIndex = 4;\n this.label14.Text = \"Webdav URL:\";\n // \n // textBox8\n // \n this.textBox8.Location = new System.Drawing.Point(257, 18);\n this.textBox8.Name = \"textBox8\";\n this.textBox8.PasswordChar = '*';\n this.textBox8.Size = new System.Drawing.Size(110, 21);\n this.textBox8.TabIndex = 3;\n this.textBox8.Text = \"admin\";\n this.textBox8.Enter += new System.EventHandler(this.textBox3_Enter);\n this.textBox8.Leave += new System.EventHandler(this.textBox3_Leave);\n // \n // label17\n // \n this.label17.AutoSize = true;\n this.label17.Location = new System.Drawing.Point(186, 21);\n this.label17.Name = \"label17\";\n this.label17.Size = new System.Drawing.Size(65, 12);\n this.label17.TabIndex = 2;\n this.label17.Text = \"Password:\";\n // \n // textBox9\n // \n this.textBox9.Location = new System.Drawing.Point(70, 18);\n this.textBox9.Name = \"textBox9\";\n this.textBox9.Size = new System.Drawing.Size(110, 21);\n this.textBox9.TabIndex = 1;\n this.textBox9.Text = \"admin\";\n // \n // label18\n // \n this.label18.AutoSize = true;\n this.label18.Location = new System.Drawing.Point(7, 21);\n this.label18.Name = \"label18\";\n this.label18.Size = new System.Drawing.Size(65, 12);\n this.label18.TabIndex = 0;\n this.label18.Text = \"Username:\";\n // \n // timer3\n // \n this.timer3.Interval = 86400000;\n this.timer3.Tick += new System.EventHandler(this.timer3_Tick);\n // \n // timer4\n // \n this.timer4.Interval = 1000;\n this.timer4.Tick += new System.EventHandler(this.timer4_Tick);\n // \n // Form1\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.AutoSize = true;\n this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\n this.ClientSize = new System.Drawing.Size(800, 784);\n this.Controls.Add(this.groupBox6);\n this.Controls.Add(this.groupBox5);\n this.Controls.Add(this.groupBox4);\n this.Controls.Add(this.groupBox3);\n this.Controls.Add(this.groupBox2);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.progressBar1);\n this.Icon = ((System.Drawing.Icon)(resources.GetObject(\"$this.Icon\")));\n this.MaximizeBox = false;\n this.Name = \"Form1\";\n this.Text = \"SubsCheck Win GUI\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown7)).EndInit();\n this.groupBox2.ResumeLayout(false);\n this.groupBox2.PerformLayout();\n this.groupBox3.ResumeLayout(false);\n this.groupBox3.PerformLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown8)).EndInit();\n this.groupBox4.ResumeLayout(false);\n this.groupBox4.PerformLayout();\n this.groupBox5.ResumeLayout(false);\n this.groupBox5.PerformLayout();\n this.groupBox6.ResumeLayout(false);\n this.groupBox6.PerformLayout();\n this.ResumeLayout(false);\n\n }\n\n #endregion\n\n private System.Windows.Forms.NotifyIcon notifyIcon1;\n private System.Windows.Forms.Timer timer1;\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.GroupBox groupBox2;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.GroupBox groupBox3;\n private System.Windows.Forms.Label label8;\n private System.Windows.Forms.Label label7;\n private System.Windows.Forms.Label label4;\n private System.Windows.Forms.Label label5;\n private System.Windows.Forms.Label label6;\n private System.Windows.Forms.Label label3;\n private System.Windows.Forms.Label label2;\n private System.Windows.Forms.Label label1;\n private System.Windows.Forms.NumericUpDown numericUpDown6;\n private System.Windows.Forms.NumericUpDown numericUpDown5;\n private System.Windows.Forms.NumericUpDown numericUpDown4;\n private System.Windows.Forms.NumericUpDown numericUpDown3;\n private System.Windows.Forms.NumericUpDown numericUpDown2;\n private System.Windows.Forms.NumericUpDown numericUpDown1;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.ComboBox comboBox1;\n private System.Windows.Forms.ComboBox comboBox2;\n private System.Windows.Forms.Label label9;\n private System.Windows.Forms.ComboBox comboBox3;\n private System.Windows.Forms.Label label10;\n private System.Windows.Forms.CheckBox checkBox1;\n private System.Windows.Forms.RichTextBox richTextBox1;\n private System.Windows.Forms.ProgressBar progressBar1;\n private System.Windows.Forms.Button button3;\n private System.Windows.Forms.Timer timer2;\n private System.Windows.Forms.GroupBox groupBox4;\n private System.Windows.Forms.TextBox textBox4;\n private System.Windows.Forms.Label label13;\n private System.Windows.Forms.TextBox textBox3;\n private System.Windows.Forms.Label label12;\n private System.Windows.Forms.TextBox textBox2;\n private System.Windows.Forms.Label label11;\n private System.Windows.Forms.ToolTip toolTip1;\n private System.Windows.Forms.GroupBox groupBox5;\n private System.Windows.Forms.TextBox textBox6;\n private System.Windows.Forms.Label label15;\n private System.Windows.Forms.TextBox textBox7;\n private System.Windows.Forms.Label label16;\n private System.Windows.Forms.GroupBox groupBox6;\n private System.Windows.Forms.TextBox textBox5;\n private System.Windows.Forms.Label label14;\n private System.Windows.Forms.TextBox textBox8;\n private System.Windows.Forms.Label label17;\n private System.Windows.Forms.TextBox textBox9;\n private System.Windows.Forms.Label label18;\n private System.Windows.Forms.Button button5;\n private System.Windows.Forms.ComboBox comboBox4;\n private System.Windows.Forms.NumericUpDown numericUpDown7;\n private System.Windows.Forms.Label label20;\n private System.Windows.Forms.Label label19;\n private System.Windows.Forms.ComboBox comboBox5;\n private System.Windows.Forms.CheckBox checkBox2;\n private System.Windows.Forms.Timer timer3;\n private System.Windows.Forms.Button button4;\n private System.Windows.Forms.NumericUpDown numericUpDown8;\n private System.Windows.Forms.CheckBox checkBox3;\n private System.Windows.Forms.TextBox textBox10;\n private System.Windows.Forms.CheckBox checkBox4;\n private System.Windows.Forms.Button button6;\n private System.Windows.Forms.Timer timer4;\n private System.Windows.Forms.Button button7;\n private System.Windows.Forms.TextBox textBox11;\n private System.Windows.Forms.LinkLabel linkLabel1;\n private System.Windows.Forms.Button button8;\n private System.Windows.Forms.CheckBox checkBox5;\n }\n}\n\n"], ["/SubsCheck-Win-GUI/EditURLs.Designer.cs", "namespace subs_check.win.gui\n{\n partial class EditURLs\n {\n /// \n /// Required designer variable.\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// Clean up any resources being used.\n /// \n /// true if managed resources should be disposed; otherwise, false.\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows Form Designer generated code\n\n /// \n /// Required method for Designer support - do not modify\n /// the contents of this method with the code editor.\n /// \n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n this.button1 = new System.Windows.Forms.Button();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.button2 = new System.Windows.Forms.Button();\n this.button3 = new System.Windows.Forms.Button();\n this.button4 = new System.Windows.Forms.Button();\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.SuspendLayout();\n // \n // button1\n // \n this.button1.Font = new System.Drawing.Font(\"宋体\", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.button1.Location = new System.Drawing.Point(12, 415);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"保存\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // textBox1\n // \n this.textBox1.Location = new System.Drawing.Point(12, 12);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both;\n this.textBox1.Size = new System.Drawing.Size(776, 397);\n this.textBox1.TabIndex = 1;\n // \n // button2\n // \n this.button2.Enabled = false;\n this.button2.Location = new System.Drawing.Point(174, 415);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"等待获取\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n // \n // button3\n // \n this.button3.Location = new System.Drawing.Point(93, 415);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 3;\n this.button3.Text = \"去重\";\n this.button3.UseVisualStyleBackColor = true;\n this.button3.Click += new System.EventHandler(this.button3_Click);\n // \n // button4\n // \n this.button4.Location = new System.Drawing.Point(713, 415);\n this.button4.Name = \"button4\";\n this.button4.Size = new System.Drawing.Size(75, 23);\n this.button4.TabIndex = 4;\n this.button4.Text = \"返回\";\n this.button4.UseVisualStyleBackColor = true;\n this.button4.Click += new System.EventHandler(this.button4_Click);\n // \n // timer1\n // \n this.timer1.Tick += new System.EventHandler(this.timer1_Tick);\n // \n // comboBox1\n // \n this.comboBox1.FormattingEnabled = true;\n this.comboBox1.Location = new System.Drawing.Point(255, 418);\n this.comboBox1.Name = \"comboBox1\";\n this.comboBox1.Size = new System.Drawing.Size(120, 20);\n this.comboBox1.TabIndex = 22;\n this.comboBox1.Visible = false;\n // \n // EditURLs\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.ClientSize = new System.Drawing.Size(800, 450);\n this.Controls.Add(this.comboBox1);\n this.Controls.Add(this.button4);\n this.Controls.Add(this.button3);\n this.Controls.Add(this.button2);\n this.Controls.Add(this.textBox1);\n this.Controls.Add(this.button1);\n this.MinimizeBox = false;\n this.Name = \"EditURLs\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"编辑 节点池订阅链接\";\n this.ResumeLayout(false);\n this.PerformLayout();\n\n }\n\n #endregion\n\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.Button button3;\n private System.Windows.Forms.Button button4;\n private System.Windows.Forms.Timer timer1;\n private System.Windows.Forms.ComboBox comboBox1;\n }\n}"], ["/SubsCheck-Win-GUI/CheckUpdates.Designer.cs", "namespace subs_check.win.gui\n{\n partial class CheckUpdates\n {\n /// \n /// Required designer variable.\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// Clean up any resources being used.\n /// \n /// true if managed resources should be disposed; otherwise, false.\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows Form Designer generated code\n\n /// \n /// Required method for Designer support - do not modify\n /// the contents of this method with the code editor.\n /// \n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.label4 = new System.Windows.Forms.Label();\n this.label3 = new System.Windows.Forms.Label();\n this.button1 = new System.Windows.Forms.Button();\n this.label2 = new System.Windows.Forms.Label();\n this.label1 = new System.Windows.Forms.Label();\n this.groupBox2 = new System.Windows.Forms.GroupBox();\n this.label5 = new System.Windows.Forms.Label();\n this.label6 = new System.Windows.Forms.Label();\n this.button2 = new System.Windows.Forms.Button();\n this.label7 = new System.Windows.Forms.Label();\n this.label8 = new System.Windows.Forms.Label();\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.groupBox1.SuspendLayout();\n this.groupBox2.SuspendLayout();\n this.SuspendLayout();\n // \n // groupBox1\n // \n this.groupBox1.Controls.Add(this.label4);\n this.groupBox1.Controls.Add(this.label3);\n this.groupBox1.Controls.Add(this.button1);\n this.groupBox1.Controls.Add(this.label2);\n this.groupBox1.Controls.Add(this.label1);\n this.groupBox1.Location = new System.Drawing.Point(12, 12);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(144, 89);\n this.groupBox1.TabIndex = 0;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"SubsCheck Win GUI\";\n // \n // label4\n // \n this.label4.AutoSize = true;\n this.label4.Location = new System.Drawing.Point(77, 37);\n this.label4.Name = \"label4\";\n this.label4.Size = new System.Drawing.Size(53, 12);\n this.label4.TabIndex = 4;\n this.label4.Text = \"v0.0.0.0\";\n // \n // label3\n // \n this.label3.AutoSize = true;\n this.label3.Location = new System.Drawing.Point(77, 17);\n this.label3.Name = \"label3\";\n this.label3.Size = new System.Drawing.Size(53, 12);\n this.label3.TabIndex = 3;\n this.label3.Text = \"v0.0.0.0\";\n // \n // button1\n // \n this.button1.Enabled = false;\n this.button1.Location = new System.Drawing.Point(8, 57);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(122, 23);\n this.button1.TabIndex = 2;\n this.button1.Text = \"正在获取版本\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // label2\n // \n this.label2.AutoSize = true;\n this.label2.Location = new System.Drawing.Point(10, 37);\n this.label2.Name = \"label2\";\n this.label2.Size = new System.Drawing.Size(65, 12);\n this.label2.TabIndex = 1;\n this.label2.Text = \"当前版本:\";\n // \n // label1\n // \n this.label1.AutoSize = true;\n this.label1.Location = new System.Drawing.Point(10, 17);\n this.label1.Name = \"label1\";\n this.label1.Size = new System.Drawing.Size(65, 12);\n this.label1.TabIndex = 0;\n this.label1.Text = \"最新版本:\";\n // \n // groupBox2\n // \n this.groupBox2.Controls.Add(this.label5);\n this.groupBox2.Controls.Add(this.label6);\n this.groupBox2.Controls.Add(this.button2);\n this.groupBox2.Controls.Add(this.label7);\n this.groupBox2.Controls.Add(this.label8);\n this.groupBox2.Location = new System.Drawing.Point(162, 12);\n this.groupBox2.Name = \"groupBox2\";\n this.groupBox2.Size = new System.Drawing.Size(144, 89);\n this.groupBox2.TabIndex = 5;\n this.groupBox2.TabStop = false;\n this.groupBox2.Text = \"Subs-Check 内核\";\n // \n // label5\n // \n this.label5.AutoSize = true;\n this.label5.Location = new System.Drawing.Point(77, 37);\n this.label5.Name = \"label5\";\n this.label5.Size = new System.Drawing.Size(53, 12);\n this.label5.TabIndex = 4;\n this.label5.Text = \"v0.0.0.0\";\n // \n // label6\n // \n this.label6.AutoSize = true;\n this.label6.Location = new System.Drawing.Point(77, 17);\n this.label6.Name = \"label6\";\n this.label6.Size = new System.Drawing.Size(53, 12);\n this.label6.TabIndex = 3;\n this.label6.Text = \"正在获取\";\n // \n // button2\n // \n this.button2.Enabled = false;\n this.button2.Location = new System.Drawing.Point(8, 57);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(122, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"正在获取版本\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n // \n // label7\n // \n this.label7.AutoSize = true;\n this.label7.Location = new System.Drawing.Point(10, 37);\n this.label7.Name = \"label7\";\n this.label7.Size = new System.Drawing.Size(65, 12);\n this.label7.TabIndex = 1;\n this.label7.Text = \"当前版本:\";\n // \n // label8\n // \n this.label8.AutoSize = true;\n this.label8.Location = new System.Drawing.Point(10, 17);\n this.label8.Name = \"label8\";\n this.label8.Size = new System.Drawing.Size(65, 12);\n this.label8.TabIndex = 0;\n this.label8.Text = \"最新版本:\";\n // \n // timer1\n // \n this.timer1.Tick += new System.EventHandler(this.timer1_Tick);\n // \n // comboBox1\n // \n this.comboBox1.FormattingEnabled = true;\n this.comboBox1.Location = new System.Drawing.Point(12, 107);\n this.comboBox1.Name = \"comboBox1\";\n this.comboBox1.Size = new System.Drawing.Size(294, 20);\n this.comboBox1.TabIndex = 23;\n this.comboBox1.Visible = false;\n // \n // CheckUpdates\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.AutoSize = true;\n this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\n this.ClientSize = new System.Drawing.Size(319, 138);\n this.Controls.Add(this.comboBox1);\n this.Controls.Add(this.groupBox2);\n this.Controls.Add(this.groupBox1);\n this.MaximizeBox = false;\n this.MinimizeBox = false;\n this.Name = \"CheckUpdates\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"检查更新\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.groupBox2.ResumeLayout(false);\n this.groupBox2.PerformLayout();\n this.ResumeLayout(false);\n\n }\n\n #endregion\n\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.Label label4;\n private System.Windows.Forms.Label label3;\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.Label label2;\n private System.Windows.Forms.Label label1;\n private System.Windows.Forms.GroupBox groupBox2;\n private System.Windows.Forms.Label label5;\n private System.Windows.Forms.Label label6;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.Label label7;\n private System.Windows.Forms.Label label8;\n private System.Windows.Forms.Timer timer1;\n private System.Windows.Forms.ComboBox comboBox1;\n }\n}"], ["/SubsCheck-Win-GUI/Form1.cs", "using Newtonsoft.Json.Linq;\nusing System;\nusing System.Collections.Generic;\nusing System.Data;\nusing System.Diagnostics;\nusing System.Drawing;\nusing System.IO;\nusing System.IO.Compression;\nusing System.Linq;\nusing System.Net.Http;\nusing System.Net.NetworkInformation;\nusing System.Runtime.InteropServices;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\n\nnamespace subs_check.win.gui\n{\n public partial class Form1: Form\n {\n //string 版本号;\n string 标题;\n private Process subsCheckProcess = null;\n string nodeInfo;//进度\n private Icon originalNotifyIcon; // 保存原始图标\n private ToolStripMenuItem startMenuItem;\n private ToolStripMenuItem stopMenuItem;\n string githubProxyURL = \"\";\n int run = 0;\n string 当前subsCheck版本号 = \"未知版本\";\n string 当前GUI版本号 = \"未知版本\";\n string 最新GUI版本号 = \"未知版本\";\n private string nextCheckTime = null;// 用于存储下次检查时间\n string WebUIapiKey = \"CMLiussss\";\n int downloading = 0;\n public Form1()\n {\n InitializeComponent();\n originalNotifyIcon = notifyIcon1.Icon;\n\n toolTip1.SetToolTip(numericUpDown1, \"并发线程数:推荐 宽带峰值/50M。\");\n toolTip1.SetToolTip(numericUpDown2, \"检查间隔时间(分钟):放置后台的时候,下次自动测速的间隔时间。\\n\\n 双击切换 使用「cron表达式」\");\n toolTip1.SetToolTip(label2, \"检查间隔时间(分钟):放置后台的时候,下次自动测速的间隔时间。\\n\\n 双击切换 使用「cron表达式」\");\n\n toolTip1.SetToolTip(numericUpDown3, \"超时时间(毫秒):节点的最大延迟。\");\n toolTip1.SetToolTip(numericUpDown4, \"最低测速结果舍弃(KB/s)。\");\n toolTip1.SetToolTip(numericUpDown5, \"下载测试时间(s):与下载链接大小相关,默认最大测试10s。\");\n toolTip1.SetToolTip(numericUpDown6, \"本地监听端口:用于直接返回测速结果的节点信息,方便 Sub-Store 实现订阅转换。\");\n toolTip1.SetToolTip(numericUpDown7, \"Sub-Store监听端口:用于订阅订阅转换。\\n注意:除非你知道你在干什么,否则不要将你的 Sub-Store 暴露到公网,否则可能会被滥用\");\n toolTip1.SetToolTip(textBox1, \"节点池订阅地址:支持 Link、Base64、Clash 格式的订阅链接。\");\n toolTip1.SetToolTip(checkBox1, \"以节点IP查询位置重命名节点。\\n质量差的节点可能造成IP查询失败,造成整体检查速度稍微变慢。\");\n toolTip1.SetToolTip(checkBox2, \"是否开启流媒体检测,其中IP欺诈依赖'节点地址查询',内核版本需要 v2.0.8 以上\\n\\n示例:美国1 | ⬇️ 5.6MB/s |0%|Netflix|Disney|Openai\\n风控值:0% (使用ping0.cc标准)\\n流媒体解锁:Netflix、Disney、Openai\");\n toolTip1.SetToolTip(comboBox3, \"GitHub 代理:代理订阅 GitHub raw 节点池。\");\n toolTip1.SetToolTip(comboBox2, \"测速地址:注意 并发数*节点速度<最大网速 否则测速结果不准确\\n尽量不要使用Speedtest,Cloudflare提供的下载链接,因为很多节点屏蔽测速网站。\");\n toolTip1.SetToolTip(textBox7, \"将测速结果推送到Worker的地址。\");\n toolTip1.SetToolTip(textBox6, \"Worker令牌。\");\n toolTip1.SetToolTip(comboBox1, \"测速结果的保存方法。\");\n toolTip1.SetToolTip(textBox2, \"Gist ID:注意!非Github用户名!\");\n toolTip1.SetToolTip(textBox3, \"Github TOKEN\");\n \n toolTip1.SetToolTip(comboBox4, \"通用订阅:内置了Sub-Store程序,自适应订阅格式。\\nClash订阅:带规则的 Mihomo、Clash 订阅格式。\");\n toolTip1.SetToolTip(comboBox5, \"生成带规则的 Clash 订阅所需的覆写规则文件\");\n\n toolTip1.SetToolTip(checkBox3, \"保存几个成功的节点,不选代表不限制,内核版本需要 v2.1.0 以上\\n如果你的并发数量超过这个参数,那么成功的结果可能会大于这个数值\");\n toolTip1.SetToolTip(numericUpDown8, \"保存几个成功的节点,不选代表不限制,内核版本需要 v2.1.0 以上\\n如果你的并发数量超过这个参数,那么成功的结果可能会大于这个数值\");\n\n toolTip1.SetToolTip(textBox11, \"支持标准cron表达式,如:\\n 0 */2 * * * 表示每2小时的整点执行\\n 0 0 */2 * * 表示每2天的0点执行\\n 0 0 1 * * 表示每月1日0点执行\\n */30 * * * * 表示每30分钟执行一次\\n\\n 双击切换 使用「分钟倒计时」\");\n\n toolTip1.SetToolTip(checkBox5, \"开机启动:勾选后,程序将在Windows启动时自动运行\");\n // 设置通知图标的上下文菜单\n SetupNotifyIconContextMenu();\n }\n\n private void SetupNotifyIconContextMenu()\n {\n // 创建上下文菜单\n ContextMenuStrip contextMenu = new ContextMenuStrip();\n\n // 创建\"▶️ 启动\"菜单项\n startMenuItem = new ToolStripMenuItem(\"启动\");\n startMenuItem.Click += (sender, e) =>\n {\n if (button1.Text == \"▶️ 启动\")\n {\n button1_Click(sender, e);\n }\n };\n\n // 创建\"⏹️ 停止\"菜单项\n stopMenuItem = new ToolStripMenuItem(\"停止\");\n stopMenuItem.Click += (sender, e) =>\n {\n if (button1.Text == \"⏹️ 停止\")\n {\n button1_Click(sender, e);\n }\n };\n stopMenuItem.Enabled = false; // 初始状态下禁用\n\n // 创建\"退出\"菜单项\n ToolStripMenuItem exitMenuItem = new ToolStripMenuItem(\"退出\");\n exitMenuItem.Click += async (sender, e) =>\n {\n try\n {\n // 如果程序正在运行,先停止它\n if (subsCheckProcess != null && !subsCheckProcess.HasExited)\n {\n await KillNodeProcessAsync();\n StopSubsCheckProcess();\n }\n\n // 确保通知图标被移除\n notifyIcon1.Visible = false;\n\n // 使用更直接的退出方式\n Environment.Exit(0);\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"退出程序时发生错误: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n\n // 如果仍然失败,尝试强制退出\n System.Diagnostics.Process.GetCurrentProcess().Kill();\n }\n };\n\n // 将菜单项添加到上下文菜单\n contextMenu.Items.Add(startMenuItem);\n contextMenu.Items.Add(stopMenuItem);\n contextMenu.Items.Add(new ToolStripSeparator()); // 分隔线\n contextMenu.Items.Add(exitMenuItem);\n\n // 将上下文菜单分配给通知图标\n notifyIcon1.ContextMenuStrip = contextMenu;\n\n // 确保通知图标可见\n notifyIcon1.Visible = true;\n }\n\n protected override void OnFormClosing(FormClosingEventArgs e)\n {\n if (e.CloseReason == CloseReason.UserClosing)\n {\n // 取消关闭操作\n e.Cancel = true;\n // 调用隐藏窗口方法\n 隐藏窗口();\n }\n }\n\n private async void timer1_Tick(object sender, EventArgs e)//初始化\n {\n timer1.Enabled = false;\n if (button2.Text == \"高级设置∧\") button2_Click(sender, e);\n // 检查并创建config文件夹\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string configFolderPath = System.IO.Path.Combine(executablePath, \"config\");\n if (!System.IO.Directory.Exists(configFolderPath))\n {\n // 文件不存在,可以给用户反馈\n string 免责声明 = \"SubsCheck-Win-GUI 项目仅供教育、研究和安全测试目的而设计和开发。本项目旨在为安全研究人员、学术界人士及技术爱好者提供一个探索和实践网络通信技术的工具。\\r\\n在下载和使用本项目代码时,使用者必须严格遵守其所适用的法律和规定。使用者有责任确保其行为符合所在地区的法律框架、规章制度及其他相关规定。\\r\\n\\r\\n使用条款\\r\\n\\r\\n教育与研究用途:本软件仅可用于网络技术和编程领域的学习、研究和安全测试。\\r\\n禁止非法使用:严禁将 SubsCheck-Win-GUI 用于任何非法活动或违反使用者所在地区法律法规的行为。\\r\\n使用时限:基于学习和研究目的,建议用户在完成研究或学习后,或在安装后的24小时内,删除本软件及所有相关文件。\\r\\n免责声明:SubsCheck-Win-GUI 的创建者和贡献者不对因使用或滥用本软件而导致的任何损害或法律问题负责。\\r\\n用户责任:用户对使用本软件的方式以及由此产生的任何后果完全负责。\\r\\n无技术支持:本软件的创建者不提供任何技术支持或使用协助。\\r\\n知情同意:使用 SubsCheck-Win-GUI 即表示您已阅读并理解本免责声明,并同意受其条款的约束。\\r\\n\\r\\n请记住:本软件的主要目的是促进学习、研究和安全测试。创作者不支持或认可任何其他用途。使用者应当在合法和负责任的前提下使用本工具。\\r\\n\\r\\n同意以上条款请点击\\\"是 / Yes\\\",否则程序将退出。\";\n\n // 显示带有 \"同意\" 和 \"拒绝\" 选项的对话框\n DialogResult result = MessageBox.Show(免责声明, \"SubsCheck-Win-GUI 免责声明\", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\n\n // 如果用户点击 \"拒绝\" (对应于 No 按钮)\n if (result == DialogResult.No)\n {\n // 退出程序\n Environment.Exit(0); // 立即退出程序\n }\n System.IO.Directory.CreateDirectory(configFolderPath);\n }\n\n FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location);\n 当前GUI版本号 = \"v\" + myFileVersionInfo.FileVersion;\n 最新GUI版本号 = 当前GUI版本号;\n 标题 = \"SubsCheck Win GUI \" + 当前GUI版本号;\n this.Text = 标题;// + \" TG:CMLiussss BY:CM喂饭 干货满满\";\n comboBox1.Text = \"本地\";\n comboBox4.Text = \"通用订阅\";\n ReadConfig();\n\n if (CheckCommandLineParameter(\"-auto\"))\n {\n Log(\"检测到开机启动,准备执行任务...\");\n button1_Click(this, EventArgs.Empty);\n this.Hide();\n notifyIcon1.Visible = true;\n } else await CheckGitHubVersionAsync();\n }\n\n private async Task CheckGitHubVersionAsync()\n {\n try\n {\n // 首先检查是否有网络连接\n if (!IsNetworkAvailable())\n {\n return; // 静默返回,不显示错误\n }\n\n var result = await 获取版本号(\"https://api.github.com/repos/cmliu/SubsCheck-Win-GUI/releases/latest\");\n if (result.Item1 != \"未知版本\") \n {\n string latestVersion = result.Item1;\n if (latestVersion != 当前GUI版本号)\n {\n 最新GUI版本号 = latestVersion;\n 标题 = \"SubsCheck Win GUI \" + 当前GUI版本号 + $\" 发现新版本: {最新GUI版本号} 请及时更新!\";\n this.Text = 标题;\n }\n }\n }\n catch\n {\n // 静默处理任何其他异常\n return;\n }\n }\n\n // 添加检查网络连接的辅助方法\n private bool IsNetworkAvailable()\n {\n try\n {\n return NetworkInterface.GetIsNetworkAvailable();\n }\n catch\n {\n return false; // 如果无法检查网络状态,假设网络不可用\n }\n }\n\n private async void ReadConfig()//读取配置文件\n {\n checkBox5.CheckedChanged -= checkBox5_CheckedChanged;// 临时移除事件处理器,防止触发事件\n try\n {\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string configFilePath = Path.Combine(executablePath, \"config\", \"config.yaml\");\n\n if (File.Exists(configFilePath))\n {\n // 读取YAML文件内容\n string yamlContent = File.ReadAllText(configFilePath);\n\n // 使用YamlDotNet解析YAML\n var deserializer = new YamlDotNet.Serialization.Deserializer();\n var config = deserializer.Deserialize>(yamlContent);\n\n // 使用新函数获取整数值并设置UI控件\n int? concurrentValue = 读取config整数(config, \"concurrent\");\n if (concurrentValue.HasValue) numericUpDown1.Value = concurrentValue.Value;\n\n int? checkIntervalValue = 读取config整数(config, \"check-interval\");\n if (checkIntervalValue.HasValue) numericUpDown2.Value = checkIntervalValue.Value;\n\n int? timeoutValue = 读取config整数(config, \"timeout\");\n if (timeoutValue.HasValue) numericUpDown3.Value = timeoutValue.Value;\n\n int? minspeedValue = 读取config整数(config, \"min-speed\");\n if (minspeedValue.HasValue) numericUpDown4.Value = minspeedValue.Value;\n\n int? downloadtimeoutValue = 读取config整数(config, \"download-timeout\");\n if (downloadtimeoutValue.HasValue) numericUpDown5.Value = downloadtimeoutValue.Value;\n\n string speedTestUrl = 读取config字符串(config, \"speed-test-url\");\n if (speedTestUrl != null) comboBox2.Text = speedTestUrl;\n\n string savemethod = 读取config字符串(config, \"save-method\");\n if (savemethod != null)\n {\n if (savemethod == \"local\") comboBox1.Text = \"本地\";\n else comboBox1.Text = savemethod;\n }\n\n string listenport = 读取config字符串(config, \"listen-port\");\n if (listenport != null)\n {\n // 查找最后一个冒号的位置\n int colonIndex = listenport.LastIndexOf(':');\n if (colonIndex >= 0 && colonIndex < listenport.Length - 1)\n {\n // 提取冒号后面的部分作为端口号\n string portStr = listenport.Substring(colonIndex + 1);\n if (decimal.TryParse(portStr, out decimal port))\n {\n numericUpDown6.Value = port;\n }\n }\n }\n\n /*\n int? substoreport = 读取config整数(config, \"sub-store-port\");\n if (substoreport.HasValue) numericUpDown7.Value = substoreport.Value;\n */\n\n string substoreport = 读取config字符串(config, \"sub-store-port\");\n if (substoreport != null)\n {\n // 查找最后一个冒号的位置\n int colonIndex = substoreport.LastIndexOf(':');\n if (colonIndex >= 0 && colonIndex < substoreport.Length - 1)\n {\n // 提取冒号后面的部分作为端口号\n string portStr = substoreport.Substring(colonIndex + 1);\n if (decimal.TryParse(portStr, out decimal port))\n {\n numericUpDown7.Value = port;\n }\n }\n }\n\n string githubproxy = 读取config字符串(config, \"githubproxy\");\n if (githubproxy != null) comboBox3.Text = githubproxy;\n\n const string githubRawPrefix = \"https://raw.githubusercontent.com/\";\n\n string mihomoOverwriteUrl = 读取config字符串(config, \"mihomo-overwrite-url\");\n int mihomoOverwriteUrlIndex = mihomoOverwriteUrl.IndexOf(githubRawPrefix);\n if (mihomoOverwriteUrl != null)\n {\n if (mihomoOverwriteUrl.Contains(\"http://127.0.0\"))\n {\n if (mihomoOverwriteUrl.EndsWith(\"bdg.yaml\", StringComparison.OrdinalIgnoreCase))\n {\n comboBox5.Text = \"[内置]布丁狗的订阅转换\";\n await ProcessComboBox5Selection();\n }\n else if (mihomoOverwriteUrl.EndsWith(\"ACL4SSR_Online_Full.yaml\", StringComparison.OrdinalIgnoreCase))\n {\n comboBox5.Text = \"[内置]ACL4SSR_Online_Full\";\n await ProcessComboBox5Selection();\n }\n }\n else if (mihomoOverwriteUrlIndex > 0) comboBox5.Text = mihomoOverwriteUrl.Substring(mihomoOverwriteUrlIndex);\n else comboBox5.Text = mihomoOverwriteUrl;\n }\n\n // 处理URLs,检查是否包含GitHub raw链接\n List subUrls = 读取config列表(config, \"sub-urls\");\n if (subUrls != null && subUrls.Count > 0)\n {\n // 创建一个新的过滤后的列表\n var filteredUrls = new List();\n\n for (int i = 0; i < subUrls.Count; i++)\n {\n // 排除本地URL\n string localUrlPattern = $\"http://127.0.0.1:{numericUpDown6.Value}/all.yaml\";\n if (!subUrls[i].Equals(localUrlPattern, StringComparison.OrdinalIgnoreCase))\n {\n // 处理GitHub raw链接\n int index = subUrls[i].IndexOf(githubRawPrefix);\n if (index > 0) // 如果找到且不在字符串开头\n {\n // 只保留从githubRawPrefix开始的部分\n filteredUrls.Add(subUrls[i].Substring(index));\n }\n else\n {\n // 如果不是GitHub链接,直接添加\n filteredUrls.Add(subUrls[i]);\n }\n }\n }\n\n // 将过滤后的列表中的每个URL放在单独的行上\n textBox1.Text = string.Join(Environment.NewLine, filteredUrls);\n }\n\n string renamenode = 读取config字符串(config, \"rename-node\");\n if (renamenode != null && renamenode == \"true\") checkBox1.Checked = true;\n else checkBox1.Checked = false;\n\n string mediacheck = 读取config字符串(config, \"media-check\");\n if (mediacheck != null && mediacheck == \"true\") checkBox2.Checked = true;\n else checkBox2.Checked = false;\n\n string githubgistid = 读取config字符串(config, \"github-gist-id\");\n if (githubgistid != null) textBox2.Text = githubgistid;\n string githubtoken = 读取config字符串(config, \"github-token\");\n if (githubtoken != null) textBox3.Text = githubtoken;\n\n string githubapimirror = 读取config字符串(config, \"github-api-mirror\");\n if (githubapimirror != null) textBox4.Text = githubapimirror;\n\n string workerurl = 读取config字符串(config, \"worker-url\");\n if (workerurl != null) textBox7.Text = workerurl;\n string workertoken = 读取config字符串(config, \"worker-token\");\n if (workertoken != null) textBox6.Text = workertoken;\n\n string webdavusername = 读取config字符串(config, \"webdav-username\");\n if (webdavusername != null) textBox9.Text = webdavusername;\n string webdavpassword = 读取config字符串(config, \"webdav-password\");\n if (webdavpassword != null) textBox8.Text = webdavpassword;\n string webdavurl = 读取config字符串(config, \"webdav-url\");\n if (webdavurl != null) textBox5.Text = webdavurl;\n\n string subscheckversion = 读取config字符串(config, \"subscheck-version\");\n if (subscheckversion != null) 当前subsCheck版本号 = subscheckversion;\n\n int? successlimit = 读取config整数(config, \"success-limit\");\n if (successlimit.HasValue)\n {\n if (successlimit.Value == 0)\n {\n checkBox3.Checked = false;\n numericUpDown8.Enabled = false;\n }\n else\n {\n checkBox3.Checked = true;\n numericUpDown8.Enabled = true;\n numericUpDown8.Value = successlimit.Value;\n }\n }\n\n string enablewebui = 读取config字符串(config, \"enable-web-ui\");\n if (enablewebui != null && enablewebui == \"true\") checkBox4.Checked = true;\n else checkBox4.Checked = false;\n\n string apikey = 读取config字符串(config, \"api-key\");\n if (apikey != null)\n {\n if (apikey == GetComputerNameMD5())\n {\n checkBox4.Checked = false;\n string oldapikey = 读取config字符串(config, \"old-api-key\");\n if (oldapikey != null)\n {\n textBox10.Text = oldapikey;\n }\n else\n {\n textBox10.PasswordChar = '\\0';\n textBox10.Text = \"请输入密钥\";\n textBox10.ForeColor = Color.Gray;\n }\n }\n else\n {\n textBox10.Text = apikey;\n }\n }\n\n string cronexpression = 读取config字符串(config, \"cron-expression\");\n if (cronexpression != null)\n {\n textBox11.Text = cronexpression;\n string cronDescription = GetCronExpressionDescription(textBox11.Text);\n textBox11.Location = new Point(9, 48);\n textBox11.Visible = true;\n label2.Visible = false;\n numericUpDown2.Visible = false;\n }\n\n string guiauto = 读取config字符串(config, \"gui-auto\");\n if (guiauto != null && guiauto == \"true\") checkBox5.Checked = true;\n else checkBox5.Checked = false;\n }\n else\n {\n comboBox3.Text = \"自动选择\";\n comboBox5.Text = \"[内置]布丁狗的订阅转换\";\n }\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"读取配置文件时发生错误: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n checkBox5.CheckedChanged += checkBox5_CheckedChanged;// 重新绑定事件处理器\n }\n\n private int? 读取config整数(Dictionary config, string fieldName)\n {\n // 检查是否存在指定字段且不为null\n if (config.ContainsKey(fieldName) && config[fieldName] != null)\n {\n int value;\n if (int.TryParse(config[fieldName].ToString(), out value))\n return value;\n }\n return null;\n }\n\n private string 读取config字符串(Dictionary config, string fieldName)\n {\n // 检查是否存在指定字段且不为null\n if (config.ContainsKey(fieldName) && config[fieldName] != null)\n {\n return config[fieldName].ToString();\n }\n return null;\n }\n\n private List 读取config列表(Dictionary config, string fieldName)\n {\n // 检查是否存在指定字段且不为null\n if (config.ContainsKey(fieldName) && config[fieldName] != null)\n {\n // 尝试将对象转换为列表\n if (config[fieldName] is List listItems)\n {\n return listItems.Select(item => item?.ToString()).Where(s => !string.IsNullOrEmpty(s)).ToList();\n }\n }\n return null;\n }\n\n private async Task SaveConfig(bool githubProxyCheck = true)//保存配置文件\n {\n try\n {\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string configFilePath = Path.Combine(executablePath, \"config\", \"config.yaml\");\n\n // 创建配置字典\n var config = new Dictionary();\n\n // 从UI控件获取值并添加到字典中\n config[\"concurrent\"] = (int)numericUpDown1.Value;\n config[\"check-interval\"] = (int)numericUpDown2.Value;\n if (textBox11.Visible) config[\"cron-expression\"] = textBox11.Text;\n config[\"timeout\"] = (int)numericUpDown3.Value;\n config[\"min-speed\"] = (int)numericUpDown4.Value;\n config[\"download-timeout\"] = (int)numericUpDown5.Value;\n\n if (!string.IsNullOrEmpty(comboBox2.Text)) config[\"speed-test-url\"] = comboBox2.Text;\n\n // 保存save-method,将\"本地\"转换为\"local\"\n config[\"save-method\"] = comboBox1.Text == \"本地\" ? \"local\" : comboBox1.Text;\n\n // 保存gist参数\n config[\"github-gist-id\"] = textBox2.Text;\n config[\"github-token\"] = textBox3.Text;\n\n config[\"github-api-mirror\"] = textBox4.Text;\n\n // 保存r2参数\n config[\"worker-url\"] = textBox7.Text;\n config[\"worker-token\"] = textBox6.Text;\n\n // 保存webdav参数\n config[\"webdav-username\"] = textBox9.Text;\n config[\"webdav-password\"] = textBox8.Text;\n config[\"webdav-url\"] = textBox5.Text;\n\n // 保存enable-web-ui\n config[\"enable-web-ui\"] = true;\n\n // 保存listen-port\n if (checkBox4.Checked) \n {\n WebUIapiKey = textBox10.Text;\n config[\"listen-port\"] = $@\":{numericUpDown6.Value}\";\n }\n else\n {\n WebUIapiKey = GetComputerNameMD5();\n config[\"listen-port\"] = $@\"127.0.0.1:{numericUpDown6.Value}\";\n if (textBox10.Text != \"请输入密钥\") config[\"old-api-key\"] = textBox10.Text;\n }\n config[\"api-key\"] = WebUIapiKey;\n\n // 保存sub-store-port\n config[\"sub-store-port\"] = $@\":{numericUpDown7.Value}\";\n\n string githubRawPrefix = \"https://raw.githubusercontent.com/\";\n if (githubProxyCheck)\n {\n // 检查并处理 GitHub Raw URLs\n if (comboBox3.Text == \"自动选择\")\n {\n // 创建不包含\"自动选择\"的代理列表\n List proxyItems = new List();\n for (int j = 0; j < comboBox3.Items.Count; j++)\n {\n string proxyItem = comboBox3.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n\n // 随机打乱列表顺序\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n\n // 异步检测可用代理\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n }\n }\n\n if (comboBox3.Text != \"自动选择\") githubProxyURL = $\"https://{comboBox3.Text}/\";\n config[\"githubproxy\"] = comboBox3.Text;\n config[\"github-proxy\"] = githubProxyURL;\n\n // 保存sub-urls列表\n List subUrls = new List();\n string allyamlFilePath = System.IO.Path.Combine(executablePath, \"output\", \"all.yaml\");\n if (System.IO.File.Exists(allyamlFilePath))\n {\n subUrls.Add($\"http://127.0.0.1:{numericUpDown6.Value}/all.yaml\");\n Log(\"已加载上次测试结果。\");\n }\n\n if (!string.IsNullOrEmpty(textBox1.Text))\n {\n subUrls.AddRange(textBox1.Text.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList());\n // 处理URLs\n for (int i = 0; i < subUrls.Count; i++)\n {\n if (subUrls[i].StartsWith(githubRawPrefix) && !string.IsNullOrEmpty(githubProxyURL))\n {\n // 替换为代理 URL 格式\n //subUrls[i] = githubProxyURL + githubRawPrefix + subUrls[i].Substring(githubRawPrefix.Length);\n // 使用subs-check内置github-proxy参数\n subUrls[i] = githubRawPrefix + subUrls[i].Substring(githubRawPrefix.Length);\n }\n }\n }\n\n config[\"sub-urls\"] = subUrls;\n\n // 处理配置文件下载与配置\n if (comboBox5.Text.Contains(\"[内置]\"))\n {\n // 确定文件名和下载URL\n string fileName;\n string downloadFilePath;\n string downloadUrl;\n string displayName;\n\n if (comboBox5.Text.Contains(\"[内置]布丁狗\"))\n {\n fileName = \"bdg.yaml\";\n displayName = \"[内置]布丁狗的订阅转换\";\n downloadUrl = \"https://raw.githubusercontent.com/cmliu/ACL4SSR/main/yaml/bdg.yaml\";\n }\n else // [内置]ACL4SSR\n {\n fileName = \"ACL4SSR_Online_Full.yaml\";\n displayName = \"[内置]ACL4SSR_Online_Full\";\n downloadUrl = \"https://raw.githubusercontent.com/beck-8/override-hub/main/yaml/ACL4SSR_Online_Full.yaml\";\n }\n\n // 确保output文件夹存在\n string outputFolderPath = Path.Combine(executablePath, \"output\");\n if (!Directory.Exists(outputFolderPath))\n {\n Directory.CreateDirectory(outputFolderPath);\n }\n\n // 确定文件完整路径\n downloadFilePath = Path.Combine(outputFolderPath, fileName);\n if (!File.Exists(downloadFilePath)) await ProcessComboBox5Selection();\n\n // 检查文件是否存在\n if (!File.Exists(downloadFilePath))\n {\n Log($\"{displayName} 覆写配置文件 未找到,将使用在线版本。\");\n config[\"mihomo-overwrite-url\"] = githubProxyURL + downloadUrl;\n }\n else\n {\n Log($\"{displayName} 覆写配置文件 加载成功。\");\n config[\"mihomo-overwrite-url\"] = $\"http://127.0.0.1:{numericUpDown6.Value}/{fileName}\";\n }\n }\n else if (comboBox5.Text.StartsWith(githubRawPrefix)) config[\"mihomo-overwrite-url\"] = githubProxyURL + comboBox5.Text;\n else config[\"mihomo-overwrite-url\"] = comboBox5.Text != \"\" ? comboBox5.Text : $\"http://127.0.0.1:{numericUpDown6.Value}/ACL4SSR_Online_Full.yaml\";\n \n config[\"rename-node\"] = checkBox1.Checked;//以节点IP查询位置重命名节点\n config[\"media-check\"] = checkBox2.Checked;//是否开启流媒体检测\n config[\"keep-success-proxies\"] = false;\n config[\"print-progress\"] = false;//是否显示进度\n config[\"sub-urls-retry\"] = 3;//重试次数(获取订阅失败后重试次数)\n config[\"subscheck-version\"] = 当前subsCheck版本号;//当前subsCheck版本号\n\n config[\"gui-auto\"] = checkBox5.Checked;//是否开机自启\n\n //保存几个成功的节点,为0代表不限制 \n if (checkBox3.Checked) config[\"success-limit\"] = (int)numericUpDown8.Value;\n else config[\"success-limit\"] = 0;\n\n // 使用YamlDotNet序列化配置\n var serializer = new YamlDotNet.Serialization.SerializerBuilder()\n .WithIndentedSequences() // 使序列化结果更易读\n .Build();\n\n string yamlContent = serializer.Serialize(config);\n\n // 确保配置目录存在\n string configDirPath = Path.GetDirectoryName(configFilePath);\n if (!Directory.Exists(configDirPath))\n Directory.CreateDirectory(configDirPath);\n\n string moreYamlPath = Path.Combine(configDirPath, \"more.yaml\");\n if (File.Exists(moreYamlPath))\n {\n // 读取more.yaml的内容\n string moreYamlContent = File.ReadAllText(moreYamlPath);\n\n // 确保more.yaml内容以换行开始\n if (!moreYamlContent.StartsWith(\"\\n\") && !moreYamlContent.StartsWith(\"\\r\\n\"))\n {\n yamlContent += \"\\n\"; // 添加换行符作为分隔\n }\n\n // 将more.yaml的内容追加到要写入的config.yaml内容后\n yamlContent += moreYamlContent;\n\n Log($\"已将补充参数配置 more.yaml 内容追加到配置文件\");\n }\n // 写入YAML文件\n File.WriteAllText(configFilePath, yamlContent);\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"保存配置文件时发生错误: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n if (button2.Text == \"高级设置∧\")\n {\n button2.Text = \"高级设置∨\";\n groupBox3.Visible = false;\n }\n else\n {\n button2.Text = \"高级设置∧\";\n groupBox3.Visible = true;\n }\n 判断保存类型();\n }\n\n private async void button1_Click(object sender, EventArgs e)\n {\n button1.Enabled = false;\n if (button1.Text == \"▶️ 启动\") \n {\n if (checkBox4.Checked && textBox10.Text == \"请输入密钥\")\n {\n MessageBox.Show(\"您已启用WebUI,请设置WebUI API密钥!\", \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Warning);\n return;\n }\n run = 1;\n if (button3.Enabled==false)\n {\n string executablePath = Path.GetDirectoryName(Application.ExecutablePath);\n string allyamlFilePath = Path.Combine(executablePath, \"output\", \"all.yaml\");\n button3.Enabled = File.Exists(allyamlFilePath);\n }\n\n numericUpDown1.Enabled = false;\n numericUpDown2.Enabled = false;\n textBox11.Enabled = false;\n numericUpDown3.Enabled = false;\n numericUpDown4.Enabled = false;\n numericUpDown5.Enabled = false;\n numericUpDown6.Enabled = false;\n numericUpDown7.Enabled = false;\n comboBox1.Enabled = false;\n textBox1.Enabled = false;\n groupBox3.Enabled = false;\n groupBox4.Enabled = false;\n groupBox5.Enabled = false;\n groupBox6.Enabled = false;\n if (checkBox4.Checked) button6.Enabled = true;\n button1.Text = \"⏹️ 停止\";\n //timer3.Enabled = true;\n // 清空 richTextBox1\n richTextBox1.Clear();\n await KillNodeProcessAsync();\n await SaveConfig();\n\n if (run == 1) \n {\n // 更新菜单项的启用状态\n startMenuItem.Enabled = false;\n stopMenuItem.Enabled = true;\n\n // 清空 richTextBox1\n //richTextBox1.Clear();\n\n notifyIcon1.Text = \"SubsCheck: 已就绪\";\n\n // 启动 subs-check.exe 程序\n StartSubsCheckProcess();\n }\n }\n else\n {\n run = 0;\n Log(\"任务停止\");\n progressBar1.Value = 0;\n groupBox2.Text = \"实时日志\";\n notifyIcon1.Text = \"SubsCheck: 未运行\";\n // 停止 subs-check.exe 程序\n StopSubsCheckProcess();\n // 结束 Sub-Store\n await KillNodeProcessAsync();\n if (checkBox4.Checked) ReadConfig();\n button3.Enabled = false;\n numericUpDown1.Enabled = true;\n numericUpDown2.Enabled = true;\n textBox11.Enabled = true;\n numericUpDown3.Enabled = true;\n numericUpDown4.Enabled = true;\n numericUpDown5.Enabled = true;\n numericUpDown6.Enabled = true;\n numericUpDown7.Enabled = true;\n comboBox1.Enabled = true;\n textBox1.Enabled = true;\n groupBox3.Enabled = true;\n groupBox4.Enabled = true;\n groupBox5.Enabled = true;\n groupBox6.Enabled = true;\n button6.Enabled = false;\n button1.Text = \"▶️ 启动\";\n //timer3.Enabled = false;\n // 更新菜单项的启用状态\n startMenuItem.Enabled = true;\n stopMenuItem.Enabled = false;\n }\n if (downloading == 0) button1.Enabled = true;\n }\n\n private async Task DownloadSubsCheckEXE()\n {\n button1.Enabled = false;\n downloading = 1;\n try\n {\n Log(\"正在检查网络连接...\");\n\n // 首先检查是否有网络连接\n if (!IsNetworkAvailable())\n {\n Log(\"网络连接不可用,无法下载核心文件。\", true);\n MessageBox.Show(\"缺少 subs-check.exe 核心文件。\\n\\n您可以前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n return;\n }\n\n var result = await 获取版本号(\"https://api.github.com/repos/beck-8/subs-check/releases/latest\", true);\n if (result.Item1 != \"未知版本\") \n {\n // 创建不使用系统代理的 HttpClientHandler\n HttpClientHandler handler = new HttpClientHandler\n {\n UseProxy = false,\n Proxy = null\n };\n\n // 使用自定义 handler 创建 HttpClient\n using (HttpClient client = new HttpClient(handler)) \n {\n try\n {\n string latestVersion = result.Item1;\n JArray assets = result.Item2;\n Log($\"subs-check.exe 最新版本为: {latestVersion} \");\n // 查找Windows i386版本的资源\n string downloadUrl = null;\n\n foreach (var asset in assets)\n {\n if (asset[\"name\"].ToString() == \"subs-check_Windows_i386.zip\")\n {\n downloadUrl = asset[\"browser_download_url\"].ToString();\n break;\n }\n }\n\n if (downloadUrl != null)\n {\n string 代理下载链接 = githubProxyURL + downloadUrl;\n string 原生下载链接 = 代理下载链接;\n // 计算\"https://\"在下载链接中出现的次数\n int httpsCount = 0;\n int lastIndex = -1;\n int currentIndex = 0;\n\n // 查找所有\"https://\"出现的位置\n while ((currentIndex = 代理下载链接.IndexOf(\"https://\", currentIndex)) != -1)\n {\n httpsCount++;\n lastIndex = currentIndex;\n currentIndex += 8; // \"https://\".Length = 8\n }\n\n // 如果\"https://\"出现2次或以上,提取最后一个\"https://\"之后的内容\n if (httpsCount >= 2 && lastIndex != -1)\n {\n 原生下载链接 = 代理下载链接.Substring(lastIndex);\n }\n\n string executablePath = Path.GetDirectoryName(Application.ExecutablePath);\n\n // 创建下载请求 - 优化的多级尝试下载逻辑\n Log(\"开始下载文件...\");\n bool downloadSuccess = false;\n string zipFilePath = Path.Combine(executablePath, \"subs-check_Windows_i386.zip\");\n string failureReason = \"\";\n\n // 如果文件已存在,先删除\n if (File.Exists(zipFilePath)) File.Delete(zipFilePath);\n\n // 第一次尝试:使用代理下载链接 + 当前HttpClient(不使用系统代理)\n try\n {\n Log($\"[尝试1/4] 使用代理下载链接:{代理下载链接}\");\n downloadSuccess = await DownloadFileAsync(client, 代理下载链接, zipFilePath);\n }\n catch (Exception ex)\n {\n Log($\"[尝试1/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n\n // 如果第一次尝试失败,且代理链接与原生链接不同,使用原生下载链接尝试\n if (!downloadSuccess && 代理下载链接 != 原生下载链接)\n {\n try\n {\n Log($\"[尝试2/4] 使用原生下载链接:{原生下载链接}\");\n downloadSuccess = await DownloadFileAsync(client, 原生下载链接, zipFilePath);\n }\n catch (Exception ex)\n {\n Log($\"[尝试2/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n }\n\n // 如果前面的尝试都失败,创建使用系统代理的HttpClient再次尝试\n if (!downloadSuccess)\n {\n try\n {\n Log(\"[尝试3/4] 使用系统代理 + 代理下载链接\");\n using (HttpClient proxyClient = new HttpClient())\n {\n proxyClient.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n proxyClient.Timeout = TimeSpan.FromSeconds(30);\n\n downloadSuccess = await DownloadFileAsync(proxyClient, 代理下载链接, zipFilePath);\n }\n }\n catch (Exception ex)\n {\n Log($\"[尝试3/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n\n // 最后一次尝试:使用系统代理 + 原生链接(如果不同)\n if (!downloadSuccess && 代理下载链接 != 原生下载链接)\n {\n try\n {\n Log(\"[尝试4/4] 使用系统代理 + 原生下载链接\");\n using (HttpClient proxyClient = new HttpClient())\n {\n proxyClient.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n proxyClient.Timeout = TimeSpan.FromSeconds(30);\n\n downloadSuccess = await DownloadFileAsync(proxyClient, 原生下载链接, zipFilePath);\n }\n }\n catch (Exception ex)\n {\n Log($\"[尝试4/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n }\n }\n\n if (downloadSuccess)\n {\n Log(\"下载完成,正在解压文件...\");\n\n // 解压文件的代码保持不变\n using (System.IO.Compression.ZipArchive archive = System.IO.Compression.ZipFile.OpenRead(zipFilePath))\n {\n // 查找subs-check.exe\n System.IO.Compression.ZipArchiveEntry exeEntry = archive.Entries.FirstOrDefault(\n entry => entry.Name.Equals(\"subs-check.exe\", StringComparison.OrdinalIgnoreCase));\n\n if (exeEntry != null)\n {\n string exeFilePath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 如果文件已存在,先删除\n if (File.Exists(exeFilePath))\n {\n File.Delete(exeFilePath);\n }\n\n // 解压文件\n exeEntry.ExtractToFile(exeFilePath);\n 当前subsCheck版本号 = latestVersion;\n Log($\"subs-check.exe {当前subsCheck版本号} 已就绪!\");\n\n await SaveConfig(false);\n\n // 删除下载的zip文件\n //File.Delete(zipFilePath);\n }\n else\n {\n Log(\"无法在压缩包中找到 subs-check.exe 文件。\", true);\n }\n }\n }\n else\n {\n // 所有尝试都失败\n Log($\"所有下载尝试均失败,最后错误: {failureReason}\", true);\n MessageBox.Show($\"下载 subs-check.exe 失败,请检查网络连接后重试。\\n\\n可尝试更换 Github Proxy 后,点击「检查更新」>「更新内核」。\\n或前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"下载失败\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n progressBar1.Value = 0;\n }\n\n // 解压文件\n using (System.IO.Compression.ZipArchive archive = System.IO.Compression.ZipFile.OpenRead(zipFilePath))\n {\n // 查找subs-check.exe\n System.IO.Compression.ZipArchiveEntry exeEntry = archive.Entries.FirstOrDefault(\n entry => entry.Name.Equals(\"subs-check.exe\", StringComparison.OrdinalIgnoreCase));\n\n if (exeEntry != null)\n {\n string exeFilePath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 如果文件已存在,先删除\n if (File.Exists(exeFilePath))\n {\n File.Delete(exeFilePath);\n }\n\n // 解压文件\n exeEntry.ExtractToFile(exeFilePath);\n 当前subsCheck版本号 = latestVersion;\n Log($\"subs-check.exe {当前subsCheck版本号} 已就绪!\");\n\n await SaveConfig(false);\n // 这里保留原有行为,不修改button1.Enabled\n\n // 删除下载的zip文件\n //File.Delete(zipFilePath);\n }\n else\n {\n Log(\"无法在压缩包中找到 subs-check.exe 文件。\", true);\n }\n }\n }\n else\n {\n Log(\"无法找到适用于 Windows i386 的下载链接。\", true);\n MessageBox.Show(\"未能找到适用的 subs-check.exe 下载链接。\\n\\n可尝试更换 Github Proxy 后,点击「检查更新」>「更新内核」。\\n或前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n }\n catch (Exception ex)\n {\n Log($\"下载过程中出错: {ex.Message}\", true);\n MessageBox.Show($\"下载 subs-check.exe 时出错: {ex.Message}\\n\\n可尝试更换 Github Proxy 后,点击「检查更新」>「更新内核」。\\n或前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n } \n }\n catch (Exception ex)\n {\n Log($\"初始化下载过程出错: {ex.Message}\", true);\n MessageBox.Show($\"下载准备过程出错: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n\n button1.Enabled = true;\n downloading = 0;\n }\n\n /// \n /// 获取最新版本号和对应的下载链接\n /// \n /// API请求URL\n /// 是否在日志中输出信息\n /// 包含最新版本号和下载链接的元组\n private async Task<(string LatestVersion, JArray assets)> 获取版本号(string 版本号URL, bool 是否输出log = false)\n {\n string latestVersion = \"未知版本\";\n JArray assets = null;\n\n // 创建不使用系统代理的 HttpClientHandler\n HttpClientHandler handler = new HttpClientHandler\n {\n UseProxy = false,\n Proxy = null\n };\n\n // 使用自定义 handler 创建 HttpClient\n using (HttpClient client = new HttpClient(handler))\n {\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n client.Timeout = TimeSpan.FromSeconds(30); // 增加超时时间以适应下载需求\n\n if (是否输出log) Log(\"正在获取最新版本 subs-check.exe 内核下载地址...\");\n string url = 版本号URL;\n string 备用url = 版本号URL.Replace(\"api.github.com\", \"api.github.cmliussss.net\");\n\n HttpResponseMessage response = null;\n string responseBody = null;\n JObject json = null;\n\n // 先尝试主URL\n try\n {\n response = await client.GetAsync(url);\n\n // 如果主URL请求成功返回有效数据\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从主API获取版本信息\");\n }\n // 如果主URL请求不成功但没有抛出异常\n else\n {\n if (是否输出log) Log($\"主API请求失败 HTTP {(int)response.StatusCode},尝试备用API...\");\n response = await client.GetAsync(备用url);\n\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用API获取版本信息\");\n }\n else\n {\n if (是否输出log) Log($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return (latestVersion, assets); // 两个URL都失败,提前退出\n }\n }\n }\n // 捕获网络请求异常(如连接超时、无法解析域名等)\n catch (HttpRequestException ex)\n {\n if (是否输出log) Log($\"主API请求出错: {ex.Message},尝试备用API...\");\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用API获取版本信息\");\n }\n else\n {\n if (是否输出log) Log($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return (latestVersion, assets); // 备用URL也失败,提前退出\n }\n }\n catch (Exception backupEx)\n {\n if (是否输出log) Log($\"备用API请求也出错: {backupEx.Message}\", true);\n return (latestVersion, assets); // 连备用URL也异常,提前退出\n }\n }\n // 捕获JSON解析异常\n catch (Newtonsoft.Json.JsonException ex)\n {\n if (是否输出log) Log($\"解析JSON数据出错: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用API获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n if (是否输出log) Log($\"备用API请求也出错: {backupEx.Message}\", true);\n return (latestVersion, assets); // 连备用URL也有问题,提前退出\n }\n }\n // 捕获其他所有异常\n catch (Exception ex)\n {\n if (是否输出log) Log($\"获取版本信息时出现未预期的错误: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用URL获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n if (是否输出log) Log($\"备用API请求也出错: {backupEx.Message}\", true);\n return (latestVersion, assets); // 连备用URL也有问题,提前退出\n }\n }\n\n // 如果成功获取了JSON数据,继续处理\n if (json != null)\n {\n latestVersion = json[\"tag_name\"].ToString();\n assets = (JArray)json[\"assets\"];\n }\n }\n\n return (latestVersion, assets);\n }\n\n\n private async void StartSubsCheckProcess()\n {\n try\n {\n // 重置进度条\n progressBar1.Value = 0;\n groupBox2.Text = \"实时日志\";\n using (MemoryStream ms = new MemoryStream(Properties.Resources.going))\n {\n notifyIcon1.Icon = new Icon(ms);\n }\n\n // 获取当前应用程序目录\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string subsCheckPath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 检查是否有其他subs-check.exe进程正在运行,并强制结束它们\n try\n {\n Process[] processes = Process.GetProcessesByName(\"subs-check\");\n if (processes.Length > 0)\n {\n Log(\"发现正在运行的subs-check.exe进程,正在强制结束...\");\n foreach (Process process in processes)\n {\n // 确保不是当前应用程序的进程\n if (process != subsCheckProcess)\n {\n try\n {\n process.Kill();\n process.WaitForExit();\n Log($\"成功结束subs-check.exe进程(ID: {process.Id})\");\n }\n catch (Exception ex)\n {\n Log($\"结束subs-check.exe进程时出错(ID: {process.Id}): {ex.Message}\", true);\n }\n }\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"检查运行中的subs-check.exe进程时出错: {ex.Message}\", true);\n }\n\n // 检查文件是否存在\n if (!File.Exists(subsCheckPath))\n {\n Log(\"没有找到 subs-check.exe 文件。\", true);\n await DownloadSubsCheckEXE(); // 使用异步等待\n }\n\n // 创建进程启动信息\n ProcessStartInfo startInfo = new ProcessStartInfo\n {\n FileName = subsCheckPath,\n UseShellExecute = false,\n RedirectStandardOutput = true,\n RedirectStandardError = true,\n CreateNoWindow = true,\n WorkingDirectory = executablePath,\n StandardOutputEncoding = Encoding.UTF8,\n StandardErrorEncoding = Encoding.UTF8\n };\n\n // 创建进程\n subsCheckProcess = new Process { StartInfo = startInfo };\n\n // 设置输出和错误数据接收事件处理\n subsCheckProcess.OutputDataReceived += SubsCheckProcess_OutputDataReceived;\n subsCheckProcess.ErrorDataReceived += SubsCheckProcess_OutputDataReceived;\n\n // 启动进程\n subsCheckProcess.Start();\n\n // 开始异步读取输出\n subsCheckProcess.BeginOutputReadLine();\n subsCheckProcess.BeginErrorReadLine();\n\n // 设置进程退出事件处理\n subsCheckProcess.EnableRaisingEvents = true;\n subsCheckProcess.Exited += SubsCheckProcess_Exited;\n\n Log($\"subs-check.exe {当前subsCheck版本号} 已启动...\");\n timer4.Enabled = true;\n }\n catch (Exception ex)\n {\n Log($\"启动 subs-check.exe 时出错: {ex.Message}\", true);\n button1.Text = \"▶️ 启动\";\n }\n }\n\n\n private void StopSubsCheckProcess()\n {\n timer4.Enabled = false;\n if (subsCheckProcess != null && !subsCheckProcess.HasExited)\n {\n try\n {\n // 尝试正常关闭进程\n subsCheckProcess.Kill();\n subsCheckProcess.WaitForExit();\n Log(\"subs-check.exe 已停止\");\n notifyIcon1.Icon = originalNotifyIcon;\n button7.Enabled = false;\n button7.Text = \"🔀未启动\";\n }\n catch (Exception ex)\n {\n Log($\"停止 subs-check.exe 时出错: {ex.Message}\", true);\n }\n finally\n {\n subsCheckProcess.Dispose();\n subsCheckProcess = null;\n }\n }\n }\n \n private void SubsCheckProcess_OutputDataReceived(object sender, DataReceivedEventArgs e)\n {\n if (!string.IsNullOrEmpty(e.Data))\n {\n // 由于此事件在另一个线程中触发,需要使用 Invoke 在 UI 线程上更新控件\n BeginInvoke(new Action(() =>\n {\n // 过滤ANSI转义序列\n string cleanText = RemoveAnsiEscapeCodes(e.Data);\n\n // 检查是否包含\"下次检查时间\"信息\n if (cleanText.Contains(\"下次检查时间:\"))\n {\n if (button3.Enabled == false)\n {\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string outputFolderPath = System.IO.Path.Combine(executablePath, \"output\");\n if (System.IO.Directory.Exists(outputFolderPath))\n {\n string allyamlFilePath = System.IO.Path.Combine(outputFolderPath, \"all.yaml\");\n if (System.IO.File.Exists(allyamlFilePath)) button3.Enabled = true;\n }\n }\n // 提取完整的下次检查时间信息\n int startIndex = cleanText.IndexOf(\"下次检查时间:\");\n nextCheckTime = cleanText.Substring(startIndex);\n }\n\n if (!cleanText.StartsWith(\"[GIN]\"))\n {\n // 如果不是进度行,则添加到日志中\n richTextBox1.AppendText(cleanText + \"\\r\\n\");\n // 滚动到最底部\n richTextBox1.SelectionStart = richTextBox1.Text.Length;\n richTextBox1.ScrollToCaret();\n }\n\n /*\n // 检查是否是进度信息行\n if (cleanText.StartsWith(\"进度: [\"))\n {\n // 解析百分比\n int percentIndex = cleanText.IndexOf('%');\n if (percentIndex > 0)\n {\n // 查找百分比前面的数字部分\n int startIndex = cleanText.LastIndexOfAny(new char[] { ' ', '>' }, percentIndex) + 1;\n string percentText = cleanText.Substring(startIndex, percentIndex - startIndex);\n\n if (double.TryParse(percentText, out double percentValue))\n {\n // 更新进度条,将百分比值(0-100)设置给进度条\n progressBar1.Value = (int)Math.Round(percentValue);\n }\n }\n\n // 解析节点信息部分(例如:(12/6167) 可用: 0)\n int infoStartIndex = cleanText.IndexOf('(');\n if (infoStartIndex > 0)\n {\n string fullNodeInfo = cleanText.Substring(infoStartIndex);\n\n // 提取最重要的信息:节点数量和可用数量\n int endIndex = fullNodeInfo.IndexOf(\"2025-\"); // 查找日期部分开始位置\n if (endIndex > 0)\n {\n nodeInfo = fullNodeInfo.Substring(0, endIndex).Trim();\n }\n else\n {\n // 如果找不到日期部分,则取前30个字符\n nodeInfo = fullNodeInfo.Length > 30 ? fullNodeInfo.Substring(0, 30) + \"...\" : fullNodeInfo;\n }\n\n groupBox2.Text = \"实时日志 \" + nodeInfo;\n\n // 确保通知图标文本不超过63个字符\n string notifyText = \"SubsCheck: \" + nodeInfo;\n if (notifyText.Length > 63)\n {\n notifyText = notifyText.Substring(0, 60) + \"...\";\n }\n notifyIcon1.Text = notifyText;\n }\n\n // 更新lastProgressLine,但不向richTextBox添加文本\n lastProgressLine = cleanText;\n }\n else\n {\n // 如果不是进度行,则添加到日志中\n richTextBox1.AppendText(cleanText + \"\\r\\n\");\n // 滚动到最底部\n richTextBox1.SelectionStart = richTextBox1.Text.Length;\n richTextBox1.ScrollToCaret();\n }\n */\n }));\n }\n }\n\n\n // 添加一个方法来过滤ANSI转义序列\n private string RemoveAnsiEscapeCodes(string input)\n {\n // 匹配ANSI转义序列的正则表达式\n // 这将匹配类似 \"[2m\"、\"[0m\"、\"[92m\" 等格式的ANSI颜色代码\n return System.Text.RegularExpressions.Regex.Replace(input, @\"\\x1B\\[[0-9;]*[mGK]\", string.Empty);\n }\n\n private void SubsCheckProcess_Exited(object sender, EventArgs e)\n {\n // 进程退出时,在 UI 线程上更新控件\n BeginInvoke(new Action(() =>\n {\n Log(\"subs-check.exe 已退出\");\n button1.Text = \"▶️ 启动\";\n\n // 更新菜单项的启用状态\n startMenuItem.Enabled = true;\n stopMenuItem.Enabled = false;\n\n // 重新启用控件\n numericUpDown1.Enabled = true;\n numericUpDown2.Enabled = true;\n numericUpDown3.Enabled = true;\n numericUpDown4.Enabled = true;\n numericUpDown5.Enabled = true;\n numericUpDown6.Enabled = true;\n textBox1.Enabled = true;\n groupBox3.Enabled = true;\n }));\n }\n\n /// \n /// 获取本地局域网IP地址,如果有多个则让用户选择\n /// \n /// 用户选择的IP地址,如果未选择则返回127.0.0.1\n private string GetLocalLANIP()\n {\n try\n {\n // 获取所有网卡的IP地址\n List lanIPs = new List();\n\n // 获取所有网络接口\n foreach (System.Net.NetworkInformation.NetworkInterface ni in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces())\n {\n // 排除loopback、虚拟网卡和非活动网卡\n if (ni.NetworkInterfaceType != System.Net.NetworkInformation.NetworkInterfaceType.Loopback &&\n ni.OperationalStatus == System.Net.NetworkInformation.OperationalStatus.Up)\n {\n // 获取该网卡的所有IP地址\n foreach (System.Net.NetworkInformation.UnicastIPAddressInformation ip in ni.GetIPProperties().UnicastAddresses)\n {\n // 只添加IPv4地址且不是回环地址\n if (ip.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork &&\n !System.Net.IPAddress.IsLoopback(ip.Address))\n {\n lanIPs.Add(ip.Address.ToString());\n }\n }\n }\n }\n\n // 如果没有找到任何IP地址,返回本地回环地址\n if (lanIPs.Count == 0)\n {\n return \"127.0.0.1\";\n }\n // 如果只找到一个IP地址,直接返回\n else if (lanIPs.Count == 1)\n {\n return lanIPs[0];\n }\n // 如果有多个IP地址,让用户选择\n else\n {\n // 创建选择窗口\n Form selectForm = new Form();\n selectForm.Text = \"选择局域网IP地址\";\n selectForm.StartPosition = FormStartPosition.CenterParent;\n /*\n selectForm.Width = 520; // 保持宽度\n selectForm.Height = 320; // 增加高度以容纳额外的警告标签\n selectForm.FormBorderStyle = FormBorderStyle.FixedDialog;\n */\n selectForm.AutoSize = true; // 启用自动大小调整\n selectForm.AutoSizeMode = AutoSizeMode.GrowAndShrink; // 根据内容调整大小\n selectForm.FormBorderStyle = FormBorderStyle.FixedSingle; // 使用固定但可调整的边框\n selectForm.ShowIcon = false;\n selectForm.MaximizeBox = false;\n selectForm.MinimizeBox = false;\n\n // 添加说明标签\n Label label = new Label();\n label.Text = \"发现多个局域网IP地址:\\n\\n\" +\n \"· 仅在本机访问:直接点击【取消】,将使用127.0.0.1\\n\\n\" +\n \"· 局域网内其他设备访问:请在下面列表中选择一个正确的局域网IP\";\n label.Location = new Point(15, 10);\n label.AutoSize = true;\n label.MaximumSize = new Size(380, 0); // 设置最大宽度,允许自动换行\n selectForm.Controls.Add(label);\n\n // 计算标签高度以正确放置列表框\n int labelHeight = label.Height + 20;\n\n // 添加IP地址列表框\n ListBox listBox = new ListBox();\n listBox.Location = new Point(15, labelHeight);\n listBox.Width = 380;\n listBox.Height = 130; // 保持列表框高度\n foreach (string ip in lanIPs)\n {\n listBox.Items.Add(ip);\n }\n // 查找非\".1\"结尾的IP地址,如果所有IP都以\".1\"结尾,则使用第一个IP\n int selectedIndex = 0;\n for (int i = 0; i < lanIPs.Count; i++)\n {\n if (!lanIPs[i].EndsWith(\".1\"))\n {\n selectedIndex = i;\n break;\n }\n }\n\n // 设置选中的索引\n listBox.SelectedIndex = selectedIndex;\n selectForm.Controls.Add(listBox);\n\n // 添加警告标签(放在列表框下方)\n Label warningLabel = new Label();\n warningLabel.Text = \"注意:选择错误的IP会导致局域网内其他设备无法访问。\\n\\n   推荐您可以先尝试使用非“.1”结尾的IP!\";\n warningLabel.Location = new Point(15, labelHeight + listBox.Height + 10);\n warningLabel.AutoSize = true;\n warningLabel.ForeColor = Color.Red; // 警告文本使用红色\n selectForm.Controls.Add(warningLabel);\n\n // 计算按钮位置(居中排布)\n int buttonY = labelHeight + listBox.Height + warningLabel.Height + 20;\n int buttonTotalWidth = 75 * 2 + 15; // 两个按钮的宽度加间距\n int buttonStartX = (selectForm.ClientSize.Width - buttonTotalWidth) / 2;\n\n // 添加确定按钮\n Button okButton = new Button();\n okButton.Text = \"确定\";\n okButton.DialogResult = DialogResult.OK;\n okButton.Location = new Point(buttonStartX, buttonY);\n okButton.Width = 75;\n selectForm.Controls.Add(okButton);\n selectForm.AcceptButton = okButton;\n\n // 添加取消按钮\n Button cancelButton = new Button();\n cancelButton.Text = \"取消\";\n cancelButton.DialogResult = DialogResult.Cancel;\n cancelButton.Location = new Point(buttonStartX + 90, buttonY);\n cancelButton.Width = 75;\n selectForm.Controls.Add(cancelButton);\n selectForm.CancelButton = cancelButton;\n\n // 显示选择窗口\n if (selectForm.ShowDialog() == DialogResult.OK)\n {\n return listBox.SelectedItem.ToString();\n }\n else\n {\n return \"127.0.0.1\"; // 如果用户取消,返回本地回环地址\n }\n }\n\n\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"获取局域网IP地址时出错: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n return \"127.0.0.1\";\n }\n }\n\n private void button3_Click(object sender, EventArgs e)\n {\n string 本地IP = GetLocalLANIP();\n try\n {\n // 构造URL\n string url = comboBox4.Text == \"Clash\" ? $\"http://{本地IP}:{numericUpDown7.Value}/api/file/mihomo\" : $\"http://{本地IP}:{numericUpDown7.Value}/download/sub\";\n\n // 将URL复制到剪贴板\n Clipboard.SetText(url);\n button3.Text = \"复制成功\";\n timer2.Enabled = true;\n // 可选:显示提示消息\n //MessageBox.Show($\"URL已复制到剪贴板:\\n{url}\", \"复制成功\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"复制到剪贴板时出错:{ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n private void timer2_Tick(object sender, EventArgs e)\n {\n button3.Text = \"复制订阅\";\n }\n\n private void comboBox3_Leave(object sender, EventArgs e)\n {\n // 检查是否有内容\n if (string.IsNullOrWhiteSpace(comboBox3.Text)) \n {\n comboBox3.Text = \"自动选择\";\n return;\n }\n\n string input = comboBox3.Text.Trim();\n\n // 检查是否存在 \"://\" 协议部分\n int protocolIndex = input.IndexOf(\"://\");\n if (protocolIndex >= 0)\n {\n // 保留 \"://\" 之后的内容\n input = input.Substring(protocolIndex + 3);\n }\n\n // 检查是否存在 \"/\" 路径部分\n int pathIndex = input.IndexOf('/');\n if (pathIndex >= 0)\n {\n // 只保留 \"/\" 之前的域名部分\n input = input.Substring(0, pathIndex);\n }\n\n // 更新 comboBox3 的文本\n comboBox3.Text = input;\n }\n\n private void 判断保存类型()\n {\n if (comboBox1.Text == \"本地\" || button2.Text == \"高级设置∨\")\n {\n groupBox4.Visible = false;\n groupBox5.Visible = false;\n groupBox6.Visible = false;\n }\n else if (comboBox1.Text == \"gist\" && button2.Text == \"高级设置∧\")\n {\n groupBox4.Visible = true;\n\n groupBox5.Visible = false;\n groupBox6.Visible = false;\n }\n else if (comboBox1.Text == \"r2\" && button2.Text == \"高级设置∧\")\n {\n groupBox5.Location = groupBox4.Location;\n groupBox5.Visible = true;\n\n groupBox4.Visible = false;\n groupBox6.Visible = false;\n }\n else if (comboBox1.Text == \"webdav\" && button2.Text == \"高级设置∧\")\n {\n groupBox6.Location = groupBox4.Location;\n groupBox6.Visible = true;\n\n groupBox4.Visible = false;\n groupBox5.Visible = false;\n }\n }\n\n private void comboBox1_TextChanged(object sender, EventArgs e)\n {\n 判断保存类型();\n if(!(comboBox1.Text == \"本地\" || comboBox1.Text == \"\") && button2.Text == \"高级设置∨\") button2_Click(sender, e);\n }\n\n private void textBox3_Enter(object sender, EventArgs e)\n {\n textBox3.PasswordChar = '\\0';\n textBox6.PasswordChar = '\\0';\n textBox8.PasswordChar = '\\0';\n }\n\n private void textBox3_Leave(object sender, EventArgs e)\n {\n textBox3.PasswordChar = '*';\n textBox6.PasswordChar = '*';\n textBox8.PasswordChar = '*';\n }\n\n private void textBox10_Enter(object sender, EventArgs e)\n {\n textBox10.PasswordChar = '\\0';\n if (textBox10.Text == \"请输入密钥\")\n {\n textBox10.Text = \"\";\n textBox10.ForeColor = Color.Black;\n }\n }\n\n private void textBox10_Leave(object sender, EventArgs e)\n {\n \n if (textBox10.Text == \"\")\n {\n textBox10.PasswordChar = '\\0';\n textBox10.Text = \"请输入密钥\";\n textBox10.ForeColor = Color.Gray;\n }\n else\n {\n textBox10.ForeColor = Color.Black;\n textBox10.PasswordChar = '*';\n }\n }\n\n private void textBox7_Leave(object sender, EventArgs e)\n {\n // 检查是否有内容\n if (string.IsNullOrWhiteSpace(textBox7.Text))\n return;\n\n string input = textBox7.Text.Trim();\n\n try\n {\n // 尝试解析为 URI\n Uri uri = new Uri(input);\n\n // 构建基础 URL (scheme + authority)\n string baseUrl = $\"{uri.Scheme}://{uri.Authority}\";\n\n // 更新 textBox7 的文本为基础 URL\n textBox7.Text = baseUrl;\n }\n catch (UriFormatException)\n {\n // 如果输入的不是有效 URI,尝试使用简单的字符串处理\n // 查找双斜杠后的第一个斜杠\n int schemeIndex = input.IndexOf(\"://\");\n if (schemeIndex >= 0)\n {\n int pathStartIndex = input.IndexOf('/', schemeIndex + 3);\n if (pathStartIndex >= 0)\n {\n // 截取到路径开始之前\n textBox7.Text = input.Substring(0, pathStartIndex);\n }\n }\n }\n }\n\n private void Log(string message, bool isError = false)\n {\n string timestamp = DateTime.Now.ToString(\"yyyy-MM-dd HH:mm:ss\");\n string logType = isError ? \"ERR\" : \"INF\";\n richTextBox1.AppendText($\"{timestamp} {logType} {message}\\r\\n\");\n\n if (richTextBox1.IsHandleCreated)\n {\n richTextBox1.BeginInvoke((MethodInvoker)(() =>\n {\n // 滚动到最底部\n richTextBox1.SelectionStart = richTextBox1.Text.Length;\n richTextBox1.ScrollToCaret();\n }));\n }\n }\n\n private void 恢复窗口()\n {\n // 首先显示窗体\n this.Show();\n\n // 强制停止当前布局逻辑\n this.SuspendLayout();\n\n // 恢复窗口状态\n this.WindowState = FormWindowState.Normal;\n\n // 强制重新布局\n this.ResumeLayout(true); // 参数true表示立即执行布局\n\n // 调用刷新布局的方法\n this.PerformLayout();\n\n // 处理WindowsForms消息队列中的所有挂起消息\n Application.DoEvents();\n\n // 激活窗口(使其获得焦点)\n this.Activate();\n }\n\n private void 隐藏窗口()\n {\n // 隐藏窗体(从任务栏消失)\n this.Hide();\n\n // 确保通知图标可见\n notifyIcon1.Visible = true;\n\n // 可选:显示气泡提示\n notifyIcon1.ShowBalloonTip(1000, \"SubsCheck\", \"程序已最小化到系统托盘\", ToolTipIcon.Info);\n }\n\n private void notifyIcon1_MouseClick(object sender, MouseEventArgs e)\n {\n if (e.Button == MouseButtons.Left)\n {\n // 检查窗口是否可见\n if (this.Visible)\n {\n // 如果窗口当前可见,则隐藏窗口\n 隐藏窗口();\n }\n else\n {\n // 如果窗口当前不可见,则恢复窗口\n 恢复窗口();\n }\n }\n }\n\n // 创建专用方法用于异步检测GitHub代理\n private async Task DetectGitHubProxyAsync(List proxyItems)\n {\n bool proxyFound = false;\n string detectedProxyURL = \"\";\n\n Log(\"检测可用 GitHub 代理...\");\n\n // 遍历随机排序后的代理列表\n foreach (string proxyItem in proxyItems)\n {\n string checkUrl = $\"https://{proxyItem}/https://raw.githubusercontent.com/cmliu/SubsCheck-Win-GUI/master/packages.config\";\n Log($\"正在测试 GitHub 代理: {proxyItem}\");\n richTextBox1.Refresh();\n\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); // 设置5秒超时\n // 添加User-Agent头,避免被拒绝访问\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n\n // 使用异步方式\n HttpResponseMessage response = await client.GetAsync(checkUrl);\n if (response.IsSuccessStatusCode)\n {\n // 找到可用代理\n detectedProxyURL = $\"https://{proxyItem}/\";\n Log($\"找到可用 GitHub 代理: {proxyItem}\");\n proxyFound = true;\n break;\n }\n }\n }\n catch (Exception ex)\n {\n // 记录错误但继续尝试下一个\n Log($\"代理 {proxyItem} 测试失败: {ex.Message}\", true);\n richTextBox1.Refresh();\n }\n }\n\n // 如果没有找到可用的代理\n if (!proxyFound)\n {\n Log(\"未找到可用的 GitHub 代理,请在高级设置中手动设置。\", true);\n MessageBox.Show(\"未找到可用的 GitHub 代理。\\n\\n请打开高级设置手动填入一个可用的Github Proxy,或检查您的网络连接。\",\n \"代理检测失败\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Warning);\n }\n\n return detectedProxyURL;\n }\n\n private async void button5_Click(object sender, EventArgs e)\n {\n try\n {\n button5.Enabled = false;\n button1.Enabled = false;\n // 清空日志\n richTextBox1.Clear();\n Log(\"开始检查和下载最新版本的 subs-check.exe...\");\n\n // 获取当前应用程序目录\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string subsCheckPath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 检查文件是否存在\n if (File.Exists(subsCheckPath))\n {\n Log($\"发现 subs-check.exe,正在删除...\");\n\n try\n {\n // 首先检查是否有进程正在运行\n Process[] processes = Process.GetProcessesByName(\"subs-check\");\n if (processes.Length > 0)\n {\n Log(\"发现正在运行的 subs-check.exe 进程,正在强制结束...\");\n foreach (Process process in processes)\n {\n try\n {\n process.Kill();\n process.WaitForExit();\n Log($\"成功结束 subs-check.exe 进程(ID: {process.Id})\");\n }\n catch (Exception ex)\n {\n Log($\"结束进程时出错(ID: {process.Id}): {ex.Message}\", true);\n }\n }\n }\n\n // 删除文件\n File.Delete(subsCheckPath);\n Log(\"成功删除旧版本 subs-check.exe\");\n }\n catch (Exception ex)\n {\n Log($\"删除 subs-check.exe 时出错: {ex.Message}\", true);\n MessageBox.Show($\"无法删除现有的 subs-check.exe 文件: {ex.Message}\\n\\n请手动删除后重试,或者检查文件是否被其他程序占用。\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n button5.Enabled = true;\n return;\n }\n }\n else\n {\n Log(\"未找到现有的 subs-check.exe 文件,将直接下载最新版本\");\n }\n\n // 检测可用的 GitHub 代理\n if (!string.IsNullOrEmpty(comboBox3.Text) && comboBox3.Text == \"自动选择\")\n {\n // 创建不包含\"自动选择\"的代理列表\n List proxyItems = new List();\n for (int j = 0; j < comboBox3.Items.Count; j++)\n {\n string proxyItem = comboBox3.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n\n // 随机打乱列表顺序\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n\n // 异步检测可用代理\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n\n // 如果未能找到可用代理,提示用户\n if (string.IsNullOrEmpty(githubProxyURL))\n {\n Log(\"未能找到可用的 GitHub 代理,下载可能会失败\", true);\n }\n }\n else if (!string.IsNullOrEmpty(comboBox3.Text))\n {\n githubProxyURL = $\"https://{comboBox3.Text}/\";\n Log($\"使用指定的 GitHub 代理: {comboBox3.Text}\");\n }\n else\n {\n Log(\"未设置 GitHub 代理,将尝试直接下载\", true);\n }\n\n // 下载最新版本的 subs-check.exe\n await DownloadSubsCheckEXE();\n\n // 完成\n Log(\"内核更新完成!\");\n }\n catch (Exception ex)\n {\n Log($\"操作过程中出错: {ex.Message}\", true);\n MessageBox.Show($\"处理过程中出现错误: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n finally\n {\n button5.Enabled = true;\n button1.Enabled = true;\n }\n }\n\n private decimal 订阅端口;\n private decimal SubStore端口;\n private void numericUpDown6_ValueChanged(object sender, EventArgs e)\n {\n // 检查numericUpDown7是否存在并且与numericUpDown6的值相等\n if (numericUpDown6.Value == numericUpDown7.Value)\n {\n // 显示警告消息\n MessageBox.Show(\"订阅端口 和 Sub-Store端口 不能相同!\",\n \"端口冲突\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Warning);\n\n // 将numericUpDown6的值恢复为更改前的值\n numericUpDown6.Value = 订阅端口;\n numericUpDown7.Value = SubStore端口;\n }\n else\n {\n // 保存当前值作为下次比较的基准\n 订阅端口 = numericUpDown6.Value;\n SubStore端口 = numericUpDown7.Value;\n }\n }\n\n /// \n /// 异步检测并强制终止所有程序目录下的output\\node.exe进程\n /// \n private async Task KillNodeProcessAsync()\n {\n try\n {\n Log(\"检查 node.exe 进程状态...\");\n\n // 获取当前应用程序的执行目录\n string executablePath = Path.GetDirectoryName(Application.ExecutablePath);\n string nodeExePath = Path.Combine(executablePath, \"output\", \"node.exe\");\n\n // 获取所有node.exe进程\n Process[] nodeProcesses = Process.GetProcessesByName(\"node\");\n\n if (nodeProcesses.Length == 0)\n {\n Log(\"未发现运行中的 node.exe 进程\");\n return;\n }\n\n Log($\"发现 {nodeProcesses.Length} 个 node.exe 进程,开始检查并终止匹配路径的进程...\");\n\n int terminatedCount = 0;\n\n foreach (Process process in nodeProcesses)\n {\n try\n {\n // 使用Task.Run将可能耗时的操作放在后台线程执行\n string processPath = await Task.Run(() => {\n try\n {\n return process.MainModule?.FileName;\n }\n catch (Exception)\n {\n return null;\n }\n });\n\n // 检查是否匹配我们要查找的node.exe路径\n if (!string.IsNullOrEmpty(processPath) &&\n processPath.Equals(nodeExePath, StringComparison.OrdinalIgnoreCase))\n {\n // 找到匹配的进程,终止它\n Log($\"发现匹配路径的 node.exe 进程(ID: {process.Id}),正在强制结束...\");\n\n await Task.Run(() => {\n process.Kill();\n process.WaitForExit();\n });\n\n Log($\"成功结束 node.exe 进程(ID: {process.Id})\");\n terminatedCount++;\n }\n }\n catch (Exception ex)\n {\n // 访问进程信息时可能会因为权限问题抛出异常\n Log($\"访问或终止进程(ID: {process.Id})时出错: {ex.Message}\", true);\n }\n }\n\n if (terminatedCount > 0)\n {\n Log($\"总共终止了 {terminatedCount} 个匹配路径的 node.exe 进程\");\n }\n else\n {\n Log(\"未发现需要终止的 node.exe 进程\");\n }\n }\n catch (Exception ex)\n {\n Log($\"检查或终止 node.exe 进程时出错: {ex.Message}\", true);\n }\n }\n\n private async void textBox1_DoubleClick(object sender, EventArgs e)\n {\n if (textBox1.Enabled)\n {\n // 创建EditURLs窗口的实例\n EditURLs editURLsForm = new EditURLs();\n\n // 传递当前textBox1的内容到EditURLs窗口\n editURLsForm.UrlContent = textBox1.Text + \"\\n\";\n editURLsForm.githubProxys = comboBox3.Items;\n editURLsForm.githubProxy = comboBox3.Text;\n // 显示对话框并等待结果\n DialogResult result = editURLsForm.ShowDialog();\n\n // 如果用户点击了\"保存并关闭\"按钮(返回DialogResult.OK)\n if (result == DialogResult.OK)\n {\n // 获取编辑后的内容,按行拆分,过滤空行\n string[] lines = editURLsForm.UrlContent.Split(\n new[] { \"\\r\\n\", \"\\r\", \"\\n\" },\n StringSplitOptions.RemoveEmptyEntries);\n\n // 去除每行首尾的空白字符\n for (int i = 0; i < lines.Length; i++)\n {\n lines[i] = lines[i].Trim();\n }\n\n // 再次过滤掉空行\n lines = lines.Where(line => !string.IsNullOrWhiteSpace(line)).ToArray();\n\n // 将处理后的内容更新到Form1的textBox1\n textBox1.Text = string.Join(Environment.NewLine, lines);\n await SaveConfig(false);\n Log(\"已保存订阅地址列表。\");\n }\n }\n\n }\n\n private void checkBox1_CheckedChanged(object sender, EventArgs e)\n {\n if (checkBox1.Checked == false) checkBox2.Checked = false;\n }\n\n private void checkBox2_CheckedChanged(object sender, EventArgs e)\n {\n if (checkBox2.Checked == true) checkBox1.Checked = true;\n }\n\n private async void timer3_Tick(object sender, EventArgs e)\n {\n if (button1.Text == \"⏹️ 停止\") \n {\n Log(\"subs-check.exe 运行时满24小时,自动重启清理内存占用。\");\n // 停止 subs-check.exe 程序\n StopSubsCheckProcess();\n // 结束 Sub-Store\n await KillNodeProcessAsync();\n // 重新启动 subs-check.exe 程序\n StartSubsCheckProcess();\n numericUpDown1.Enabled = false;\n numericUpDown2.Enabled = false;\n numericUpDown3.Enabled = false;\n numericUpDown4.Enabled = false;\n numericUpDown5.Enabled = false;\n numericUpDown6.Enabled = false;\n numericUpDown7.Enabled = false;\n comboBox1.Enabled = false;\n textBox1.Enabled = false;\n groupBox3.Enabled = false;\n groupBox4.Enabled = false;\n groupBox5.Enabled = false;\n groupBox6.Enabled = false;\n button1.Text = \"⏹️ 停止\";\n }\n }\n\n private void button4_Click(object sender, EventArgs e)\n {\n // 创建 CheckUpdates 窗口实例\n CheckUpdates checkUpdatesForm = new CheckUpdates();\n\n // 传递必要的数据和状态\n checkUpdatesForm.githubProxys = comboBox3.Items;\n checkUpdatesForm.githubProxy = comboBox3.Text;\n\n checkUpdatesForm.当前subsCheck版本号 = 当前subsCheck版本号;\n checkUpdatesForm.当前GUI版本号 = 当前GUI版本号;\n checkUpdatesForm.最新GUI版本号 = 最新GUI版本号;\n\n // 为 CheckUpdates 的 button2 添加点击事件处理程序\n checkUpdatesForm.FormClosed += (s, args) => {\n // 移除事件处理,避免内存泄漏\n if (checkUpdatesForm.DialogResult == DialogResult.OK)\n {\n // 如果返回OK结果,表示按钮被点击并需要更新内核\n button5_Click(this, EventArgs.Empty);\n }\n };\n\n // 设置 button2 点击后关闭窗口并返回 DialogResult.OK\n // 这需要在 CheckUpdates.cs 中修改 button2_Click 方法\n\n // 显示 CheckUpdates 窗口\n checkUpdatesForm.ShowDialog();\n }\n\n private void checkBox3_CheckedChanged(object sender, EventArgs e)\n {\n if (checkBox3.Checked) numericUpDown8.Enabled = true;\n else numericUpDown8.Enabled = false;\n }\n\n private async void comboBox5_SelectedIndexChanged(object sender, EventArgs e)\n {\n if (comboBox5.Text.Contains(\"[内置]\")) await ProcessComboBox5Selection(true);\n }\n\n private async Task ProcessComboBox5Selection(bool 汇报Log = false)\n {\n // 确定文件名和下载URL\n string fileName;\n string downloadFilePath;\n string downloadUrl;\n string displayName;\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n if (comboBox5.Text.Contains(\"[内置]布丁狗\"))\n {\n fileName = \"bdg.yaml\";\n displayName = \"[内置]布丁狗的订阅转换\";\n downloadUrl = \"https://raw.githubusercontent.com/cmliu/ACL4SSR/main/yaml/bdg.yaml\";\n }\n else // [内置]ACL4SSR\n {\n fileName = \"ACL4SSR_Online_Full.yaml\";\n displayName = \"[内置]ACL4SSR_Online_Full\";\n downloadUrl = \"https://raw.githubusercontent.com/beck-8/override-hub/main/yaml/ACL4SSR_Online_Full.yaml\";\n }\n\n // 确保output文件夹存在\n string outputFolderPath = Path.Combine(executablePath, \"output\");\n if (!Directory.Exists(outputFolderPath))\n {\n Directory.CreateDirectory(outputFolderPath);\n }\n\n // 确定文件完整路径\n downloadFilePath = Path.Combine(outputFolderPath, fileName);\n\n // 检查文件是否存在\n if (!File.Exists(downloadFilePath))\n {\n Log($\"{displayName} 覆写配置文件 未找到,正在下载...\");\n\n // 重置进度条\n progressBar1.Value = 0;\n\n // 添加GitHub代理前缀如果有\n string fullDownloadUrl = githubProxyURL + downloadUrl;\n\n try\n {\n // 创建不使用系统代理的HttpClientHandler\n using (HttpClientHandler handler = new HttpClientHandler { UseProxy = false, Proxy = null })\n using (HttpClient client = new HttpClient(handler))\n {\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n client.Timeout = TimeSpan.FromSeconds(15); // 设置15秒超时\n\n // 先获取文件大小\n HttpResponseMessage headResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Head, fullDownloadUrl));\n long totalBytes = headResponse.Content.Headers.ContentLength ?? 0;\n\n // 如果无法获取文件大小,显示不确定进度\n if (totalBytes == 0)\n {\n Console.WriteLine($\"无法获取 {displayName} 文件大小,将显示不确定进度\");\n }\n\n // 创建下载请求并获取响应流\n using (var response = await client.GetAsync(fullDownloadUrl, HttpCompletionOption.ResponseHeadersRead))\n {\n if (response.IsSuccessStatusCode)\n {\n using (var contentStream = await response.Content.ReadAsStreamAsync())\n using (var fileStream = new FileStream(downloadFilePath, FileMode.Create, FileAccess.Write, FileShare.None, 8192, true))\n {\n byte[] buffer = new byte[8192];\n long totalBytesRead = 0;\n int bytesRead;\n\n while ((bytesRead = await contentStream.ReadAsync(buffer, 0, buffer.Length)) > 0)\n {\n await fileStream.WriteAsync(buffer, 0, bytesRead);\n totalBytesRead += bytesRead;\n\n // 更新进度条\n if (totalBytes > 0)\n {\n int progressPercentage = (int)((totalBytesRead * 100) / totalBytes);\n // 确保进度值在有效范围内 (0-100)\n progressPercentage = Math.Min(100, Math.Max(0, progressPercentage));\n progressBar1.Value = progressPercentage;\n }\n }\n\n // 确保进度条显示100%\n progressBar1.Value = 100;\n }\n\n Log($\"{displayName} 覆写配置文件 下载成功\");\n }\n else\n {\n Log($\"{displayName} 覆写配置文件 下载失败: HTTP {(int)response.StatusCode} {response.ReasonPhrase}\", true);\n }\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"{displayName} 覆写配置文件 下载失败: {ex.Message}\", true);\n // 出错时重置进度条\n progressBar1.Value = 0;\n }\n }\n else\n {\n if (汇报Log) Log($\"{displayName} 覆写配置文件 已就绪。\");\n }\n }\n\n private void numericUpDown1_ValueChanged(object sender, EventArgs e)\n {\n if (numericUpDown1.Value > 128)\n {\n string warningMessage =\n \"⚠️ 高并发风险提醒 ⚠️\\n\\n\" +\n \"您设置的并发数值过高,可能导致:\\n\\n\" +\n \"• 运营商判定为异常流量并限制网络\\n\" +\n \"• 路由器性能压力过大\\n\" +\n \"• 测速结果不准确\\n\\n\" +\n \"并发数设置建议:\\n\" +\n \"• 宽带峰值/50Mbps:一般对网络无影响\\n\" +\n \"• 宽带峰值/25Mbps:可能会影响同网络下载任务\\n\" +\n \"• 宽带峰值/10Mbps:可能会影响同网络下其他设备的上网体验\\n\";\n\n Log(warningMessage);\n }\n }\n\n private void checkBox4_CheckedChanged(object sender, EventArgs e)\n {\n if(checkBox4.Checked) textBox10.Enabled = true;\n else textBox10.Enabled = false;\n }\n\n private void button6_Click(object sender, EventArgs e)\n {\n string 本地IP = GetLocalLANIP();\n try\n {\n // 构造URL\n string url = $\"http://{本地IP}:{numericUpDown6.Value}/admin\";\n\n // 使用系统默认浏览器打开URL\n System.Diagnostics.Process.Start(url);\n\n Log($\"正在浏览器中打开 Subs-Check 配置管理: {url}\");\n }\n catch (Exception ex)\n {\n Log($\"打开浏览器失败: {ex.Message}\", true);\n MessageBox.Show($\"打开浏览器时出错: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n /// \n /// 获取API状态信息并返回包含6个元素的字符串数组\n /// \n /// \n /// 包含6个元素的字符串数组:\n /// [0] - 状态类型 (\"checking\"/\"idle\"/\"error\")\n /// [1] - 状态图标类别 (\"primary\"/\"success\"/\"danger\")\n /// [2] - 状态文本 (\"正在检测中...\"/\"空闲\"/\"获取状态失败\")\n /// [3] - 节点总数 (proxyCount或\"N/A\")\n /// [4] - 进度百分比 (progress或\"N/A\")\n /// [5] - 可用节点数量 (available或\"N/A\")\n /// \n private async Task GetApiStatusAsync()\n {\n string[] resultArray = new string[6];\n string baseUrl = $\"http://127.0.0.1:{numericUpDown6.Value}\";\n\n try\n {\n using (HttpClient client = new HttpClient())\n {\n // 设置基础URL\n client.BaseAddress = new Uri(baseUrl);\n\n // 添加API密钥请求头\n client.DefaultRequestHeaders.Add(\"X-API-Key\", WebUIapiKey);\n\n // 设置超时时间\n client.Timeout = TimeSpan.FromSeconds(5);\n\n // 发送请求\n HttpResponseMessage response = await client.GetAsync(\"/api/status\");\n\n // 检查响应状态\n if (response.IsSuccessStatusCode)\n {\n // 读取响应内容\n string content = await response.Content.ReadAsStringAsync();\n\n // 解析JSON\n JObject data = JObject.Parse(content);\n\n if (data[\"checking\"] != null && data[\"checking\"].Value())\n {\n // 正在检测状态\n resultArray[0] = \"checking\";\n resultArray[1] = \"primary\";\n resultArray[2] = \"正在检测中...\";\n\n // 提取节点数据\n resultArray[3] = data[\"proxyCount\"]?.ToString() ?? \"0\";\n resultArray[4] = data[\"progress\"]?.ToString() ?? \"0\";\n resultArray[5] = data[\"available\"]?.ToString() ?? \"0\";\n }\n else\n {\n // 空闲状态\n resultArray[0] = \"idle\";\n resultArray[1] = \"success\";\n resultArray[2] = \"空闲\";\n\n // 空闲时相关数据设为N/A\n resultArray[3] = \"N/A\";\n resultArray[4] = \"N/A\";\n resultArray[5] = \"N/A\";\n }\n }\n else\n {\n // 请求失败,例如未授权\n resultArray[0] = \"error\";\n resultArray[1] = \"danger\";\n resultArray[2] = $\"API请求失败: {(int)response.StatusCode}\";\n resultArray[3] = \"N/A\";\n resultArray[4] = \"N/A\";\n resultArray[5] = \"N/A\";\n }\n }\n }\n catch (Exception ex)\n {\n // 发生异常\n resultArray[0] = \"error\";\n resultArray[1] = \"danger\";\n resultArray[2] = $\"获取状态失败: {ex.Message}\";\n resultArray[3] = \"N/A\";\n resultArray[4] = \"N/A\";\n resultArray[5] = \"N/A\";\n\n // 可选:记录错误到日志\n Log($\"获取API状态失败: {ex.Message}\", true);\n }\n\n return resultArray;\n }\n\n private async void timer4_Tick(object sender, EventArgs e)\n {\n //if (!button7.Enabled) button7.Enabled = true;\n string[] subscheck状态 = await GetApiStatusAsync();\n string 状态类型 = subscheck状态[0];\n string 状态图标类别 = subscheck状态[1];\n string 状态文本 = subscheck状态[2];\n string 节点总数 = subscheck状态[3];\n string 进度百分比 = subscheck状态[4];\n string 可用节点数量 = subscheck状态[5];\n // 更新状态文本\n\n if (状态类型 == \"checking\")\n {\n button7.Text = \"⏸️ 暂停\";\n nodeInfo = $\"({进度百分比}/{节点总数}) 可用: {可用节点数量}\";\n int nodeTotal = int.Parse(节点总数);\n if (nodeTotal > 0) {\n int 进度条百分比 = int.Parse(进度百分比) * 100 / nodeTotal;\n progressBar1.Value = 进度条百分比;\n if (!button7.Enabled) button7.Enabled = true;\n }\n \n // 确保通知图标文本不超过63个字符\n string notifyText = \"SubsCheck: \" + nodeInfo;\n if (notifyText.Length > 63)\n {\n notifyText = notifyText.Substring(0, 60) + \"...\";\n }\n notifyIcon1.Text = notifyText;\n textBox1.Enabled = false;\n }\n else if (状态类型 == \"idle\")\n {\n button7.Text = \"⏯️ 开始\";\n progressBar1.Value = 100;\n nodeInfo = $\"等待{nextCheckTime}\";\n notifyIcon1.Text = \"SubsCheck: 已就绪\\n\" + nextCheckTime; ;\n textBox1.Enabled = true;\n }\n else if (状态类型 == \"error\")\n {\n button7.Text = \"🔀 未知\";\n nodeInfo = 状态文本;\n }\n groupBox2.Text = $\"实时日志 {nodeInfo}\";\n }\n\n private async void button7_Click(object sender, EventArgs e)\n {\n button7.Enabled = false;\n timer4.Enabled = false;\n\n try\n {\n bool isSuccess;\n\n if (button7.Text == \"⏯️ 开始\")\n {\n isSuccess = await SendApiRequestAsync(\"/api/trigger-check\", \"节点检查\");\n if (isSuccess)\n {\n button7.Text = \"⏸️ 暂停\";\n textBox1.Enabled = false; // 检查开始后禁用订阅编辑\n }\n }\n else // \"⏸️ 暂停\"\n {\n isSuccess = await SendApiRequestAsync(\"/api/force-close\", \"强制关闭\");\n }\n\n // 如果请求失败,更新按钮状态为未知\n if (!isSuccess) button7.Text = \"🔀 未知\";\n }\n finally\n {\n // 无论成功失败都重新启用定时器和按钮\n timer4.Enabled = true;\n timer4.Start();\n //button7.Enabled = true;\n }\n }\n\n /// \n /// 发送API请求到SubsCheck服务\n /// \n /// API端点路径\n /// 操作名称(用于日志)\n /// 操作是否成功\n private async Task SendApiRequestAsync(string endpoint, string operationName)\n {\n try\n {\n // 获取API基础地址和API密钥\n string baseUrl = $\"http://127.0.0.1:{numericUpDown6.Value}\";\n\n using (HttpClient client = new HttpClient())\n {\n client.BaseAddress = new Uri(baseUrl);\n client.DefaultRequestHeaders.Add(\"X-API-Key\", WebUIapiKey);\n client.Timeout = TimeSpan.FromSeconds(10);\n\n // 发送POST请求\n HttpResponseMessage response = await client.PostAsync(endpoint, new StringContent(\"\"));\n\n // 检查响应状态\n if (response.IsSuccessStatusCode)\n {\n Log($\"成功{operationName}\");\n return true;\n }\n else\n {\n string errorContent = await response.Content.ReadAsStringAsync();\n Log($\"{operationName}失败: HTTP {(int)response.StatusCode} {response.ReasonPhrase}\\n{errorContent}\", true);\n return false;\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"{operationName}时发生错误: {ex.Message}\", true);\n return false;\n }\n }\n\n private void textBox11_Leave(object sender, EventArgs e)\n {\n if (IsValidCronExpression(textBox11.Text))\n {\n // 计算并显示cron表达式的说明\n string cronDescription = GetCronExpressionDescription(textBox11.Text);\n // 可以用工具提示或者消息框显示,这里使用消息框\n //MessageBox.Show(cronDescription, \"Cron表达式说明\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n Log($\"Cron表达式说明 {cronDescription}\");\n }\n else\n {\n MessageBox.Show(\"请输入有效的cron表达式,例如:*/30 * * * *\", \"无效的cron表达式\",\n MessageBoxButtons.OK, MessageBoxIcon.Warning);\n textBox11.Focus();\n textBox11.Text = \"0 */2 * * *\"; // 恢复默认值\n }\n }\n\n /// \n /// 验证输入文本是否是合法的cron表达式\n /// \n /// 如果是合法的cron表达式,则返回true;否则返回false\n private bool IsValidCronExpression(string cron表达式)\n {\n string cronExpression = cron表达式.Trim();\n\n // 如果是空字符串,则不是有效表达式\n if (string.IsNullOrWhiteSpace(cronExpression))\n return false;\n\n // 分割cron表达式为5个部分:分钟 小时 日期 月份 星期\n string[] parts = cronExpression.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n\n // cron表达式必须有5个部分\n if (parts.Length != 5)\n return false;\n\n try\n {\n // 验证每个部分\n // 分钟 (0-59)\n if (!IsValidCronField(parts[0], 0, 59))\n return false;\n\n // 小时 (0-23)\n if (!IsValidCronField(parts[1], 0, 23))\n return false;\n\n // 日期 (1-31)\n if (!IsValidCronField(parts[2], 1, 31))\n return false;\n\n // 月份 (1-12)\n if (!IsValidCronField(parts[3], 1, 12))\n return false;\n\n // 星期 (0-7,0和7都表示星期日)\n if (!IsValidCronField(parts[4], 0, 7))\n return false;\n\n return true;\n }\n catch\n {\n return false;\n }\n }\n\n /// \n /// 验证cron表达式中的单个字段是否合法\n /// \n /// 字段值\n /// 最小允许值\n /// 最大允许值\n /// 如果字段合法,则返回true;否则返回false\n private bool IsValidCronField(string field, int min, int max)\n {\n // 处理通配符 \"*\"\n if (field == \"*\")\n return true;\n\n // 处理步长 \"*/n\"\n if (field.StartsWith(\"*/\"))\n {\n string stepStr = field.Substring(2);\n if (int.TryParse(stepStr, out int step))\n return step > 0 && step <= max;\n return false;\n }\n\n // 处理范围 \"n-m\"\n if (field.Contains(\"-\"))\n {\n string[] range = field.Split('-');\n if (range.Length != 2)\n return false;\n\n if (int.TryParse(range[0], out int start) && int.TryParse(range[1], out int end))\n return start >= min && end <= max && start <= end;\n return false;\n }\n\n // 处理列表 \"n,m,k\"\n if (field.Contains(\",\"))\n {\n string[] values = field.Split(',');\n foreach (string item in values)\n {\n if (!int.TryParse(item, out int itemValue) || itemValue < min || itemValue > max)\n return false;\n }\n return true;\n }\n\n // 处理单个数字\n if (int.TryParse(field, out int fieldValue))\n return fieldValue >= min && fieldValue <= max;\n\n return false;\n }\n\n /// \n /// 获取cron表达式的友好文本说明\n /// \n /// 要解析的cron表达式\n /// 返回cron表达式的执行时间说明\n private string GetCronExpressionDescription(string cron表达式)\n {\n try\n {\n string cronExpression = cron表达式.Trim();\n string[] parts = cronExpression.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n\n if (parts.Length != 5)\n return \"无效的cron表达式\";\n\n // 分别解析每个部分\n string minuteDesc = ParseCronPart(parts[0], \"分钟\", 0, 59);\n string hourDesc = ParseCronPart(parts[1], \"小时\", 0, 23);\n string dayDesc = ParseCronPart(parts[2], \"日\", 1, 31);\n string monthDesc = ParseCronPart(parts[3], \"月\", 1, 12);\n string weekDesc = ParseCronPart(parts[4], \"星期\", 0, 7, true);\n\n // 组合最终说明\n string description = \"执行时间: \";\n\n // 月份\n if (monthDesc != \"每月\")\n description += monthDesc + \"的\";\n\n // 星期与日期的关系\n if (parts[2] == \"*\" && parts[4] != \"*\")\n description += weekDesc + \"的\";\n else if (parts[2] != \"*\" && parts[4] == \"*\")\n description += dayDesc;\n else if (parts[2] != \"*\" && parts[4] != \"*\")\n description += $\"{dayDesc}或{weekDesc}\";\n else\n description += \"每天\";\n\n // 时间(小时:分钟)\n description += $\"{hourDesc}{minuteDesc}\";\n\n return description;\n }\n catch\n {\n return \"无法解析cron表达式\";\n }\n }\n\n /// \n /// 解析cron表达式的单个部分\n /// \n private string ParseCronPart(string part, string unit, int min, int max, bool isWeekday = false)\n {\n // 处理星号,表示每个时间单位\n if (part == \"*\")\n {\n return $\"每{unit}\";\n }\n\n // 处理步长 */n\n if (part.StartsWith(\"*/\"))\n {\n int step = int.Parse(part.Substring(2));\n return $\"每{step}{unit}\";\n }\n\n // 处理范围 n-m\n if (part.Contains(\"-\"))\n {\n string[] range = part.Split('-');\n int start = int.Parse(range[0]);\n int end = int.Parse(range[1]);\n\n if (isWeekday)\n {\n string[] weekdays = { \"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\", \"星期日\" };\n return $\"从{weekdays[start]}到{weekdays[end]}\";\n }\n\n return $\"从{start}{unit}到{end}{unit}\";\n }\n\n // 处理列表 n,m,k\n if (part.Contains(\",\"))\n {\n string[] values = part.Split(',');\n if (isWeekday)\n {\n string[] weekdays = { \"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\", \"星期日\" };\n return string.Join(\"、\", values.Select(v => weekdays[int.Parse(v)]));\n }\n return $\"{string.Join(\"、\", values)}{unit}\";\n }\n\n // 处理单个数字\n int value = int.Parse(part);\n if (isWeekday)\n {\n string[] weekdays = { \"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\", \"星期日\" };\n return weekdays[value];\n }\n return $\"{value}{unit}\";\n }\n\n private void 切换cron表达式(object sender, EventArgs e)\n {\n if (textBox11.Visible)\n {\n textBox11.Visible = false;\n label2.Visible = true;\n numericUpDown2.Visible = true;\n Log(\"下次检查时间间隔 使用分钟倒计时\");\n }\n else\n {\n textBox11.Location = new Point(9, 48);\n textBox11.Visible = true;\n label2.Visible = false;\n numericUpDown2.Visible = false;\n Log(\"下次检查时间间隔 使用cron表达式\");\n }\n }\n\n /// \n /// 获取计算机名的MD5哈希值\n /// \n /// 返回计算机名的MD5哈希字符串(32位小写)\n private string GetComputerNameMD5()\n {\n try\n {\n // 获取计算机名\n string computerName = System.Environment.MachineName;\n\n // 引入必要的命名空间\n using (System.Security.Cryptography.MD5 md5 = System.Security.Cryptography.MD5.Create())\n {\n // 将计算机名转换为字节数组\n byte[] inputBytes = System.Text.Encoding.UTF8.GetBytes(computerName);\n\n // 计算MD5哈希值\n byte[] hashBytes = md5.ComputeHash(inputBytes);\n\n // 将字节数组转换为十六进制字符串\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < hashBytes.Length; i++)\n {\n sb.Append(hashBytes[i].ToString(\"x2\"));\n }\n\n return sb.ToString();\n }\n }\n catch (Exception ex)\n {\n Log($\"计算计算机名MD5时出错: {ex.Message}\", true);\n return \"CMLiussss\";\n }\n }\n\n // 添加辅助下载方法\n async Task DownloadFileAsync(HttpClient httpClient, string url, string filePath)\n {\n try\n {\n // 获取文件大小\n HttpResponseMessage headResponse = await httpClient.SendAsync(new HttpRequestMessage(HttpMethod.Head, url));\n headResponse.EnsureSuccessStatusCode(); // 确保请求成功\n long totalBytes = headResponse.Content.Headers.ContentLength ?? 0;\n\n // 下载文件\n using (var response = await httpClient.GetAsync(url, HttpCompletionOption.ResponseHeadersRead))\n {\n response.EnsureSuccessStatusCode(); // 确保请求成功\n\n using (var contentStream = await response.Content.ReadAsStreamAsync())\n using (var fileStream = new FileStream(filePath, FileMode.Create, FileAccess.Write, FileShare.None, 8192, true))\n {\n byte[] buffer = new byte[8192];\n long totalBytesRead = 0;\n int bytesRead;\n\n while ((bytesRead = await contentStream.ReadAsync(buffer, 0, buffer.Length)) > 0)\n {\n await fileStream.WriteAsync(buffer, 0, bytesRead);\n totalBytesRead += bytesRead;\n\n // 更新进度条\n if (totalBytes > 0)\n {\n int progressPercentage = (int)((totalBytesRead * 100) / totalBytes);\n progressPercentage = Math.Min(100, Math.Max(0, progressPercentage));\n progressBar1.Value = progressPercentage;\n }\n }\n }\n }\n\n return true; // 下载成功\n }\n catch\n {\n throw; // 重新抛出异常,让调用者处理\n }\n }\n\n private static about aboutWindow = null;\n private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n // 检查窗口是否已经打开\n if (aboutWindow != null && !aboutWindow.IsDisposed)\n {\n // 窗口已经存在,激活它\n aboutWindow.Activate();\n return;\n }\n\n // 需要创建新窗口\n this.BeginInvoke(new Action(() =>\n {\n // 创建about窗口实例\n aboutWindow = new about();\n\n // 传递版本号信息\n aboutWindow.GuiVersion = 当前GUI版本号;\n aboutWindow.CoreVersion = 当前subsCheck版本号;\n\n // 添加窗口关闭时的处理,清除静态引用\n aboutWindow.FormClosed += (s, args) => aboutWindow = null;\n\n // 非模态显示窗口\n aboutWindow.Show(this);\n\n // 设置TopMost确保窗口显示在最前面\n aboutWindow.TopMost = true;\n }));\n }\n\n private void button8_Click(object sender, EventArgs e)\n {\n try\n {\n // 创建MoreYAML窗口实例\n MoreYAML moreYamlWindow = new MoreYAML();\n\n // 显示为模态对话框,这会阻塞主线程直到窗口关闭\n DialogResult result = moreYamlWindow.ShowDialog(this);\n\n // 如果需要,可以处理对话框的返回结果\n if (result == DialogResult.OK)\n {\n // 用户点击了\"确定\"或某种完成操作的按钮\n Log(\"补充参数配置已成功保存到 more.yaml 文件!设置已应用\");\n }\n }\n catch (Exception ex)\n {\n Log($\"打开MoreYAML窗口时出错: {ex.Message}\", true);\n MessageBox.Show($\"打开MoreYAML窗口时出错: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n private async void checkBox5_CheckedChanged(object sender, EventArgs e)\n {\n checkBox5.Enabled = false;\n try\n {\n // 获取当前应用程序的可执行文件路径\n string appPath = Application.ExecutablePath;\n // 获取应用程序名称(不包含扩展名)\n string appName = Path.GetFileNameWithoutExtension(appPath);\n // 获取启动文件夹的路径\n string startupFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.Startup);\n // 快捷方式文件的完整路径\n string shortcutPath = Path.Combine(startupFolderPath, $\"{appName}.lnk\");\n\n if (checkBox5.Checked)\n {\n // 检查启动文件夹中是否已存在该快捷方式\n if (File.Exists(shortcutPath))\n {\n Log(\"开机启动项已存在,无需重复创建\");\n }\n else\n {\n // 创建快捷方式\n CreateShortcut(appPath, shortcutPath, \"-auto\");\n Log(\"已成功创建开机启动项,下次电脑启动时将自动运行程序\");\n }\n }\n else\n {\n // 删除启动项\n if (File.Exists(shortcutPath))\n {\n File.Delete(shortcutPath);\n Log(\"已移除开机启动项,下次开机将不会自动启动\");\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"设置开机启动项时出错: {ex.Message}\", true);\n MessageBox.Show($\"设置开机启动项失败: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n\n // 恢复CheckBox状态,避免UI状态与实际状态不一致\n checkBox5.CheckedChanged -= checkBox5_CheckedChanged;\n checkBox5.Checked = !checkBox5.Checked;\n checkBox5.CheckedChanged += checkBox5_CheckedChanged;\n }\n checkBox5.Enabled = true;\n await SaveConfig(false);\n }\n\n /// \n /// 创建指向指定路径应用程序的快捷方式\n /// \n /// 目标应用程序的完整路径\n /// 要创建的快捷方式的完整路径\n /// 可选的启动参数\n private void CreateShortcut(string targetPath, string shortcutPath, string arguments = \"\")\n {\n // 使用COM接口创建快捷方式\n Type t = Type.GetTypeFromProgID(\"WScript.Shell\");\n dynamic shell = Activator.CreateInstance(t);\n var shortcut = shell.CreateShortcut(shortcutPath);\n\n shortcut.TargetPath = targetPath;\n if (!string.IsNullOrEmpty(arguments))\n shortcut.Arguments = arguments; // 设置启动参数\n\n shortcut.WorkingDirectory = Path.GetDirectoryName(targetPath);\n shortcut.WindowStyle = 7; // 最小化启动: 7, 正常启动: 1, 最大化启动: 3\n shortcut.Description = \"SubsCheck Win GUI自启动快捷方式\";\n shortcut.IconLocation = targetPath + \",0\"; // 使用应用程序自身的图标\n\n // 保存快捷方式\n shortcut.Save();\n\n // 释放COM对象\n System.Runtime.InteropServices.Marshal.FinalReleaseComObject(shortcut);\n System.Runtime.InteropServices.Marshal.FinalReleaseComObject(shell);\n }\n\n /// \n /// 检查启动参数中是否包含指定的参数\n /// \n /// 要检查的参数名称,例如\"-autoup\"\n /// 如果存在指定参数,则返回true;否则返回false\n private bool CheckCommandLineParameter(string parameterName)\n {\n // 获取命令行参数数组\n string[] args = Environment.GetCommandLineArgs();\n\n // 遍历所有参数,检查是否有匹配的参数\n foreach (string arg in args)\n {\n // 不区分大小写比较\n if (string.Equals(arg, parameterName, StringComparison.OrdinalIgnoreCase))\n {\n return true;\n }\n }\n\n return false;\n }\n\n private void richTextBox1_DoubleClick(object sender, EventArgs e)\n {\n // 检查是否有日志内容\n if (richTextBox1.TextLength > 0)\n {\n // 显示确认对话框,询问用户是否要清空日志\n DialogResult result = MessageBox.Show(\n \"是否要清空当前日志?\",\n \"清空日志确认\",\n MessageBoxButtons.YesNo,\n MessageBoxIcon.Question,\n MessageBoxDefaultButton.Button2); // 默认选择\"否\"按钮\n\n if (result == DialogResult.Yes)\n {\n // 清空richTextBox1内容\n richTextBox1.Clear();\n // 记录一条清空日志的操作信息\n Log(\"日志已清空\");\n }\n }\n }\n\n private void numericUpDown4_ValueChanged(object sender, EventArgs e)\n {\n if (numericUpDown4.Value > 4096)\n {\n string warningMessage =\n \"⚠️ 测速下限设置提醒 ⚠️\\n\\n\" +\n \"您设置的测速下限值过高,可能导致:\\n\\n\" +\n \"• 可用节点数量显著减少\\n\" +\n \"• 部分低速但稳定的节点被过滤\\n\" +\n \"测速下限设置建议:\\n\" +\n \"• 日常浏览:512-1024 KB/s\\n\" +\n \"• 视频观看:1024-2048 KB/s\\n\" +\n \"• 大文件下载:根据实际需求设置\\n\";\n\n Log(warningMessage);\n }\n }\n\n private void numericUpDown3_ValueChanged(object sender, EventArgs e)\n {\n if (numericUpDown3.Value < 5000)\n {\n string warningMessage =\n \"⚠️ 超时时间设置提醒 ⚠️\\n\\n\" +\n \"该超时时间并非延迟时间,除非您的网络极其优秀,否则超时时间过低会导致无可用节点。\\n\\n\" +\n \"• 超时时间是真连接测试的最大等待时间\\n\" +\n \"• 设置过低会导致大部分节点连接失败\\n\" +\n \"• 推荐设置不低于5000ms\\n\\n\" +\n \"建议超时时间设置:\\n\" +\n \"• 普通网络环境:5000± ms\\n\" +\n \"• 极好网络环境:3000± ms\\n\";\n\n Log(warningMessage);\n }\n\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/MoreYAML.cs", "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Diagnostics;\nusing System.Drawing;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\n\nnamespace subs_check.win.gui\n{\n public partial class MoreYAML : Form\n {\n string 初始化;\n public MoreYAML()\n {\n InitializeComponent();\n\n \n // 移除文本框的等待光标\n textBox1.UseWaitCursor = false;\n 初始化 = textBox1.Text;\n\n // 设置 groupBox1 的 Anchor 属性,使其跟随窗体四边缩放\n groupBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;\n\n // 设置文本框跟随 groupBox1 缩放\n textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;\n\n // 设置 linkLabel1 固定在右上角\n linkLabel1.Anchor = AnchorStyles.Top | AnchorStyles.Right;\n\n // 设置按钮固定在底部\n button1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;\n button3.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;\n button2.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;\n \n // 检查并加载配置文件\n LoadMoreYamlConfig();\n }\n\n /// \n /// 检查并加载 more.yaml 配置文件\n /// \n private void LoadMoreYamlConfig()\n {\n try\n {\n // 获取当前程序的执行路径\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n // 指定config目录路径\n string configFolderPath = System.IO.Path.Combine(executablePath, \"config\");\n // 指定more.yaml文件的完整路径\n string moreYamlFilePath = System.IO.Path.Combine(configFolderPath, \"more.yaml\");\n\n // 检查文件是否存在\n if (System.IO.File.Exists(moreYamlFilePath))\n {\n // 读取文件内容并赋值给textBox1\n string yamlContent = System.IO.File.ReadAllText(moreYamlFilePath, Encoding.UTF8);\n textBox1.Text = yamlContent;\n }\n }\n catch (Exception ex)\n {\n // 读取文件时出错,可以选择是否显示错误信息\n MessageBox.Show($\"读取配置文件时发生错误:{ex.Message}\", \"提示\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n this.Close();\n }\n\n private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/beck-8/subs-check/blob/master/config/config.example.yaml\");\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n try\n {\n // 验证textbox1的内容是否符合YAML格式\n if (!IsValidYaml(textBox1.Text))\n {\n MessageBox.Show(\"输入的内容不符合YAML格式,请检查后重试!\", \"格式错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Warning);\n return;\n }\n\n // 获取当前程序的执行路径\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n // 指定config目录路径\n string configFolderPath = System.IO.Path.Combine(executablePath, \"config\");\n // 指定more.yaml文件的完整路径\n string moreYamlFilePath = System.IO.Path.Combine(configFolderPath, \"more.yaml\");\n\n // 确保config目录存在\n if (!System.IO.Directory.Exists(configFolderPath))\n {\n System.IO.Directory.CreateDirectory(configFolderPath);\n }\n\n // 将textBox1的内容写入more.yaml文件\n System.IO.File.WriteAllText(moreYamlFilePath, textBox1.Text, Encoding.UTF8);\n\n // 设置对话框结果为OK并关闭窗口\n this.DialogResult = DialogResult.OK;\n this.Close();\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"保存配置文件时发生错误:{ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n /// \n /// 验证字符串是否为有效的YAML格式\n /// \n /// 要验证的YAML字符串\n /// 如果是有效的YAML格式,返回true;否则返回false\n private bool IsValidYaml(string yamlContent)\n {\n if (string.IsNullOrWhiteSpace(yamlContent))\n return true; // 空内容被视为有效(可以根据需要更改)\n\n try\n {\n // 使用YamlDotNet尝试解析YAML内容\n var deserializer = new YamlDotNet.Serialization.Deserializer();\n deserializer.Deserialize(yamlContent);\n return true;\n }\n catch (YamlDotNet.Core.YamlException)\n {\n // 捕获YAML解析异常,表示格式无效\n return false;\n }\n catch (Exception)\n {\n // 其他异常也视为格式无效\n return false;\n }\n }\n\n private void button3_Click(object sender, EventArgs e)\n {\n textBox1.Text = 初始化;\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/EditURLs.cs", "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nusing System.Linq;\nusing System.Net.Http;\nusing System.Security.Policy;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\nusing static System.Windows.Forms.VisualStyles.VisualStyleElement;\n\nnamespace subs_check.win.gui\n{\n public partial class EditURLs: Form\n {\n // 添加一个属性用于存储和传递文本内容\n public string UrlContent { get; set; }\n public System.Windows.Forms.ComboBox.ObjectCollection githubProxys { get; set; }\n public string githubProxy { get; set; }\n string githubProxyURL;\n string SubsCheckURLs;\n public EditURLs()\n {\n InitializeComponent();\n\n // 设置textBox1的锚点为上、左、右\n textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom;\n\n // 设置button1、button2、button3的锚点为左、下\n button1.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;\n button2.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;\n button3.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;\n\n // 设置button4的锚点为右、下\n button4.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;\n }\n\n // 加载窗体时处理传入的内容\n protected override void OnLoad(EventArgs e)\n {\n base.OnLoad(e);\n\n // 将传入的内容显示在textBox1中\n if (!string.IsNullOrEmpty(UrlContent)) textBox1.Text = UrlContent;\n\n timer1.Enabled = true;\n\n if (githubProxys != null)\n {\n comboBox1.Items.Clear();\n foreach (var item in githubProxys)\n {\n comboBox1.Items.Add(item);\n }\n }\n if (!string.IsNullOrEmpty(githubProxy)) comboBox1.Text = githubProxy;\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n // 将textBox1的内容保存到UrlContent属性\n UrlContent = textBox1.Text;\n\n // 设置对话框结果为OK并关闭窗口\n this.DialogResult = DialogResult.OK;\n this.Close();\n }\n\n private void button4_Click(object sender, EventArgs e)\n {\n this.Close();\n }\n\n private void button3_Click(object sender, EventArgs e)\n {\n // 确保有内容需要处理\n if (string.IsNullOrWhiteSpace(textBox1.Text))\n return;\n\n // 按行分割文本\n string[] lines = textBox1.Text.Split(\n new[] { \"\\r\\n\", \"\\r\", \"\\n\" },\n StringSplitOptions.RemoveEmptyEntries);\n\n // 去除每行首尾的空白字符\n for (int i = 0; i < lines.Length; i++)\n {\n lines[i] = lines[i].Trim();\n }\n\n // 使用LINQ的Distinct()方法去重,并过滤掉空行\n string[] uniqueLines = lines\n .Where(line => !string.IsNullOrWhiteSpace(line))\n .Distinct(StringComparer.OrdinalIgnoreCase) // 忽略大小写进行去重\n .ToArray();\n\n // 将去重后的内容设回textBox1\n textBox1.Text = string.Join(Environment.NewLine, uniqueLines) + \"\\n\";\n\n // 可选:显示去重结果\n int removed = lines.Length - uniqueLines.Length;\n if (removed > 0)\n {\n MessageBox.Show($\"已移除 {removed} 个重复行。\", \"去重完成\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n else\n {\n MessageBox.Show(\"没有发现重复行。\", \"去重完成\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n }\n\n private async void timer1_Tick(object sender, EventArgs e)\n {\n timer1.Enabled = false;\n\n if (comboBox1.Text == \"自动选择\")\n {\n // 创建不包含\"自动选择\"的代理列表\n List proxyItems = new List();\n for (int j = 0; j < comboBox1.Items.Count; j++)\n {\n string proxyItem = comboBox1.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n\n // 随机打乱列表顺序\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n\n // 异步检测可用代理\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n }\n else\n {\n githubProxyURL = $\"https://{comboBox1.Text}/\";\n }\n\n string SubsCheckURLsURL = $\"{githubProxyURL}https://raw.githubusercontent.com/cmliu/cmliu/main/SubsCheck-URLs\";\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); // 设置5秒超时\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n\n // 使用异步方式检查URL可访问性\n HttpResponseMessage response = await client.GetAsync(SubsCheckURLsURL);\n if (response.IsSuccessStatusCode)\n {\n button2.Text = \"在线获取\";\n button2.Enabled = true;\n SubsCheckURLs = await response.Content.ReadAsStringAsync();\n //MessageBox.Show(SubsCheckURLs);\n }\n else\n {\n button2.Text = \"获取失败\";\n button2.Enabled = false;\n }\n }\n }\n catch (Exception ex)\n {\n Console.WriteLine($\"Error: {ex.Message}\");\n // 网络错误或其他异常情况\n button2.Text = \"获取失败\";\n button2.Enabled = false;\n }\n }\n\n // 创建专用方法用于异步检测GitHub代理\n private async Task DetectGitHubProxyAsync(List proxyItems)\n {\n string detectedProxyURL = \"\";\n\n // 遍历随机排序后的代理列表\n foreach (string proxyItem in proxyItems)\n {\n string checkUrl = $\"https://{proxyItem}/https://raw.githubusercontent.com/cmliu/SubsCheck-Win-GUI/master/packages.config\";\n\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); // 设置5秒超时\n // 添加User-Agent头,避免被拒绝访问\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n\n // 使用异步方式\n HttpResponseMessage response = await client.GetAsync(checkUrl);\n if (response.IsSuccessStatusCode)\n {\n // 找到可用代理\n detectedProxyURL = $\"https://{proxyItem}/\";\n break;\n }\n }\n }\n catch (Exception ex)\n {\n // 记录错误但继续尝试下一个\n Console.WriteLine($\"Error: {ex.Message}\");\n }\n }\n return detectedProxyURL;\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n // 检查是否已成功获取在线内容\n if (string.IsNullOrEmpty(SubsCheckURLs))\n {\n MessageBox.Show(\"未能获取在线内容,请重试。\", \"获取失败\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n return;\n }\n\n // 显示带有\"覆盖\"和\"追加\"选项的对话框\n DialogResult result = MessageBox.Show(\n \"请选择如何处理获取到的内容:\\n\\n\" +\n \"- 点击【是】将覆盖当前内容\\n\" +\n \"- 点击【否】将追加到当前内容后面\\n\" +\n \"- 点击【取消】不做任何操作\",\n \"操作选择\",\n MessageBoxButtons.YesNoCancel,\n MessageBoxIcon.Question);\n\n // 根据用户选择执行对应操作\n if (result == DialogResult.Yes)\n {\n // 覆盖操作\n // 确保所有换行符格式一致 (将单独的\\n或\\r替换为Windows风格的\\r\\n)\n string normalizedText = NormalizeLineEndings(SubsCheckURLs);\n textBox1.Text = normalizedText;\n MessageBox.Show(\"已用在线内容覆盖原有内容。\", \"感谢大自然的馈赠\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n else if (result == DialogResult.No)\n {\n // 追加操作\n // 确保原有内容末尾有换行符\n if (!textBox1.Text.EndsWith(\"\\r\\n\") && !textBox1.Text.EndsWith(\"\\n\"))\n {\n textBox1.Text += Environment.NewLine;\n }\n\n // 追加新内容,确保换行符格式一致\n textBox1.Text += NormalizeLineEndings(SubsCheckURLs);\n MessageBox.Show(\"已将在线内容追加到原有内容后。\", \"感谢大自然的馈赠\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n\n // 如果用户选择\"取消\",不执行任何操作\n }\n\n // 标准化文本中的换行符为Windows风格 (\\r\\n)\n private string NormalizeLineEndings(string text)\n {\n if (string.IsNullOrEmpty(text))\n return string.Empty;\n\n // 先将所有类型的换行符替换为\\n\n text = text.Replace(\"\\r\\n\", \"\\n\").Replace(\"\\r\", \"\\n\");\n // 然后将\\n替换为\\r\\n\n text = text.Replace(\"\\n\", Environment.NewLine);\n\n return text;\n }\n\n }\n}\n"], ["/SubsCheck-Win-GUI/CheckUpdates.cs", "using Newtonsoft.Json.Linq;\nusing System;\nusing System.Collections.Generic;\nusing System.Data;\nusing System.Linq;\nusing System.Net.Http;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\nusing static System.Windows.Forms.VisualStyles.VisualStyleElement;\n\nnamespace subs_check.win.gui\n{\n public partial class CheckUpdates : Form\n {\n // 添加一个属性用于存储和传递文本内容\n public string UrlContent { get; set; }\n public System.Windows.Forms.ComboBox.ObjectCollection githubProxys { get; set; }\n public string githubProxy { get; set; }\n string githubProxyURL;\n public string 当前subsCheck版本号 { get; set; }\n public string 当前GUI版本号 { get; set; }\n public string 最新GUI版本号 { get; set; }\n\n public CheckUpdates()\n {\n InitializeComponent();\n }\n\n protected override void OnLoad(EventArgs e)\n {\n base.OnLoad(e);\n\n timer1.Enabled = true;\n\n if (githubProxys != null)\n {\n comboBox1.Items.Clear();\n foreach (var item in githubProxys)\n {\n comboBox1.Items.Add(item);\n }\n }\n if (!string.IsNullOrEmpty(githubProxy)) comboBox1.Text = githubProxy;\n }\n\n private async void timer1_Tick(object sender, EventArgs e)\n {\n timer1.Enabled = false;\n label3.Text = 最新GUI版本号;\n label4.Text = 当前GUI版本号;\n\n label5.Text = 当前subsCheck版本号;\n\n if (comboBox1.Text == \"自动选择\")\n {\n // 创建不包含\"自动选择\"的代理列表\n List proxyItems = new List();\n for (int j = 0; j < comboBox1.Items.Count; j++)\n {\n string proxyItem = comboBox1.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n\n // 随机打乱列表顺序\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n\n // 异步检测可用代理\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n }\n else\n {\n githubProxyURL = $\"https://{comboBox1.Text}/\";\n }\n\n if (最新GUI版本号 != 当前GUI版本号)\n {\n // 检查当前目录下是否存在 Upgrade.exe\n string upgradeExePath = System.IO.Path.Combine(Application.StartupPath, \"Upgrade.exe\");\n if (System.IO.File.Exists(upgradeExePath))\n {\n button1.Text = \"立即更新\";\n button1.Enabled = true;\n }\n else\n {\n button1.Text = \"缺少更新程序\";\n button1.Enabled = false;\n }\n }\n else\n {\n button1.Text = \"已是最新版本\";\n button1.Enabled = false;\n }\n\n using (HttpClient client = new HttpClient())\n {\n try\n {\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n client.Timeout = TimeSpan.FromSeconds(30); // 增加超时时间以适应下载需求\n\n string url = \"https://api.github.com/repos/beck-8/subs-check/releases/latest\";\n string 备用url = \"https://api.github.cmliussss.net/repos/beck-8/subs-check/releases/latest\";\n\n HttpResponseMessage response = null;\n string responseBody = null;\n JObject json = null;\n\n // 先尝试主URL\n try\n {\n response = await client.GetAsync(url);\n\n // 如果主URL请求成功返回有效数据\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从主API获取版本信息\");\n }\n // 如果主URL请求不成功但没有抛出异常\n else\n {\n Console.WriteLine($\"主API请求失败 HTTP {(int)response.StatusCode},尝试备用API...\");\n response = await client.GetAsync(备用url);\n\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用API获取版本信息\");\n }\n else\n {\n Console.WriteLine($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return; // 两个URL都失败,提前退出\n }\n }\n }\n // 捕获网络请求异常(如连接超时、无法解析域名等)\n catch (HttpRequestException ex)\n {\n Console.WriteLine($\"主API请求出错: {ex.Message},尝试备用API...\");\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用API获取版本信息\");\n }\n else\n {\n Console.WriteLine($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return; // 备用URL也失败,提前退出\n }\n }\n catch (Exception backupEx)\n {\n Console.WriteLine($\"备用API请求也出错: {backupEx.Message}\", true);\n return; // 连备用URL也异常,提前退出\n }\n }\n // 捕获JSON解析异常\n catch (Newtonsoft.Json.JsonException ex)\n {\n Console.WriteLine($\"解析JSON数据出错: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用API获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n Console.WriteLine($\"备用API请求也出错: {backupEx.Message}\", true);\n return; // 连备用URL也有问题,提前退出\n }\n }\n // 捕获其他所有异常\n catch (Exception ex)\n {\n Console.WriteLine($\"获取版本信息时出现未预期的错误: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用URL获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n //控制台打印错误\n Console.WriteLine($\"备用API请求也出错: {backupEx.Message}\", true);\n return; // 连备用URL也有问题,提前退出\n }\n }\n\n // 如果成功获取了JSON数据,继续处理\n if (json != null)\n {\n string latestVersion = json[\"tag_name\"].ToString();\n label6.Text = latestVersion;\n if (当前subsCheck版本号 != latestVersion)\n {\n button2.Text = \"立即更新\";\n button2.Enabled = true;\n }\n else\n {\n button2.Text = \"已是最新版本\";\n button2.Enabled = false;\n }\n }\n\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"下载 subs-check.exe 时出错: {ex.Message}\\n\\n请前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n }\n\n // 创建专用方法用于异步检测GitHub代理\n private async Task DetectGitHubProxyAsync(List proxyItems)\n {\n string detectedProxyURL = \"\";\n\n // 遍历随机排序后的代理列表\n foreach (string proxyItem in proxyItems)\n {\n string checkUrl = $\"https://{proxyItem}/https://raw.githubusercontent.com/cmliu/SubsCheck-Win-GUI/master/packages.config\";\n\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); // 设置5秒超时\n // 添加User-Agent头,避免被拒绝访问\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n\n // 使用异步方式\n HttpResponseMessage response = await client.GetAsync(checkUrl);\n if (response.IsSuccessStatusCode)\n {\n // 找到可用代理\n detectedProxyURL = $\"https://{proxyItem}/\";\n break;\n }\n }\n }\n catch (Exception ex)\n {\n // 记录错误但继续尝试下一个\n Console.WriteLine($\"Error: {ex.Message}\");\n }\n }\n return detectedProxyURL;\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n // 设置对话框结果为OK,表示用户点击了\"立即更新\"按钮\n this.DialogResult = DialogResult.OK;\n\n // 关闭窗口\n this.Close();\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n //下载链接\n string downloadURL = $\"{githubProxyURL}https://github.com/cmliu/SubsCheck-Win-GUI/releases/download/{最新GUI版本号}/SubsCheck_Win_GUI.zip\";\n //目标文件\n string downloadEXE = \"subs-check.win.gui.exe\";\n\n try\n {\n // 获取应用程序目录\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n // 创建 Upgrade.ini 文件路径\n string iniFilePath = System.IO.Path.Combine(executablePath, \"Upgrade.ini\");\n\n // 准备 INI 文件内容\n string iniContent =\n \"[Upgrade]\\r\\n\" +\n $\"DownloadURL={downloadURL}\\r\\n\" +\n $\"TargetFile={downloadEXE}\\r\\n\";\n\n // 写入文件(如果文件已存在会被覆盖)\n System.IO.File.WriteAllText(iniFilePath, iniContent);\n\n DialogResult result = MessageBox.Show(\n $\"发现新版本: {最新GUI版本号}\\n\\n\" +\n \"· 点击【确定】将下载并安装更新\\n\" +\n \"· 更新过程中程序会自动关闭并重启\\n\" +\n \"· 更新完成后所有设置将保持不变\\n\\n\" +\n \"是否立即更新到最新版本?\",\n \"发现新版本\",\n MessageBoxButtons.OKCancel,\n MessageBoxIcon.Information);\n\n if (result == DialogResult.OK)\n {\n // 检查目标文件是否存在\n string targetFilePath = System.IO.Path.Combine(Application.StartupPath, \"Upgrade.exe\");\n if (System.IO.File.Exists(targetFilePath))\n {\n // 使用Process.Start异步启动应用程序\n System.Diagnostics.Process.Start(targetFilePath);\n this.Close();\n }\n else\n {\n MessageBox.Show(\"更新程序 Upgrade.exe 不存在!\",\n \"错误\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Error);\n }\n }\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"写入更新信息时出错: {ex.Message}\",\n \"错误\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Error);\n }\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/about.cs", "using System;\nusing System.Windows.Forms;\nusing System.Diagnostics;\n\nnamespace subs_check.win.gui\n{\n public partial class about : Form\n {\n // 添加两个公共属性来接收版本号\n public string GuiVersion { set { label2.Text = value; } }\n public string CoreVersion { set { label3.Text = value; } }\n\n public about()\n {\n InitializeComponent();\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n this.Close();\n }\n\n private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/beck-8/subs-check\");\n }\n\n private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://t.me/CMLiussss\");\n }\n\n private void linkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://url.cmliussss.com/SCWinGUI\");\n }\n\n private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/cmliu/SubsCheck-Win-GUI\");\n }\n\n private void linkLabel5_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/beck-8/subs-check\");\n }\n\n private void linkLabel6_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/bestruirui/BestSub\");\n }\n\n private void linkLabel8_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/sub-store-org/Sub-Store\");\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/Properties/Resources.Designer.cs", "//------------------------------------------------------------------------------\n// \n// 此代码由工具生成。\n// 运行时版本:4.0.30319.42000\n//\n// 对此文件的更改可能会导致不正确的行为,并且如果\n// 重新生成代码,这些更改将会丢失。\n// \n//------------------------------------------------------------------------------\n\nnamespace subs_check.win.gui.Properties {\n using System;\n \n \n /// \n /// 一个强类型的资源类,用于查找本地化的字符串等。\n /// \n // 此类是由 StronglyTypedResourceBuilder\n // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。\n // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen\n // (以 /str 作为命令选项),或重新生成 VS 项目。\n [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Resources.Tools.StronglyTypedResourceBuilder\", \"17.0.0.0\")]\n [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\n internal class Resources {\n \n private static global::System.Resources.ResourceManager resourceMan;\n \n private static global::System.Globalization.CultureInfo resourceCulture;\n \n [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\n internal Resources() {\n }\n \n /// \n /// 返回此类使用的缓存的 ResourceManager 实例。\n /// \n [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n internal static global::System.Resources.ResourceManager ResourceManager {\n get {\n if (object.ReferenceEquals(resourceMan, null)) {\n global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(\"subs_check.win.gui.Properties.Resources\", typeof(Resources).Assembly);\n resourceMan = temp;\n }\n return resourceMan;\n }\n }\n \n /// \n /// 重写当前线程的 CurrentUICulture 属性,对\n /// 使用此强类型资源类的所有资源查找执行重写。\n /// \n [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n internal static global::System.Globalization.CultureInfo Culture {\n get {\n return resourceCulture;\n }\n set {\n resourceCulture = value;\n }\n }\n \n /// \n /// 查找 System.Byte[] 类型的本地化资源。\n /// \n internal static byte[] going {\n get {\n object obj = ResourceManager.GetObject(\"going\", resourceCulture);\n return ((byte[])(obj));\n }\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/Program.cs", "using System;\nusing System.Threading;\nusing System.Windows.Forms;\n\nnamespace subs_check.win.gui\n{\n static class Program\n {\n // 定义一个全局唯一的标识符,使用项目名称作为互斥体的名称\n private static string appMutexName = \"cmliu/SubsCheck-Win-GUI\";\n private static Mutex mutex;\n\n /// \n /// 应用程序的主入口点。\n /// \n [STAThread]\n static void Main()\n {\n // 尝试创建一个命名互斥体,如果已存在,则获取它\n bool createdNew;\n mutex = new Mutex(true, appMutexName, out createdNew);\n\n if (!createdNew)\n {\n // 如果互斥体已存在(即程序已在运行),则终止当前实例\n MessageBox.Show(\"应用程序已经在运行中。\", \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n return;\n }\n\n try\n {\n Application.EnableVisualStyles();\n Application.SetCompatibleTextRenderingDefault(false);\n Application.Run(new Form1());\n }\n finally\n {\n // 确保释放互斥体\n mutex.ReleaseMutex();\n }\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/Properties/Settings.Designer.cs", "//------------------------------------------------------------------------------\n// \n// 此代码由工具生成。\n// 运行时版本:4.0.30319.42000\n//\n// 对此文件的更改可能会导致不正确的行为,并且如果\n// 重新生成代码,这些更改将会丢失。\n// \n//------------------------------------------------------------------------------\n\nnamespace subs_check.win.gui.Properties {\n \n \n [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\n [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator\", \"17.13.0.0\")]\n internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {\n \n private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));\n \n public static Settings Default {\n get {\n return defaultInstance;\n }\n }\n }\n}\n"]], "task_instance_info": {"created_time": "2025-08-20 18:31:17", "created_task_model": "DeepSeek-R1", "class_skeleton": "partial\nclass\nMoreYAML\n{\nprivate System.ComponentModel.IContainer components = null;\nprotected override void Dispose (bool disposing) {}\nprivate void InitializeComponent () {}\nprivate System.Windows.Forms.Button button1;\nprivate System.Windows.Forms.GroupBox groupBox1;\nprivate System.Windows.Forms.TextBox textBox1;\nprivate System.Windows.Forms.Button button2;\nprivate System.Windows.Forms.LinkLabel linkLabel1;\nprivate System.Windows.Forms.Button button3;\n}", "code_description": "This code segment functions to: Define user interface components and layout for a form that enables editing of structured configuration data with options to save changes, revert modifications, and access documentation references through interactive controls."}, "inference_content": {"inference_model": "DeepSeek-R1", "inference_result": "```c_sharp\n[TASK_BEGIN]\npartial class MoreYAML\n{\n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n this.button1 = new System.Windows.Forms.Button();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.button2 = new System.Windows.Forms.Button();\n this.linkLabel1 = new System.Windows.Forms.LinkLabel();\n this.button3 = new System.Windows.Forms.Button();\n \n // button1\n this.button1.Location = new System.Drawing.Point(12, 12);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"button1\";\n \n // groupBox1\n this.groupBox1.Controls.Add(this.textBox1);\n this.groupBox1.Location = new System.Drawing.Point(12, 41);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(200, 100);\n this.groupBox1.TabIndex = 1;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"groupBox1\";\n \n // textBox1\n this.textBox1.Location = new System.Drawing.Point(6, 19);\n this.textBox1.Name = \"textBox1\";\n this.textBox1.Size = new System.Drawing.Size(188, 20);\n this.textBox1.TabIndex = 0;\n \n // button2\n this.button2.Location = new System.Drawing.Point(93, 12);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"button2\";\n \n // linkLabel1\n this.linkLabel1.AutoSize = true;\n this.linkLabel1.Location = new System.Drawing.Point(174, 17);\n this.linkLabel1.Name = \"linkLabel1\";\n this.linkLabel1.Size = new System.Drawing.Size(55, 13);\n this.linkLabel1.TabIndex = 3;\n this.linkLabel1.TabStop = true;\n this.linkLabel1.Text = \"linkLabel1\";\n \n // button3\n this.button3.Location = new System.Drawing.Point(12, 147);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 4;\n this.button3.Text = \"button3\";\n \n this.Controls.Add(this.button3);\n this.Controls.Add(this.linkLabel1);\n this.Controls.Add(this.button2);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.button1);\n }\n}\n[TASK_END]\n```", "inference_time": "2025-08-20 18-32-12"}, "editdistance_info": {"edit_distance": 40.5063, "calculate_time": "2025-08-20 18:32:12", "true_code_clean": "partial class MoreYAML\n {\n private System.ComponentModel.IContainer components = null;\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n #region Windows Form Designer generated code\n private void InitializeComponent()\n {\n System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MoreYAML));\n this.button1 = new System.Windows.Forms.Button();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.button2 = new System.Windows.Forms.Button();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.linkLabel1 = new System.Windows.Forms.LinkLabel();\n this.button3 = new System.Windows.Forms.Button();\n this.groupBox1.SuspendLayout();\n this.SuspendLayout();\n this.button1.Font = new System.Drawing.Font(\"宋体\", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.button1.Location = new System.Drawing.Point(12, 415);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"保存\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n this.groupBox1.Controls.Add(this.linkLabel1);\n this.groupBox1.Controls.Add(this.textBox1);\n this.groupBox1.Location = new System.Drawing.Point(12, 12);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(776, 397);\n this.groupBox1.TabIndex = 1;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"YAML\";\n this.button2.Location = new System.Drawing.Point(713, 415);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"返回\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox1.Font = new System.Drawing.Font(\"微软雅黑\", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.textBox1.Location = new System.Drawing.Point(6, 13);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;\n this.textBox1.Size = new System.Drawing.Size(764, 378);\n this.textBox1.TabIndex = 0;\n this.textBox1.Text = resources.GetString(\"textBox1.Text\");\n this.textBox1.UseWaitCursor = true;\n this.linkLabel1.AutoSize = true;\n this.linkLabel1.Location = new System.Drawing.Point(585, 0);\n this.linkLabel1.Name = \"linkLabel1\";\n this.linkLabel1.Size = new System.Drawing.Size(191, 12);\n this.linkLabel1.TabIndex = 1;\n this.linkLabel1.TabStop = true;\n this.linkLabel1.Text = \"更多请参考 config.yaml 参数文档\";\n this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);\n this.button3.Location = new System.Drawing.Point(93, 415);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 3;\n this.button3.Text = \"重置\";\n this.button3.UseVisualStyleBackColor = true;\n this.button3.Click += new System.EventHandler(this.button3_Click);\n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.ClientSize = new System.Drawing.Size(800, 450);\n this.Controls.Add(this.button3);\n this.Controls.Add(this.button2);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.button1);\n this.MaximizeBox = false;\n this.MinimizeBox = false;\n this.Name = \"MoreYAML\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"编辑 补充参数\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.ResumeLayout(false);\n }\n #endregion\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.LinkLabel linkLabel1;\n private System.Windows.Forms.Button button3;\n }", "predict_code_clean": "partial class MoreYAML\n{\n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n this.button1 = new System.Windows.Forms.Button();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.button2 = new System.Windows.Forms.Button();\n this.linkLabel1 = new System.Windows.Forms.LinkLabel();\n this.button3 = new System.Windows.Forms.Button();\n this.button1.Location = new System.Drawing.Point(12, 12);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"button1\";\n this.groupBox1.Controls.Add(this.textBox1);\n this.groupBox1.Location = new System.Drawing.Point(12, 41);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(200, 100);\n this.groupBox1.TabIndex = 1;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"groupBox1\";\n this.textBox1.Location = new System.Drawing.Point(6, 19);\n this.textBox1.Name = \"textBox1\";\n this.textBox1.Size = new System.Drawing.Size(188, 20);\n this.textBox1.TabIndex = 0;\n this.button2.Location = new System.Drawing.Point(93, 12);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"button2\";\n this.linkLabel1.AutoSize = true;\n this.linkLabel1.Location = new System.Drawing.Point(174, 17);\n this.linkLabel1.Name = \"linkLabel1\";\n this.linkLabel1.Size = new System.Drawing.Size(55, 13);\n this.linkLabel1.TabIndex = 3;\n this.linkLabel1.TabStop = true;\n this.linkLabel1.Text = \"linkLabel1\";\n this.button3.Location = new System.Drawing.Point(12, 147);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 4;\n this.button3.Text = \"button3\";\n this.Controls.Add(this.button3);\n this.Controls.Add(this.linkLabel1);\n this.Controls.Add(this.button2);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.button1);\n }\n}"}} {"repo_name": "SubsCheck-Win-GUI", "file_name": "/SubsCheck-Win-GUI/CheckUpdates.Designer.cs", "inference_info": {"prefix_code": "namespace subs_check.win.gui\n{\n ", "suffix_code": "\n}", "middle_code": "partial class CheckUpdates\n {\n private System.ComponentModel.IContainer components = null;\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n #region Windows Form Designer generated code\n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.label4 = new System.Windows.Forms.Label();\n this.label3 = new System.Windows.Forms.Label();\n this.button1 = new System.Windows.Forms.Button();\n this.label2 = new System.Windows.Forms.Label();\n this.label1 = new System.Windows.Forms.Label();\n this.groupBox2 = new System.Windows.Forms.GroupBox();\n this.label5 = new System.Windows.Forms.Label();\n this.label6 = new System.Windows.Forms.Label();\n this.button2 = new System.Windows.Forms.Button();\n this.label7 = new System.Windows.Forms.Label();\n this.label8 = new System.Windows.Forms.Label();\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.groupBox1.SuspendLayout();\n this.groupBox2.SuspendLayout();\n this.SuspendLayout();\n this.groupBox1.Controls.Add(this.label4);\n this.groupBox1.Controls.Add(this.label3);\n this.groupBox1.Controls.Add(this.button1);\n this.groupBox1.Controls.Add(this.label2);\n this.groupBox1.Controls.Add(this.label1);\n this.groupBox1.Location = new System.Drawing.Point(12, 12);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(144, 89);\n this.groupBox1.TabIndex = 0;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"SubsCheck Win GUI\";\n this.label4.AutoSize = true;\n this.label4.Location = new System.Drawing.Point(77, 37);\n this.label4.Name = \"label4\";\n this.label4.Size = new System.Drawing.Size(53, 12);\n this.label4.TabIndex = 4;\n this.label4.Text = \"v0.0.0.0\";\n this.label3.AutoSize = true;\n this.label3.Location = new System.Drawing.Point(77, 17);\n this.label3.Name = \"label3\";\n this.label3.Size = new System.Drawing.Size(53, 12);\n this.label3.TabIndex = 3;\n this.label3.Text = \"v0.0.0.0\";\n this.button1.Enabled = false;\n this.button1.Location = new System.Drawing.Point(8, 57);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(122, 23);\n this.button1.TabIndex = 2;\n this.button1.Text = \"正在获取版本\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n this.label2.AutoSize = true;\n this.label2.Location = new System.Drawing.Point(10, 37);\n this.label2.Name = \"label2\";\n this.label2.Size = new System.Drawing.Size(65, 12);\n this.label2.TabIndex = 1;\n this.label2.Text = \"当前版本:\";\n this.label1.AutoSize = true;\n this.label1.Location = new System.Drawing.Point(10, 17);\n this.label1.Name = \"label1\";\n this.label1.Size = new System.Drawing.Size(65, 12);\n this.label1.TabIndex = 0;\n this.label1.Text = \"最新版本:\";\n this.groupBox2.Controls.Add(this.label5);\n this.groupBox2.Controls.Add(this.label6);\n this.groupBox2.Controls.Add(this.button2);\n this.groupBox2.Controls.Add(this.label7);\n this.groupBox2.Controls.Add(this.label8);\n this.groupBox2.Location = new System.Drawing.Point(162, 12);\n this.groupBox2.Name = \"groupBox2\";\n this.groupBox2.Size = new System.Drawing.Size(144, 89);\n this.groupBox2.TabIndex = 5;\n this.groupBox2.TabStop = false;\n this.groupBox2.Text = \"Subs-Check 内核\";\n this.label5.AutoSize = true;\n this.label5.Location = new System.Drawing.Point(77, 37);\n this.label5.Name = \"label5\";\n this.label5.Size = new System.Drawing.Size(53, 12);\n this.label5.TabIndex = 4;\n this.label5.Text = \"v0.0.0.0\";\n this.label6.AutoSize = true;\n this.label6.Location = new System.Drawing.Point(77, 17);\n this.label6.Name = \"label6\";\n this.label6.Size = new System.Drawing.Size(53, 12);\n this.label6.TabIndex = 3;\n this.label6.Text = \"正在获取\";\n this.button2.Enabled = false;\n this.button2.Location = new System.Drawing.Point(8, 57);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(122, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"正在获取版本\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n this.label7.AutoSize = true;\n this.label7.Location = new System.Drawing.Point(10, 37);\n this.label7.Name = \"label7\";\n this.label7.Size = new System.Drawing.Size(65, 12);\n this.label7.TabIndex = 1;\n this.label7.Text = \"当前版本:\";\n this.label8.AutoSize = true;\n this.label8.Location = new System.Drawing.Point(10, 17);\n this.label8.Name = \"label8\";\n this.label8.Size = new System.Drawing.Size(65, 12);\n this.label8.TabIndex = 0;\n this.label8.Text = \"最新版本:\";\n this.timer1.Tick += new System.EventHandler(this.timer1_Tick);\n this.comboBox1.FormattingEnabled = true;\n this.comboBox1.Location = new System.Drawing.Point(12, 107);\n this.comboBox1.Name = \"comboBox1\";\n this.comboBox1.Size = new System.Drawing.Size(294, 20);\n this.comboBox1.TabIndex = 23;\n this.comboBox1.Visible = false;\n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.AutoSize = true;\n this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\n this.ClientSize = new System.Drawing.Size(319, 138);\n this.Controls.Add(this.comboBox1);\n this.Controls.Add(this.groupBox2);\n this.Controls.Add(this.groupBox1);\n this.MaximizeBox = false;\n this.MinimizeBox = false;\n this.Name = \"CheckUpdates\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"检查更新\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.groupBox2.ResumeLayout(false);\n this.groupBox2.PerformLayout();\n this.ResumeLayout(false);\n }\n #endregion\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.Label label4;\n private System.Windows.Forms.Label label3;\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.Label label2;\n private System.Windows.Forms.Label label1;\n private System.Windows.Forms.GroupBox groupBox2;\n private System.Windows.Forms.Label label5;\n private System.Windows.Forms.Label label6;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.Label label7;\n private System.Windows.Forms.Label label8;\n private System.Windows.Forms.Timer timer1;\n private System.Windows.Forms.ComboBox comboBox1;\n }", "code_description": null, "fill_type": "CLASS_TYPE", "language_type": "c_sharp", "sub_task_type": null}, "context_code": [["/SubsCheck-Win-GUI/Form1.Designer.cs", "namespace subs_check.win.gui\n{\n partial class Form1\n {\n /// \n /// 必需的设计器变量。\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// 清理所有正在使用的资源。\n /// \n /// 如果应释放托管资源,为 true;否则为 false。\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows 窗体设计器生成的代码\n\n /// \n /// 设计器支持所需的方法 - 不要修改\n /// 使用代码编辑器修改此方法的内容。\n /// \n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));\n this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.checkBox5 = new System.Windows.Forms.CheckBox();\n this.textBox11 = new System.Windows.Forms.TextBox();\n this.button7 = new System.Windows.Forms.Button();\n this.button6 = new System.Windows.Forms.Button();\n this.comboBox4 = new System.Windows.Forms.ComboBox();\n this.button3 = new System.Windows.Forms.Button();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.numericUpDown4 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown3 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();\n this.label7 = new System.Windows.Forms.Label();\n this.label6 = new System.Windows.Forms.Label();\n this.label3 = new System.Windows.Forms.Label();\n this.label2 = new System.Windows.Forms.Label();\n this.label1 = new System.Windows.Forms.Label();\n this.button2 = new System.Windows.Forms.Button();\n this.button1 = new System.Windows.Forms.Button();\n this.label8 = new System.Windows.Forms.Label();\n this.numericUpDown6 = new System.Windows.Forms.NumericUpDown();\n this.numericUpDown5 = new System.Windows.Forms.NumericUpDown();\n this.label4 = new System.Windows.Forms.Label();\n this.label5 = new System.Windows.Forms.Label();\n this.numericUpDown7 = new System.Windows.Forms.NumericUpDown();\n this.label20 = new System.Windows.Forms.Label();\n this.groupBox2 = new System.Windows.Forms.GroupBox();\n this.linkLabel1 = new System.Windows.Forms.LinkLabel();\n this.button5 = new System.Windows.Forms.Button();\n this.richTextBox1 = new System.Windows.Forms.RichTextBox();\n this.groupBox3 = new System.Windows.Forms.GroupBox();\n this.button8 = new System.Windows.Forms.Button();\n this.textBox10 = new System.Windows.Forms.TextBox();\n this.checkBox4 = new System.Windows.Forms.CheckBox();\n this.numericUpDown8 = new System.Windows.Forms.NumericUpDown();\n this.checkBox3 = new System.Windows.Forms.CheckBox();\n this.button4 = new System.Windows.Forms.Button();\n this.checkBox1 = new System.Windows.Forms.CheckBox();\n this.checkBox2 = new System.Windows.Forms.CheckBox();\n this.comboBox5 = new System.Windows.Forms.ComboBox();\n this.label19 = new System.Windows.Forms.Label();\n this.comboBox3 = new System.Windows.Forms.ComboBox();\n this.label10 = new System.Windows.Forms.Label();\n this.comboBox2 = new System.Windows.Forms.ComboBox();\n this.label9 = new System.Windows.Forms.Label();\n this.progressBar1 = new System.Windows.Forms.ProgressBar();\n this.timer2 = new System.Windows.Forms.Timer(this.components);\n this.groupBox4 = new System.Windows.Forms.GroupBox();\n this.textBox4 = new System.Windows.Forms.TextBox();\n this.label13 = new System.Windows.Forms.Label();\n this.textBox3 = new System.Windows.Forms.TextBox();\n this.label12 = new System.Windows.Forms.Label();\n this.textBox2 = new System.Windows.Forms.TextBox();\n this.label11 = new System.Windows.Forms.Label();\n this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);\n this.groupBox5 = new System.Windows.Forms.GroupBox();\n this.textBox6 = new System.Windows.Forms.TextBox();\n this.label15 = new System.Windows.Forms.Label();\n this.textBox7 = new System.Windows.Forms.TextBox();\n this.label16 = new System.Windows.Forms.Label();\n this.groupBox6 = new System.Windows.Forms.GroupBox();\n this.textBox5 = new System.Windows.Forms.TextBox();\n this.label14 = new System.Windows.Forms.Label();\n this.textBox8 = new System.Windows.Forms.TextBox();\n this.label17 = new System.Windows.Forms.Label();\n this.textBox9 = new System.Windows.Forms.TextBox();\n this.label18 = new System.Windows.Forms.Label();\n this.timer3 = new System.Windows.Forms.Timer(this.components);\n this.timer4 = new System.Windows.Forms.Timer(this.components);\n this.groupBox1.SuspendLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).BeginInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown7)).BeginInit();\n this.groupBox2.SuspendLayout();\n this.groupBox3.SuspendLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown8)).BeginInit();\n this.groupBox4.SuspendLayout();\n this.groupBox5.SuspendLayout();\n this.groupBox6.SuspendLayout();\n this.SuspendLayout();\n // \n // notifyIcon1\n // \n this.notifyIcon1.BalloonTipTitle = \"Subs-Check\";\n this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject(\"notifyIcon1.Icon\")));\n this.notifyIcon1.Text = \"Subs-Check:未运行\";\n this.notifyIcon1.Visible = true;\n this.notifyIcon1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon1_MouseClick);\n // \n // timer1\n // \n this.timer1.Enabled = true;\n this.timer1.Interval = 1;\n this.timer1.Tick += new System.EventHandler(this.timer1_Tick);\n // \n // groupBox1\n // \n this.groupBox1.Controls.Add(this.checkBox5);\n this.groupBox1.Controls.Add(this.textBox11);\n this.groupBox1.Controls.Add(this.button7);\n this.groupBox1.Controls.Add(this.button6);\n this.groupBox1.Controls.Add(this.comboBox4);\n this.groupBox1.Controls.Add(this.button3);\n this.groupBox1.Controls.Add(this.textBox1);\n this.groupBox1.Controls.Add(this.comboBox1);\n this.groupBox1.Controls.Add(this.numericUpDown4);\n this.groupBox1.Controls.Add(this.numericUpDown3);\n this.groupBox1.Controls.Add(this.numericUpDown2);\n this.groupBox1.Controls.Add(this.numericUpDown1);\n this.groupBox1.Controls.Add(this.label7);\n this.groupBox1.Controls.Add(this.label6);\n this.groupBox1.Controls.Add(this.label3);\n this.groupBox1.Controls.Add(this.label2);\n this.groupBox1.Controls.Add(this.label1);\n this.groupBox1.Controls.Add(this.button2);\n this.groupBox1.Controls.Add(this.button1);\n this.groupBox1.Controls.Add(this.label8);\n this.groupBox1.Location = new System.Drawing.Point(13, 13);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(174, 484);\n this.groupBox1.TabIndex = 0;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"参数设置\";\n // \n // checkBox5\n // \n this.checkBox5.AutoSize = true;\n this.checkBox5.Location = new System.Drawing.Point(91, 428);\n this.checkBox5.Name = \"checkBox5\";\n this.checkBox5.Size = new System.Drawing.Size(72, 16);\n this.checkBox5.TabIndex = 30;\n this.checkBox5.Text = \"开机自启\";\n this.checkBox5.UseVisualStyleBackColor = true;\n this.checkBox5.CheckedChanged += new System.EventHandler(this.checkBox5_CheckedChanged);\n // \n // textBox11\n // \n this.textBox11.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox11.Location = new System.Drawing.Point(9, 343);\n this.textBox11.Name = \"textBox11\";\n this.textBox11.Size = new System.Drawing.Size(154, 21);\n this.textBox11.TabIndex = 21;\n this.textBox11.Text = \"0 */2 * * *\";\n this.textBox11.Visible = false;\n this.textBox11.DoubleClick += new System.EventHandler(this.切换cron表达式);\n this.textBox11.Leave += new System.EventHandler(this.textBox11_Leave);\n // \n // button7\n // \n this.button7.Enabled = false;\n this.button7.Location = new System.Drawing.Point(7, 399);\n this.button7.Name = \"button7\";\n this.button7.Size = new System.Drawing.Size(75, 23);\n this.button7.TabIndex = 30;\n this.button7.Text = \"🔀未启动\";\n this.button7.UseVisualStyleBackColor = true;\n this.button7.Click += new System.EventHandler(this.button7_Click);\n // \n // button6\n // \n this.button6.Enabled = false;\n this.button6.Location = new System.Drawing.Point(88, 399);\n this.button6.Name = \"button6\";\n this.button6.Size = new System.Drawing.Size(75, 23);\n this.button6.TabIndex = 29;\n this.button6.Text = \"访问WebUI\";\n this.button6.UseVisualStyleBackColor = true;\n this.button6.Click += new System.EventHandler(this.button6_Click);\n // \n // comboBox4\n // \n this.comboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\n this.comboBox4.FormattingEnabled = true;\n this.comboBox4.Items.AddRange(new object[] {\n \"通用订阅\",\n \"Clash\"});\n this.comboBox4.Location = new System.Drawing.Point(8, 372);\n this.comboBox4.Name = \"comboBox4\";\n this.comboBox4.Size = new System.Drawing.Size(74, 20);\n this.comboBox4.TabIndex = 19;\n // \n // button3\n // \n this.button3.Enabled = false;\n this.button3.Location = new System.Drawing.Point(88, 370);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 18;\n this.button3.Text = \"复制订阅\";\n this.button3.UseVisualStyleBackColor = true;\n this.button3.Click += new System.EventHandler(this.button3_Click);\n // \n // textBox1\n // \n this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox1.Location = new System.Drawing.Point(9, 179);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ReadOnly = true;\n this.textBox1.Size = new System.Drawing.Size(154, 185);\n this.textBox1.TabIndex = 17;\n this.textBox1.Text = resources.GetString(\"textBox1.Text\");\n this.textBox1.WordWrap = false;\n this.textBox1.Click += new System.EventHandler(this.textBox1_DoubleClick);\n this.textBox1.DoubleClick += new System.EventHandler(this.textBox1_DoubleClick);\n // \n // comboBox1\n // \n this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\n this.comboBox1.FormattingEnabled = true;\n this.comboBox1.Items.AddRange(new object[] {\n \"本地\",\n \"gist\",\n \"r2\",\n \"webdav\"});\n this.comboBox1.Location = new System.Drawing.Point(105, 135);\n this.comboBox1.Name = \"comboBox1\";\n this.comboBox1.Size = new System.Drawing.Size(58, 20);\n this.comboBox1.TabIndex = 16;\n this.comboBox1.TextChanged += new System.EventHandler(this.comboBox1_TextChanged);\n // \n // numericUpDown4\n // \n this.numericUpDown4.Location = new System.Drawing.Point(105, 106);\n this.numericUpDown4.Maximum = new decimal(new int[] {\n 20480,\n 0,\n 0,\n 0});\n this.numericUpDown4.Minimum = new decimal(new int[] {\n 128,\n 0,\n 0,\n 0});\n this.numericUpDown4.Name = \"numericUpDown4\";\n this.numericUpDown4.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown4.TabIndex = 13;\n this.numericUpDown4.Value = new decimal(new int[] {\n 1024,\n 0,\n 0,\n 0});\n this.numericUpDown4.ValueChanged += new System.EventHandler(this.numericUpDown4_ValueChanged);\n // \n // numericUpDown3\n // \n this.numericUpDown3.Location = new System.Drawing.Point(105, 77);\n this.numericUpDown3.Maximum = new decimal(new int[] {\n 10000,\n 0,\n 0,\n 0});\n this.numericUpDown3.Minimum = new decimal(new int[] {\n 1000,\n 0,\n 0,\n 0});\n this.numericUpDown3.Name = \"numericUpDown3\";\n this.numericUpDown3.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown3.TabIndex = 12;\n this.numericUpDown3.Value = new decimal(new int[] {\n 5000,\n 0,\n 0,\n 0});\n this.numericUpDown3.ValueChanged += new System.EventHandler(this.numericUpDown3_ValueChanged);\n // \n // numericUpDown2\n // \n this.numericUpDown2.Location = new System.Drawing.Point(105, 48);\n this.numericUpDown2.Maximum = new decimal(new int[] {\n 1440,\n 0,\n 0,\n 0});\n this.numericUpDown2.Minimum = new decimal(new int[] {\n 30,\n 0,\n 0,\n 0});\n this.numericUpDown2.Name = \"numericUpDown2\";\n this.numericUpDown2.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown2.TabIndex = 11;\n this.numericUpDown2.Value = new decimal(new int[] {\n 120,\n 0,\n 0,\n 0});\n this.numericUpDown2.DoubleClick += new System.EventHandler(this.切换cron表达式);\n // \n // numericUpDown1\n // \n this.numericUpDown1.Location = new System.Drawing.Point(105, 19);\n this.numericUpDown1.Maximum = new decimal(new int[] {\n 1024,\n 0,\n 0,\n 0});\n this.numericUpDown1.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown1.Name = \"numericUpDown1\";\n this.numericUpDown1.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown1.TabIndex = 10;\n this.numericUpDown1.Value = new decimal(new int[] {\n 32,\n 0,\n 0,\n 0});\n this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged);\n // \n // label7\n // \n this.label7.AutoSize = true;\n this.label7.Location = new System.Drawing.Point(7, 137);\n this.label7.Name = \"label7\";\n this.label7.Size = new System.Drawing.Size(65, 12);\n this.label7.TabIndex = 8;\n this.label7.Text = \"保存方法:\";\n // \n // label6\n // \n this.label6.AutoSize = true;\n this.label6.Location = new System.Drawing.Point(7, 108);\n this.label6.Name = \"label6\";\n this.label6.Size = new System.Drawing.Size(101, 12);\n this.label6.TabIndex = 5;\n this.label6.Text = \"测速下限(KB/s):\";\n // \n // label3\n // \n this.label3.AutoSize = true;\n this.label3.Location = new System.Drawing.Point(7, 79);\n this.label3.Name = \"label3\";\n this.label3.Size = new System.Drawing.Size(101, 12);\n this.label3.TabIndex = 4;\n this.label3.Text = \"超时时间(毫秒):\";\n // \n // label2\n // \n this.label2.AutoSize = true;\n this.label2.Location = new System.Drawing.Point(7, 50);\n this.label2.Name = \"label2\";\n this.label2.Size = new System.Drawing.Size(101, 12);\n this.label2.TabIndex = 3;\n this.label2.Text = \"检查间隔(分钟):\";\n this.label2.DoubleClick += new System.EventHandler(this.切换cron表达式);\n // \n // label1\n // \n this.label1.AutoSize = true;\n this.label1.Location = new System.Drawing.Point(7, 21);\n this.label1.Name = \"label1\";\n this.label1.Size = new System.Drawing.Size(77, 12);\n this.label1.TabIndex = 2;\n this.label1.Text = \"并发线程数:\";\n // \n // button2\n // \n this.button2.Location = new System.Drawing.Point(88, 450);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 1;\n this.button2.Text = \"高级设置∧\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n // \n // button1\n // \n this.button1.Font = new System.Drawing.Font(\"宋体\", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.button1.Location = new System.Drawing.Point(7, 428);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 45);\n this.button1.TabIndex = 0;\n this.button1.Text = \"▶️ 启动\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // label8\n // \n this.label8.AutoSize = true;\n this.label8.Location = new System.Drawing.Point(7, 164);\n this.label8.Name = \"label8\";\n this.label8.Size = new System.Drawing.Size(161, 12);\n this.label8.TabIndex = 9;\n this.label8.Text = \"节点池订阅链接(点击编辑):\";\n this.label8.Click += new System.EventHandler(this.textBox1_DoubleClick);\n // \n // numericUpDown6\n // \n this.numericUpDown6.Location = new System.Drawing.Point(281, 19);\n this.numericUpDown6.Maximum = new decimal(new int[] {\n 65535,\n 0,\n 0,\n 0});\n this.numericUpDown6.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown6.Name = \"numericUpDown6\";\n this.numericUpDown6.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown6.TabIndex = 15;\n this.numericUpDown6.Value = new decimal(new int[] {\n 8199,\n 0,\n 0,\n 0});\n this.numericUpDown6.ValueChanged += new System.EventHandler(this.numericUpDown6_ValueChanged);\n // \n // numericUpDown5\n // \n this.numericUpDown5.Location = new System.Drawing.Point(281, 45);\n this.numericUpDown5.Maximum = new decimal(new int[] {\n 10,\n 0,\n 0,\n 0});\n this.numericUpDown5.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown5.Name = \"numericUpDown5\";\n this.numericUpDown5.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown5.TabIndex = 14;\n this.numericUpDown5.Value = new decimal(new int[] {\n 10,\n 0,\n 0,\n 0});\n // \n // label4\n // \n this.label4.AutoSize = true;\n this.label4.Location = new System.Drawing.Point(191, 21);\n this.label4.Name = \"label4\";\n this.label4.Size = new System.Drawing.Size(89, 12);\n this.label4.TabIndex = 7;\n this.label4.Text = \"HTTP服务端口:\";\n // \n // label5\n // \n this.label5.AutoSize = true;\n this.label5.Location = new System.Drawing.Point(191, 48);\n this.label5.Name = \"label5\";\n this.label5.Size = new System.Drawing.Size(89, 12);\n this.label5.TabIndex = 6;\n this.label5.Text = \"测速时间(秒):\";\n // \n // numericUpDown7\n // \n this.numericUpDown7.Location = new System.Drawing.Point(441, 19);\n this.numericUpDown7.Maximum = new decimal(new int[] {\n 65535,\n 0,\n 0,\n 0});\n this.numericUpDown7.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown7.Name = \"numericUpDown7\";\n this.numericUpDown7.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown7.TabIndex = 21;\n this.numericUpDown7.Value = new decimal(new int[] {\n 8299,\n 0,\n 0,\n 0});\n this.numericUpDown7.ValueChanged += new System.EventHandler(this.numericUpDown6_ValueChanged);\n // \n // label20\n // \n this.label20.AutoSize = true;\n this.label20.Location = new System.Drawing.Point(345, 21);\n this.label20.Name = \"label20\";\n this.label20.Size = new System.Drawing.Size(95, 12);\n this.label20.TabIndex = 20;\n this.label20.Text = \"Sub-Store端口:\";\n // \n // groupBox2\n // \n this.groupBox2.Controls.Add(this.linkLabel1);\n this.groupBox2.Controls.Add(this.button5);\n this.groupBox2.Controls.Add(this.richTextBox1);\n this.groupBox2.Location = new System.Drawing.Point(193, 13);\n this.groupBox2.Name = \"groupBox2\";\n this.groupBox2.Size = new System.Drawing.Size(600, 484);\n this.groupBox2.TabIndex = 1;\n this.groupBox2.TabStop = false;\n this.groupBox2.Text = \"实时日志\";\n // \n // linkLabel1\n // \n this.linkLabel1.AutoSize = true;\n this.linkLabel1.Location = new System.Drawing.Point(460, 2);\n this.linkLabel1.Name = \"linkLabel1\";\n this.linkLabel1.Size = new System.Drawing.Size(137, 12);\n this.linkLabel1.TabIndex = 21;\n this.linkLabel1.TabStop = true;\n this.linkLabel1.Text = \"关于 SubsCheck Win GUI\";\n this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);\n // \n // button5\n // \n this.button5.Location = new System.Drawing.Point(515, 450);\n this.button5.Name = \"button5\";\n this.button5.Size = new System.Drawing.Size(75, 23);\n this.button5.TabIndex = 20;\n this.button5.Text = \"更新内核\";\n this.button5.UseVisualStyleBackColor = true;\n this.button5.Visible = false;\n this.button5.Click += new System.EventHandler(this.button5_Click);\n // \n // richTextBox1\n // \n this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;\n this.richTextBox1.Location = new System.Drawing.Point(3, 17);\n this.richTextBox1.Name = \"richTextBox1\";\n this.richTextBox1.ReadOnly = true;\n this.richTextBox1.Size = new System.Drawing.Size(594, 464);\n this.richTextBox1.TabIndex = 0;\n this.richTextBox1.Text = \"\";\n this.richTextBox1.DoubleClick += new System.EventHandler(this.richTextBox1_DoubleClick);\n // \n // groupBox3\n // \n this.groupBox3.Controls.Add(this.button8);\n this.groupBox3.Controls.Add(this.textBox10);\n this.groupBox3.Controls.Add(this.checkBox4);\n this.groupBox3.Controls.Add(this.numericUpDown8);\n this.groupBox3.Controls.Add(this.checkBox3);\n this.groupBox3.Controls.Add(this.button4);\n this.groupBox3.Controls.Add(this.checkBox1);\n this.groupBox3.Controls.Add(this.numericUpDown6);\n this.groupBox3.Controls.Add(this.checkBox2);\n this.groupBox3.Controls.Add(this.numericUpDown5);\n this.groupBox3.Controls.Add(this.comboBox5);\n this.groupBox3.Controls.Add(this.label19);\n this.groupBox3.Controls.Add(this.comboBox3);\n this.groupBox3.Controls.Add(this.label10);\n this.groupBox3.Controls.Add(this.label4);\n this.groupBox3.Controls.Add(this.comboBox2);\n this.groupBox3.Controls.Add(this.label9);\n this.groupBox3.Controls.Add(this.label5);\n this.groupBox3.Controls.Add(this.numericUpDown7);\n this.groupBox3.Controls.Add(this.label20);\n this.groupBox3.Location = new System.Drawing.Point(13, 503);\n this.groupBox3.Name = \"groupBox3\";\n this.groupBox3.Size = new System.Drawing.Size(780, 103);\n this.groupBox3.TabIndex = 2;\n this.groupBox3.TabStop = false;\n this.groupBox3.Text = \"高级设置\";\n this.groupBox3.Visible = false;\n // \n // button8\n // \n this.button8.Location = new System.Drawing.Point(695, 43);\n this.button8.Name = \"button8\";\n this.button8.Size = new System.Drawing.Size(75, 23);\n this.button8.TabIndex = 29;\n this.button8.Text = \"补充参数\";\n this.button8.UseVisualStyleBackColor = true;\n this.button8.Click += new System.EventHandler(this.button8_Click);\n // \n // textBox10\n // \n this.textBox10.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox10.Enabled = false;\n this.textBox10.Location = new System.Drawing.Point(141, 73);\n this.textBox10.Name = \"textBox10\";\n this.textBox10.PasswordChar = '*';\n this.textBox10.Size = new System.Drawing.Size(110, 21);\n this.textBox10.TabIndex = 6;\n this.textBox10.Text = \"admin\";\n this.textBox10.Enter += new System.EventHandler(this.textBox10_Enter);\n this.textBox10.Leave += new System.EventHandler(this.textBox10_Leave);\n // \n // checkBox4\n // \n this.checkBox4.AutoSize = true;\n this.checkBox4.Location = new System.Drawing.Point(9, 75);\n this.checkBox4.Name = \"checkBox4\";\n this.checkBox4.Size = new System.Drawing.Size(138, 16);\n this.checkBox4.TabIndex = 28;\n this.checkBox4.Text = \"启用WebUI API密钥:\";\n this.checkBox4.UseVisualStyleBackColor = true;\n this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox4_CheckedChanged);\n // \n // numericUpDown8\n // \n this.numericUpDown8.Enabled = false;\n this.numericUpDown8.Location = new System.Drawing.Point(122, 45);\n this.numericUpDown8.Maximum = new decimal(new int[] {\n 65535,\n 0,\n 0,\n 0});\n this.numericUpDown8.Minimum = new decimal(new int[] {\n 1,\n 0,\n 0,\n 0});\n this.numericUpDown8.Name = \"numericUpDown8\";\n this.numericUpDown8.Size = new System.Drawing.Size(58, 21);\n this.numericUpDown8.TabIndex = 22;\n this.numericUpDown8.Value = new decimal(new int[] {\n 100,\n 0,\n 0,\n 0});\n // \n // checkBox3\n // \n this.checkBox3.AutoSize = true;\n this.checkBox3.Location = new System.Drawing.Point(9, 48);\n this.checkBox3.Name = \"checkBox3\";\n this.checkBox3.Size = new System.Drawing.Size(108, 16);\n this.checkBox3.TabIndex = 27;\n this.checkBox3.Text = \"节点保存数目:\";\n this.checkBox3.UseVisualStyleBackColor = true;\n this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged);\n // \n // button4\n // \n this.button4.Location = new System.Drawing.Point(695, 71);\n this.button4.Name = \"button4\";\n this.button4.Size = new System.Drawing.Size(75, 23);\n this.button4.TabIndex = 26;\n this.button4.Text = \"检查更新\";\n this.button4.UseVisualStyleBackColor = true;\n this.button4.Click += new System.EventHandler(this.button4_Click);\n // \n // checkBox1\n // \n this.checkBox1.AutoSize = true;\n this.checkBox1.Checked = true;\n this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked;\n this.checkBox1.Location = new System.Drawing.Point(9, 20);\n this.checkBox1.Name = \"checkBox1\";\n this.checkBox1.Size = new System.Drawing.Size(96, 16);\n this.checkBox1.TabIndex = 22;\n this.checkBox1.Text = \"节点地址查询\";\n this.checkBox1.UseVisualStyleBackColor = true;\n this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);\n // \n // checkBox2\n // \n this.checkBox2.AutoSize = true;\n this.checkBox2.Location = new System.Drawing.Point(106, 20);\n this.checkBox2.Name = \"checkBox2\";\n this.checkBox2.Size = new System.Drawing.Size(84, 16);\n this.checkBox2.TabIndex = 25;\n this.checkBox2.Text = \"流媒体检测\";\n this.checkBox2.UseVisualStyleBackColor = true;\n this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);\n // \n // comboBox5\n // \n this.comboBox5.FormattingEnabled = true;\n this.comboBox5.Items.AddRange(new object[] {\n \"[内置]布丁狗的订阅转换\",\n \"[内置]ACL4SSR_Online_Full\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/布丁狗的订阅转\" +\n \"换.yaml\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/ACL4SSR\" +\n \"_Online_Full.yaml\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/ACL4SSR\" +\n \"_Online_Full_WithIcon.yaml\",\n \"https://raw.githubusercontent.com/mihomo-party-org/override-hub/main/yaml/添加直连规则.\" +\n \"yaml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/布丁狗的订阅转换.y\" +\n \"aml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/ACL4SSR_On\" +\n \"line_Full.yaml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/ACL4SSR_On\" +\n \"line_Full_WithIcon.yaml\",\n \"https://fastly.jsdelivr.net/gh/mihomo-party-org/override-hub@main/yaml/添加直连规则.yam\" +\n \"l\"});\n this.comboBox5.Location = new System.Drawing.Point(414, 73);\n this.comboBox5.Name = \"comboBox5\";\n this.comboBox5.Size = new System.Drawing.Size(275, 20);\n this.comboBox5.TabIndex = 24;\n this.comboBox5.SelectedIndexChanged += new System.EventHandler(this.comboBox5_SelectedIndexChanged);\n // \n // label19\n // \n this.label19.AutoSize = true;\n this.label19.Location = new System.Drawing.Point(260, 76);\n this.label19.Name = \"label19\";\n this.label19.Size = new System.Drawing.Size(149, 12);\n this.label19.TabIndex = 23;\n this.label19.Text = \"Clash订阅 覆写配置文件:\";\n // \n // comboBox3\n // \n this.comboBox3.FormattingEnabled = true;\n this.comboBox3.Items.AddRange(new object[] {\n \"自动选择\",\n \"1.github.010716.xyz\",\n \"113355.kabaka.xyz\",\n \"80888888.xyz\",\n \"aa.w0x7ce.eu\",\n \"acc.meiqer.com\",\n \"api-ghp.fjy.zone\",\n \"armg1.jyhk.tk\",\n \"armg2.jyhk.tk\",\n \"b.yesican.top\",\n \"bakht1.jsdelivr.fyi\",\n \"bakht2.jsdelivr.fyi\",\n \"bakht3.jsdelivr.fyi\",\n \"booster.ookkk.ggff.net\",\n \"c.gatepro.cn\",\n \"cc.ikakatoo.us\",\n \"ccgit1.5gyh.cf\",\n \"ccgit2.5gyh.cf\",\n \"cdn-gh.141888.xyz\",\n \"cfghproxy.165683.xyz\",\n \"chirophy.online\",\n \"choner.eu.org\",\n \"d.scyun.top\",\n \"daili.6dot.cn\",\n \"dh.guluy.top\",\n \"dh.jeblove.com\",\n \"dl.github.mirror.shalo.link\",\n \"dnsvip.uk\",\n \"docker.bkxhkoo.com\",\n \"docker.ppp.ac.cn\",\n \"down.avi.gs\",\n \"download.ojbk.one\",\n \"download.serein.cc\",\n \"f.shenbing.nyc.mn\",\n \"fastgithub.starryfun.icu\",\n \"file.justgame.top\",\n \"ft.v1k1.xin\",\n \"fuck-flow.nobige.cn\",\n \"g.108964.xyz\",\n \"g.blfrp.cn\",\n \"g.bravexist.cn\",\n \"g.down.0ms.net\",\n \"g.jscdn.cn\",\n \"g.yeyuqiufeng.cn\",\n \"gh.136361.xyz\",\n \"gh.13x.plus\",\n \"gh.19121912.xyz\",\n \"gh.193.gs\",\n \"gh.220106.xyz\",\n \"gh.222322.xyz\",\n \"gh.244224659.xyz\",\n \"gh.2i.gs\",\n \"gh.316688.xyz\",\n \"gh.321122.xyz\",\n \"gh.334433.xyz\",\n \"gh.39.al\",\n \"gh.518298.xyz\",\n \"gh.52099520.xyz\",\n \"gh.654535.xyz\",\n \"gh.777000.best\",\n \"gh.799154.xyz\",\n \"gh.860686.xyz\",\n \"gh.8p.gs\",\n \"gh.960980.xyz\",\n \"gh.accn.eu.org\",\n \"gh.amirrors.com\",\n \"gh.andiest.com\",\n \"gh.aurzex.top\",\n \"gh.avmine.com\",\n \"gh.b52m.cn\",\n \"gh.bhexo.cn\",\n \"gh.cdn.fullcone.cn\",\n \"gh.chewable.eu.org\",\n \"gh.chillwaytech.com\",\n \"gh.cnbattle.com\",\n \"gh.crond.dev\",\n \"gh.dev.438250.xyz\",\n \"gh.duang.io\",\n \"gh.duckcc.com\",\n \"gh.dwsy.link\",\n \"gh.ecdn.ip-ddns.com\",\n \"gh.flewsea.news\",\n \"gh.flewsea.pw\",\n \"gh.flyrr.cc\",\n \"gh.gongyi.tk\",\n \"gh.gorun.eu.org\",\n \"gh.gxb.pub\",\n \"gh.haloless.com\",\n \"gh.heshiheng.top\",\n \"gh.hitcs.cc\",\n \"gh.i3.pw\",\n \"gh.ibridge.eu.org\",\n \"gh.iinx.top\",\n \"gh.j8.work\",\n \"gh.jadelive.top\",\n \"gh.jscdn.cn\",\n \"gh.jxq.io\",\n \"gh.kejilion.pro\",\n \"gh.kemon.ai\",\n \"gh.kmxm.online\",\n \"gh.lib.cx\",\n \"gh.lkwplus.com\",\n \"gh.lux1983.com\",\n \"gh.luzy.top\",\n \"gh.lyh.moe\",\n \"gh.miaomiao.video\",\n \"gh.micedns.cloudns.org\",\n \"gh.mirror.190211.xyz\",\n \"gh.mirror.coolfeature.top\",\n \"gh.moetools.net\",\n \"gh.momonomi.xyz\",\n \"gh.mrskye.cn\",\n \"gh.mtx72.cc\",\n \"gh.nekhill.top\",\n \"gh.nekorect.eu.org\",\n \"gh.nextfuture.top\",\n \"gh.oevery.me\",\n \"gh.oneproxy.top\",\n \"gh.opsproxy.com\",\n \"gh.osspub.cn\",\n \"gh.padao.fun\",\n \"gh.prlrr.com\",\n \"gh.pylas.xyz\",\n \"gh.qptf.eu.org\",\n \"gh.qsd.onl\",\n \"gh.qsq.one\",\n \"gh.rem.asia\",\n \"gh.riye.de\",\n \"gh.scy.ink\",\n \"gh.someo.top\",\n \"gh.stanl.ee\",\n \"gh.stewitch.com\",\n \"gh.suite.eu.org\",\n \"gh.tbw.wiki\",\n \"gh.tou.lu\",\n \"gh.tryxd.cn\",\n \"gh.uclort.com\",\n \"gh.wglee.org\",\n \"gh.wowforever.xyz\",\n \"gh.wuuu.cc\",\n \"gh.wwang.de\",\n \"gh.wygg.us.kg\",\n \"gh.xbzza.cn\",\n \"gh.xda.plus\",\n \"gh.yahool.com.cn\",\n \"gh.yushum.com\",\n \"ghac.760710.xyz\",\n \"ghacc.cpuhk.eu.org\",\n \"ghb.wglee.org\",\n \"gh-boost.oneboy.app\",\n \"gh-deno.mocn.top\",\n \"ghfast.top\",\n \"ghjs.131412.eu.org\",\n \"ghp.618032.xyz\",\n \"ghp.9e6.site\",\n \"ghp.dnsplus.uk\",\n \"ghp.fit2.fun\",\n \"ghp.imc.re\",\n \"ghp.jokeme.top\",\n \"ghp.lanchonghai.com\",\n \"ghp.miaostay.com\",\n \"ghp.opendatahub.xyz\",\n \"ghp.pbren.com\",\n \"ghp.src.moe\",\n \"ghp.tryanks.com\",\n \"ghp.vatery.com\",\n \"ghp.xiaopan.ai\",\n \"ghp.ybot.xin\",\n \"ghp.yeye.f5.si\",\n \"ghproxy.0081024.xyz\",\n \"ghproxy.053000.xyz\",\n \"ghproxy.200502.xyz\",\n \"ghproxy.943689.xyz\",\n \"ghproxy.alltobid.cc\",\n \"ghproxy.amayakite.xyz\",\n \"ghproxy.bugungu.top\",\n \"gh-proxy.dorz.tech\",\n \"ghproxy.dsdog.tk\",\n \"ghproxy.ducknet.work\",\n \"ghproxy.gopher.ink\",\n \"ghproxy.gpnu.org\",\n \"ghproxy.hoshizukimio.top\",\n \"gh-proxy.iflyelf.com\",\n \"ghproxy.imoyuapp.win\",\n \"gh-proxy.jacksixth.top\",\n \"gh-proxy.jmper.me\",\n \"ghproxy.joylian.com\",\n \"gh-proxy.just520.top\",\n \"ghproxy.licardo.vip\",\n \"gh-proxy.mereith.com\",\n \"ghproxy.minge.dev\",\n \"ghproxy.missfuture.eu.org\",\n \"ghproxy.moweilong.com\",\n \"ghproxy.nanakorobi.com\",\n \"ghproxy.net\",\n \"gh-proxy.not.icu\",\n \"ghproxy.ownyuan.top\",\n \"gh-proxy.rxliuli.com\",\n \"ghproxy.sakuramoe.dev\",\n \"ghproxy.smallfawn.work\",\n \"ghproxy.sveir.xyz\",\n \"ghproxy.temoa.fun\",\n \"ghproxy.thefoxnet.com\",\n \"ghproxy.tracemouse.top\",\n \"ghproxy.txq.life\",\n \"ghproxy.viper.pub\",\n \"ghproxy.vyronlee-lab.com\",\n \"ghproxy.weizhiwen.net\",\n \"ghproxy.wjsphy.top\",\n \"ghproxy.workers.haoutil.com\",\n \"ghproxy.xiaohei-studio-chatgpt-proxy.com.cn\",\n \"gh-proxy.yuntao.me\",\n \"git.1999111.xyz\",\n \"git.22345678.xyz\",\n \"git.40609891.xyz\",\n \"git.5gyh.cf\",\n \"git.988896.xyz\",\n \"git.aaltozz.info\",\n \"git.acap.cc\",\n \"git.amoluo.win\",\n \"git.anye.in\",\n \"git.binbow.link\",\n \"git.blaow.cloudns.org\",\n \"git.closersyu.top\",\n \"git.ifso.site\",\n \"git.imvery.moe\",\n \"git.ixdd.de\",\n \"git.ldvx.de\",\n \"git.lincloud.pro\",\n \"git.liunasc.xyz\",\n \"git.llvho.com\",\n \"git.loushi.site\",\n \"git.lzzz.ink\",\n \"git.maomao.ovh\",\n \"git.mokoc.live\",\n \"git.niege.app\",\n \"git.nyar.work\",\n \"git.o8.cx\",\n \"git.outtw.com\",\n \"git.ppp.ac.cn\",\n \"git.repcz.link\",\n \"git.txaff.com\",\n \"git.verynb.org\",\n \"git.wsl.icu\",\n \"git.wyy.sh\",\n \"git.xiny.eu.org\",\n \"git.xuantan.icu\",\n \"git.zlong.eu.org\",\n \"git3.openapi.site\",\n \"git-clone.ccrui.dev\",\n \"github.08050611.xyz\",\n \"github.143760.xyz\",\n \"github.170011.xyz\",\n \"github.17263241.xyz\",\n \"github.180280.xyz\",\n \"github.197909.xyz\",\n \"github.19890821.xyz\",\n \"github.201068.xyz\",\n \"github.333033.xyz\",\n \"github.4240333.xyz\",\n \"github.564456.xyz\",\n \"github.732086.xyz\",\n \"github.776884.xyz\",\n \"github.789056.xyz\",\n \"github.818668.xyz\",\n \"github.8void.sbs\",\n \"github.9394961.xyz\",\n \"github.960118.xyz\",\n \"github.abyss.moe\",\n \"github.atzzz.com\",\n \"github.axcio.dns-dynamic.net\",\n \"github.boki.moe\",\n \"github.boringhex.top\",\n \"github.bullb.net\",\n \"github.c1g.top\",\n \"github.cf.xihale.top\",\n \"github.chasun.top\",\n \"github.chuancey.eu.org\",\n \"github.cnxiaobai.com\",\n \"github.computerqwq.top\",\n \"github.cswklt.top\",\n \"github.ctios.cn\",\n \"github.ddlink.asia\",\n \"github.dockerspeed.site\",\n \"github.eejsq.net\",\n \"github.ffffffff0x.com\",\n \"github.gdzja.site\",\n \"github.haodiy.xyz\",\n \"github.hhh.sd\",\n \"github.hi.edu.rs\",\n \"github.hostscc.top\",\n \"github.hx208.top\",\n \"github.ilxyz.xyz\",\n \"github.intellisensing.tech\",\n \"github.jerryliang.win\",\n \"github.jimmyshjj.top\",\n \"github.jinenyy.vip\",\n \"github.jscdn.cn\",\n \"github.kidos.top\",\n \"github.kuugo.top\",\n \"github.lao.plus\",\n \"github.mayx.eu.org\",\n \"github.mirror.qlnu-sec.cn\",\n \"github.mirror.vurl.eu.org\",\n \"github.mirrors.hikafeng.com\",\n \"github.mistudio.top\",\n \"github.orangbus.cn\",\n \"github.pipers.cn\",\n \"github.proxy.zerozone.tech\",\n \"github.pxy.lnsee.com\",\n \"github.quickso.net\",\n \"github.ruxi.org\",\n \"github.sagolu.top\",\n \"github.serein.cc\",\n \"github.snakexgc.com\",\n \"github.space520.eu.org\",\n \"github.sssss.work\",\n \"github.static.cv\",\n \"github.suyijun.top\",\n \"github.try255.com\",\n \"github.unipus.site\",\n \"github.verynb.org\",\n \"github.vipchanel.com\",\n \"github.widiazine.top\",\n \"github.workers.lv10.ren\",\n \"github.workersnail.com\",\n \"github.xin-yu.cloud\",\n \"github.xiongmx.com\",\n \"github.xwb009.xyz\",\n \"github.xxlab.tech\",\n \"github.xxqq.de\",\n \"github.xykcloud.com\",\n \"github.yeep6.eu.org\",\n \"github.ylyhtools.top\",\n \"github.yoloarea.com\",\n \"github.yunfile.fun\",\n \"github.zhaolele.top\",\n \"github.zhou2008.cn\",\n \"github.zhulin240520.buzz\",\n \"github.zyhmifan.top\",\n \"githubacc.caiaiwan.com\",\n \"githubapi.jjchizha.com\",\n \"githubgo.856798.xyz\",\n \"github-proxy.ai-lulu.top\",\n \"github-proxy.caoayu.top\",\n \"github-proxy.explorexd.uk\",\n \"github-proxy.fjiabinc.cn\",\n \"github-proxy.sharefree.site\",\n \"githubproxy.unix.do\",\n \"github-quick.1ms.dev\",\n \"github-raw-download.nekhill.top\",\n \"githubsg.lilyya.top\",\n \"gitproxy.mrhjx.cn\",\n \"gitproxy.ozoo.top\",\n \"godlike.ezpull.top\",\n \"gp.19841106.xyz\",\n \"gp.dahe.now.cc\",\n \"gp.daxei.now.cc\",\n \"g-p.loli.us\",\n \"gp.ownorigin.top\",\n \"gt.changqqq.xyz\",\n \"gxb.pub\",\n \"hay.uxio.cn\",\n \"hg.19840228.top\",\n \"hh.newhappy.cf\",\n \"hk.114914.xyz\",\n \"hub.12138.3653655.xyz\",\n \"hub.326998.xyz\",\n \"hub.885666.xyz\",\n \"hub.fnas64.xin\",\n \"hub.jeblove.com\",\n \"hub.naloong.de\",\n \"hub.vps.861020.xyz\",\n \"hub.vvn.me\",\n \"hub.why-ing.top\",\n \"hub.xjl.ch\",\n \"jh.ussh.net\",\n \"jias.ayanjiu.top\",\n \"jiasu.iwtriptqt1016.eu.org\",\n \"jiasughapi.lingjun.cc\",\n \"jiasuqi.167889.xyz\",\n \"jisuan.xyz\",\n \"js.wd666.cloudns.biz\",\n \"l0l0l.cc\",\n \"m.seafood.loan\",\n \"mc.cn.eu.org\",\n \"mdv.162899.xyz\",\n \"micromatrix.gq\",\n \"mip.cnzzla.com\",\n \"my.iiso.site\",\n \"my.losesw.live\",\n \"mygh.api.xiaomao.eu.org\",\n \"nav.253874.net\",\n \"nav.cxycsx.vip\",\n \"nav.gjcloak.xyz\",\n \"nav.hgd1999.com\",\n \"nav.hoiho.cn\",\n \"nav.syss.fun\",\n \"nav.tossp.com\",\n \"nav.wxapp.xyz\",\n \"nav.yyxw.tk\",\n \"navs.itmax.cn\",\n \"neoz.chat\",\n \"noad.keliyan.top\",\n \"node2.txq.life\",\n \"or.tianba.eu.org\",\n \"p.jackyu.cn\",\n \"privateghproxy.iil.im\",\n \"proxy.191027.xyz\",\n \"proxy.atoposs.com\",\n \"proxy.ccc8.vip\",\n \"proxy.dragontea.cc\",\n \"proxy.fakups.cn\",\n \"proxydl.lcayun.cn\",\n \"proxy-gh.1l1.icu\",\n \"q-github.cnxiaobai.com\",\n \"ql.l50.top\",\n \"raw.nmd.im\",\n \"rst.567812.xyz\",\n \"static.kaixinwu.vip\",\n \"static.yiwangmeng.com\",\n \"t.992699.xyz\",\n \"tpe.corpa.me\",\n \"tube.20140301.xyz\",\n \"vps.pansen626.com\",\n \"wfgithub.xiaonuomi.ie.eu.org\"});\n this.comboBox3.Location = new System.Drawing.Point(600, 19);\n this.comboBox3.Name = \"comboBox3\";\n this.comboBox3.Size = new System.Drawing.Size(170, 20);\n this.comboBox3.TabIndex = 21;\n this.comboBox3.Leave += new System.EventHandler(this.comboBox3_Leave);\n // \n // label10\n // \n this.label10.AutoSize = true;\n this.label10.Location = new System.Drawing.Point(505, 21);\n this.label10.Name = \"label10\";\n this.label10.Size = new System.Drawing.Size(89, 12);\n this.label10.TabIndex = 20;\n this.label10.Text = \"Github Proxy:\";\n // \n // comboBox2\n // \n this.comboBox2.FormattingEnabled = true;\n this.comboBox2.Items.AddRange(new object[] {\n \"https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases/download/v2.21.12/\" +\n \"Waifu2x-Extension-GUI-v2.21.12-Portable.7z\",\n \"https://github.com/2dust/v2rayN/releases/download/7.10.4/v2rayN-windows-64-deskto\" +\n \"p.zip\",\n \"https://github.com/VSCodium/vscodium/releases/download/1.98.0.25067/codium-1.98.0\" +\n \".25067-el9.aarch64.rpm\"});\n this.comboBox2.Location = new System.Drawing.Point(414, 45);\n this.comboBox2.Name = \"comboBox2\";\n this.comboBox2.Size = new System.Drawing.Size(275, 20);\n this.comboBox2.TabIndex = 19;\n this.comboBox2.Text = \"https://github.com/AaronFeng753/Waifu2x-Extension-GUI/releases/download/v2.21.12/\" +\n \"Waifu2x-Extension-GUI-v2.21.12-Portable.7z\";\n // \n // label9\n // \n this.label9.AutoSize = true;\n this.label9.Location = new System.Drawing.Point(344, 48);\n this.label9.Name = \"label9\";\n this.label9.Size = new System.Drawing.Size(65, 12);\n this.label9.TabIndex = 18;\n this.label9.Text = \"测速地址:\";\n // \n // progressBar1\n // \n this.progressBar1.Location = new System.Drawing.Point(13, 3);\n this.progressBar1.Name = \"progressBar1\";\n this.progressBar1.Size = new System.Drawing.Size(780, 3);\n this.progressBar1.TabIndex = 3;\n // \n // timer2\n // \n this.timer2.Interval = 2000;\n this.timer2.Tick += new System.EventHandler(this.timer2_Tick);\n // \n // groupBox4\n // \n this.groupBox4.Controls.Add(this.textBox4);\n this.groupBox4.Controls.Add(this.label13);\n this.groupBox4.Controls.Add(this.textBox3);\n this.groupBox4.Controls.Add(this.label12);\n this.groupBox4.Controls.Add(this.textBox2);\n this.groupBox4.Controls.Add(this.label11);\n this.groupBox4.Location = new System.Drawing.Point(13, 612);\n this.groupBox4.Name = \"groupBox4\";\n this.groupBox4.Size = new System.Drawing.Size(780, 51);\n this.groupBox4.TabIndex = 4;\n this.groupBox4.TabStop = false;\n this.groupBox4.Text = \"Gist 上传参数\";\n this.groupBox4.Visible = false;\n // \n // textBox4\n // \n this.textBox4.Location = new System.Drawing.Point(467, 18);\n this.textBox4.Name = \"textBox4\";\n this.textBox4.Size = new System.Drawing.Size(306, 21);\n this.textBox4.TabIndex = 5;\n // \n // label13\n // \n this.label13.AutoSize = true;\n this.label13.Location = new System.Drawing.Point(359, 21);\n this.label13.Name = \"label13\";\n this.label13.Size = new System.Drawing.Size(113, 12);\n this.label13.TabIndex = 4;\n this.label13.Text = \"API Mirror(可选):\";\n // \n // textBox3\n // \n this.textBox3.Location = new System.Drawing.Point(253, 18);\n this.textBox3.Name = \"textBox3\";\n this.textBox3.PasswordChar = '*';\n this.textBox3.Size = new System.Drawing.Size(100, 21);\n this.textBox3.TabIndex = 3;\n this.textBox3.Enter += new System.EventHandler(this.textBox3_Enter);\n this.textBox3.Leave += new System.EventHandler(this.textBox3_Leave);\n // \n // label12\n // \n this.label12.AutoSize = true;\n this.label12.Location = new System.Drawing.Point(168, 21);\n this.label12.Name = \"label12\";\n this.label12.Size = new System.Drawing.Size(89, 12);\n this.label12.TabIndex = 2;\n this.label12.Text = \"Github Token:\";\n // \n // textBox2\n // \n this.textBox2.Location = new System.Drawing.Point(62, 18);\n this.textBox2.Name = \"textBox2\";\n this.textBox2.Size = new System.Drawing.Size(100, 21);\n this.textBox2.TabIndex = 1;\n // \n // label11\n // \n this.label11.AutoSize = true;\n this.label11.Location = new System.Drawing.Point(7, 21);\n this.label11.Name = \"label11\";\n this.label11.Size = new System.Drawing.Size(59, 12);\n this.label11.TabIndex = 0;\n this.label11.Text = \"Gist ID:\";\n // \n // toolTip1\n // \n this.toolTip1.AutoPopDelay = 5000;\n this.toolTip1.InitialDelay = 500;\n this.toolTip1.ReshowDelay = 500;\n this.toolTip1.ShowAlways = true;\n // \n // groupBox5\n // \n this.groupBox5.Controls.Add(this.textBox6);\n this.groupBox5.Controls.Add(this.label15);\n this.groupBox5.Controls.Add(this.textBox7);\n this.groupBox5.Controls.Add(this.label16);\n this.groupBox5.Location = new System.Drawing.Point(13, 669);\n this.groupBox5.Name = \"groupBox5\";\n this.groupBox5.Size = new System.Drawing.Size(780, 51);\n this.groupBox5.TabIndex = 6;\n this.groupBox5.TabStop = false;\n this.groupBox5.Text = \"R2 上传参数\";\n this.groupBox5.Visible = false;\n // \n // textBox6\n // \n this.textBox6.Location = new System.Drawing.Point(467, 18);\n this.textBox6.Name = \"textBox6\";\n this.textBox6.PasswordChar = '*';\n this.textBox6.Size = new System.Drawing.Size(306, 21);\n this.textBox6.TabIndex = 3;\n this.textBox6.Text = \"1234567890\";\n this.textBox6.Enter += new System.EventHandler(this.textBox3_Enter);\n this.textBox6.Leave += new System.EventHandler(this.textBox3_Leave);\n // \n // label15\n // \n this.label15.AutoSize = true;\n this.label15.Location = new System.Drawing.Point(382, 21);\n this.label15.Name = \"label15\";\n this.label15.Size = new System.Drawing.Size(89, 12);\n this.label15.TabIndex = 2;\n this.label15.Text = \"Worker Token:\";\n // \n // textBox7\n // \n this.textBox7.Location = new System.Drawing.Point(88, 18);\n this.textBox7.Name = \"textBox7\";\n this.textBox7.Size = new System.Drawing.Size(285, 21);\n this.textBox7.TabIndex = 1;\n this.textBox7.Text = \"https://example.worker.dev\";\n this.textBox7.Leave += new System.EventHandler(this.textBox7_Leave);\n // \n // label16\n // \n this.label16.AutoSize = true;\n this.label16.Location = new System.Drawing.Point(7, 21);\n this.label16.Name = \"label16\";\n this.label16.Size = new System.Drawing.Size(77, 12);\n this.label16.TabIndex = 0;\n this.label16.Text = \"Worker URL:\";\n // \n // groupBox6\n // \n this.groupBox6.Controls.Add(this.textBox5);\n this.groupBox6.Controls.Add(this.label14);\n this.groupBox6.Controls.Add(this.textBox8);\n this.groupBox6.Controls.Add(this.label17);\n this.groupBox6.Controls.Add(this.textBox9);\n this.groupBox6.Controls.Add(this.label18);\n this.groupBox6.Location = new System.Drawing.Point(13, 726);\n this.groupBox6.Name = \"groupBox6\";\n this.groupBox6.Size = new System.Drawing.Size(780, 51);\n this.groupBox6.TabIndex = 6;\n this.groupBox6.TabStop = false;\n this.groupBox6.Text = \"Webdav 上传参数\";\n this.groupBox6.Visible = false;\n // \n // textBox5\n // \n this.textBox5.Location = new System.Drawing.Point(467, 18);\n this.textBox5.Name = \"textBox5\";\n this.textBox5.Size = new System.Drawing.Size(306, 21);\n this.textBox5.TabIndex = 5;\n this.textBox5.Text = \"https://example.com/dav/\";\n // \n // label14\n // \n this.label14.AutoSize = true;\n this.label14.Location = new System.Drawing.Point(382, 21);\n this.label14.Name = \"label14\";\n this.label14.Size = new System.Drawing.Size(77, 12);\n this.label14.TabIndex = 4;\n this.label14.Text = \"Webdav URL:\";\n // \n // textBox8\n // \n this.textBox8.Location = new System.Drawing.Point(257, 18);\n this.textBox8.Name = \"textBox8\";\n this.textBox8.PasswordChar = '*';\n this.textBox8.Size = new System.Drawing.Size(110, 21);\n this.textBox8.TabIndex = 3;\n this.textBox8.Text = \"admin\";\n this.textBox8.Enter += new System.EventHandler(this.textBox3_Enter);\n this.textBox8.Leave += new System.EventHandler(this.textBox3_Leave);\n // \n // label17\n // \n this.label17.AutoSize = true;\n this.label17.Location = new System.Drawing.Point(186, 21);\n this.label17.Name = \"label17\";\n this.label17.Size = new System.Drawing.Size(65, 12);\n this.label17.TabIndex = 2;\n this.label17.Text = \"Password:\";\n // \n // textBox9\n // \n this.textBox9.Location = new System.Drawing.Point(70, 18);\n this.textBox9.Name = \"textBox9\";\n this.textBox9.Size = new System.Drawing.Size(110, 21);\n this.textBox9.TabIndex = 1;\n this.textBox9.Text = \"admin\";\n // \n // label18\n // \n this.label18.AutoSize = true;\n this.label18.Location = new System.Drawing.Point(7, 21);\n this.label18.Name = \"label18\";\n this.label18.Size = new System.Drawing.Size(65, 12);\n this.label18.TabIndex = 0;\n this.label18.Text = \"Username:\";\n // \n // timer3\n // \n this.timer3.Interval = 86400000;\n this.timer3.Tick += new System.EventHandler(this.timer3_Tick);\n // \n // timer4\n // \n this.timer4.Interval = 1000;\n this.timer4.Tick += new System.EventHandler(this.timer4_Tick);\n // \n // Form1\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.AutoSize = true;\n this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\n this.ClientSize = new System.Drawing.Size(800, 784);\n this.Controls.Add(this.groupBox6);\n this.Controls.Add(this.groupBox5);\n this.Controls.Add(this.groupBox4);\n this.Controls.Add(this.groupBox3);\n this.Controls.Add(this.groupBox2);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.progressBar1);\n this.Icon = ((System.Drawing.Icon)(resources.GetObject(\"$this.Icon\")));\n this.MaximizeBox = false;\n this.Name = \"Form1\";\n this.Text = \"SubsCheck Win GUI\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown4)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown3)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown6)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown5)).EndInit();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown7)).EndInit();\n this.groupBox2.ResumeLayout(false);\n this.groupBox2.PerformLayout();\n this.groupBox3.ResumeLayout(false);\n this.groupBox3.PerformLayout();\n ((System.ComponentModel.ISupportInitialize)(this.numericUpDown8)).EndInit();\n this.groupBox4.ResumeLayout(false);\n this.groupBox4.PerformLayout();\n this.groupBox5.ResumeLayout(false);\n this.groupBox5.PerformLayout();\n this.groupBox6.ResumeLayout(false);\n this.groupBox6.PerformLayout();\n this.ResumeLayout(false);\n\n }\n\n #endregion\n\n private System.Windows.Forms.NotifyIcon notifyIcon1;\n private System.Windows.Forms.Timer timer1;\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.GroupBox groupBox2;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.GroupBox groupBox3;\n private System.Windows.Forms.Label label8;\n private System.Windows.Forms.Label label7;\n private System.Windows.Forms.Label label4;\n private System.Windows.Forms.Label label5;\n private System.Windows.Forms.Label label6;\n private System.Windows.Forms.Label label3;\n private System.Windows.Forms.Label label2;\n private System.Windows.Forms.Label label1;\n private System.Windows.Forms.NumericUpDown numericUpDown6;\n private System.Windows.Forms.NumericUpDown numericUpDown5;\n private System.Windows.Forms.NumericUpDown numericUpDown4;\n private System.Windows.Forms.NumericUpDown numericUpDown3;\n private System.Windows.Forms.NumericUpDown numericUpDown2;\n private System.Windows.Forms.NumericUpDown numericUpDown1;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.ComboBox comboBox1;\n private System.Windows.Forms.ComboBox comboBox2;\n private System.Windows.Forms.Label label9;\n private System.Windows.Forms.ComboBox comboBox3;\n private System.Windows.Forms.Label label10;\n private System.Windows.Forms.CheckBox checkBox1;\n private System.Windows.Forms.RichTextBox richTextBox1;\n private System.Windows.Forms.ProgressBar progressBar1;\n private System.Windows.Forms.Button button3;\n private System.Windows.Forms.Timer timer2;\n private System.Windows.Forms.GroupBox groupBox4;\n private System.Windows.Forms.TextBox textBox4;\n private System.Windows.Forms.Label label13;\n private System.Windows.Forms.TextBox textBox3;\n private System.Windows.Forms.Label label12;\n private System.Windows.Forms.TextBox textBox2;\n private System.Windows.Forms.Label label11;\n private System.Windows.Forms.ToolTip toolTip1;\n private System.Windows.Forms.GroupBox groupBox5;\n private System.Windows.Forms.TextBox textBox6;\n private System.Windows.Forms.Label label15;\n private System.Windows.Forms.TextBox textBox7;\n private System.Windows.Forms.Label label16;\n private System.Windows.Forms.GroupBox groupBox6;\n private System.Windows.Forms.TextBox textBox5;\n private System.Windows.Forms.Label label14;\n private System.Windows.Forms.TextBox textBox8;\n private System.Windows.Forms.Label label17;\n private System.Windows.Forms.TextBox textBox9;\n private System.Windows.Forms.Label label18;\n private System.Windows.Forms.Button button5;\n private System.Windows.Forms.ComboBox comboBox4;\n private System.Windows.Forms.NumericUpDown numericUpDown7;\n private System.Windows.Forms.Label label20;\n private System.Windows.Forms.Label label19;\n private System.Windows.Forms.ComboBox comboBox5;\n private System.Windows.Forms.CheckBox checkBox2;\n private System.Windows.Forms.Timer timer3;\n private System.Windows.Forms.Button button4;\n private System.Windows.Forms.NumericUpDown numericUpDown8;\n private System.Windows.Forms.CheckBox checkBox3;\n private System.Windows.Forms.TextBox textBox10;\n private System.Windows.Forms.CheckBox checkBox4;\n private System.Windows.Forms.Button button6;\n private System.Windows.Forms.Timer timer4;\n private System.Windows.Forms.Button button7;\n private System.Windows.Forms.TextBox textBox11;\n private System.Windows.Forms.LinkLabel linkLabel1;\n private System.Windows.Forms.Button button8;\n private System.Windows.Forms.CheckBox checkBox5;\n }\n}\n\n"], ["/SubsCheck-Win-GUI/about.Designer.cs", "namespace subs_check.win.gui\n{\n partial class about\n {\n /// \n /// Required designer variable.\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// Clean up any resources being used.\n /// \n /// true if managed resources should be disposed; otherwise, false.\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows Form Designer generated code\n\n /// \n /// Required method for Designer support - do not modify\n /// the contents of this method with the code editor.\n /// \n private void InitializeComponent()\n {\n System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(about));\n this.button1 = new System.Windows.Forms.Button();\n this.label1 = new System.Windows.Forms.Label();\n this.label2 = new System.Windows.Forms.Label();\n this.label3 = new System.Windows.Forms.Label();\n this.label5 = new System.Windows.Forms.Label();\n this.linkLabel1 = new System.Windows.Forms.LinkLabel();\n this.label6 = new System.Windows.Forms.Label();\n this.label7 = new System.Windows.Forms.Label();\n this.linkLabel2 = new System.Windows.Forms.LinkLabel();\n this.label8 = new System.Windows.Forms.Label();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.label13 = new System.Windows.Forms.Label();\n this.linkLabel4 = new System.Windows.Forms.LinkLabel();\n this.label12 = new System.Windows.Forms.Label();\n this.linkLabel3 = new System.Windows.Forms.LinkLabel();\n this.label11 = new System.Windows.Forms.Label();\n this.label10 = new System.Windows.Forms.Label();\n this.label9 = new System.Windows.Forms.Label();\n this.groupBox2 = new System.Windows.Forms.GroupBox();\n this.label14 = new System.Windows.Forms.Label();\n this.groupBox3 = new System.Windows.Forms.GroupBox();\n this.label15 = new System.Windows.Forms.Label();\n this.linkLabel8 = new System.Windows.Forms.LinkLabel();\n this.linkLabel6 = new System.Windows.Forms.LinkLabel();\n this.linkLabel5 = new System.Windows.Forms.LinkLabel();\n this.groupBox4 = new System.Windows.Forms.GroupBox();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.label4 = new System.Windows.Forms.Label();\n this.groupBox1.SuspendLayout();\n this.groupBox2.SuspendLayout();\n this.groupBox3.SuspendLayout();\n this.groupBox4.SuspendLayout();\n this.SuspendLayout();\n // \n // button1\n // \n this.button1.Location = new System.Drawing.Point(513, 619);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"确定\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // label1\n // \n this.label1.AutoSize = true;\n this.label1.Font = new System.Drawing.Font(\"微软雅黑\", 24.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.label1.Location = new System.Drawing.Point(10, 9);\n this.label1.Name = \"label1\";\n this.label1.Size = new System.Drawing.Size(354, 44);\n this.label1.TabIndex = 1;\n this.label1.Text = \"SubsCheck-Win-GUI\";\n // \n // label2\n // \n this.label2.AutoSize = true;\n this.label2.Location = new System.Drawing.Point(113, 19);\n this.label2.Name = \"label2\";\n this.label2.Size = new System.Drawing.Size(53, 12);\n this.label2.TabIndex = 2;\n this.label2.Text = \"未知版本\";\n // \n // label3\n // \n this.label3.AutoSize = true;\n this.label3.Location = new System.Drawing.Point(113, 119);\n this.label3.Name = \"label3\";\n this.label3.Size = new System.Drawing.Size(53, 12);\n this.label3.TabIndex = 3;\n this.label3.Text = \"未知版本\";\n // \n // label5\n // \n this.label5.AutoSize = true;\n this.label5.Location = new System.Drawing.Point(18, 119);\n this.label5.Name = \"label5\";\n this.label5.Size = new System.Drawing.Size(65, 12);\n this.label5.TabIndex = 5;\n this.label5.Text = \"内核版本:\";\n // \n // linkLabel1\n // \n this.linkLabel1.AutoSize = true;\n this.linkLabel1.Location = new System.Drawing.Point(113, 39);\n this.linkLabel1.Name = \"linkLabel1\";\n this.linkLabel1.Size = new System.Drawing.Size(257, 12);\n this.linkLabel1.TabIndex = 6;\n this.linkLabel1.TabStop = true;\n this.linkLabel1.Text = \"https://github.com/cmliu/SubsCheck-Win-GUI\";\n this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);\n // \n // label6\n // \n this.label6.AutoSize = true;\n this.label6.Location = new System.Drawing.Point(18, 139);\n this.label6.Name = \"label6\";\n this.label6.Size = new System.Drawing.Size(89, 12);\n this.label6.TabIndex = 8;\n this.label6.Text = \"内核项目地址:\";\n // \n // label7\n // \n this.label7.AutoSize = true;\n this.label7.Location = new System.Drawing.Point(18, 39);\n this.label7.Name = \"label7\";\n this.label7.Size = new System.Drawing.Size(65, 12);\n this.label7.TabIndex = 7;\n this.label7.Text = \"项目地址:\";\n // \n // linkLabel2\n // \n this.linkLabel2.AutoSize = true;\n this.linkLabel2.Location = new System.Drawing.Point(113, 139);\n this.linkLabel2.Name = \"linkLabel2\";\n this.linkLabel2.Size = new System.Drawing.Size(221, 12);\n this.linkLabel2.TabIndex = 9;\n this.linkLabel2.TabStop = true;\n this.linkLabel2.Text = \"https://github.com/beck-8/subs-check\";\n this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked);\n // \n // label8\n // \n this.label8.AutoSize = true;\n this.label8.Location = new System.Drawing.Point(18, 159);\n this.label8.Name = \"label8\";\n this.label8.Size = new System.Drawing.Size(317, 12);\n this.label8.TabIndex = 10;\n this.label8.Text = \"基于.NET Framework 4.7.2 开发 开源协议:MIT License\";\n // \n // groupBox1\n // \n this.groupBox1.Controls.Add(this.label4);\n this.groupBox1.Controls.Add(this.label13);\n this.groupBox1.Controls.Add(this.linkLabel4);\n this.groupBox1.Controls.Add(this.label12);\n this.groupBox1.Controls.Add(this.linkLabel3);\n this.groupBox1.Controls.Add(this.label11);\n this.groupBox1.Controls.Add(this.label10);\n this.groupBox1.Controls.Add(this.label9);\n this.groupBox1.Controls.Add(this.label8);\n this.groupBox1.Controls.Add(this.label2);\n this.groupBox1.Controls.Add(this.linkLabel2);\n this.groupBox1.Controls.Add(this.label3);\n this.groupBox1.Controls.Add(this.label6);\n this.groupBox1.Controls.Add(this.label5);\n this.groupBox1.Controls.Add(this.label7);\n this.groupBox1.Controls.Add(this.linkLabel1);\n this.groupBox1.Location = new System.Drawing.Point(12, 105);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(576, 183);\n this.groupBox1.TabIndex = 11;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"基本信息:\";\n // \n // label13\n // \n this.label13.AutoSize = true;\n this.label13.Location = new System.Drawing.Point(113, 59);\n this.label13.Name = \"label13\";\n this.label13.Size = new System.Drawing.Size(215, 12);\n this.label13.TabIndex = 17;\n this.label13.Text = \"CM 就是这么简单!就是这么方便!!!\";\n // \n // linkLabel4\n // \n this.linkLabel4.AutoSize = true;\n this.linkLabel4.Location = new System.Drawing.Point(113, 79);\n this.linkLabel4.Name = \"linkLabel4\";\n this.linkLabel4.Size = new System.Drawing.Size(47, 12);\n this.linkLabel4.TabIndex = 16;\n this.linkLabel4.TabStop = true;\n this.linkLabel4.Text = \"Youtube\";\n this.linkLabel4.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel4_LinkClicked);\n // \n // label12\n // \n this.label12.AutoSize = true;\n this.label12.Location = new System.Drawing.Point(18, 79);\n this.label12.Name = \"label12\";\n this.label12.Size = new System.Drawing.Size(65, 12);\n this.label12.TabIndex = 15;\n this.label12.Text = \"视频教程:\";\n // \n // linkLabel3\n // \n this.linkLabel3.AutoSize = true;\n this.linkLabel3.Location = new System.Drawing.Point(113, 99);\n this.linkLabel3.Name = \"linkLabel3\";\n this.linkLabel3.Size = new System.Drawing.Size(89, 12);\n this.linkLabel3.TabIndex = 14;\n this.linkLabel3.TabStop = true;\n this.linkLabel3.Text = \"Telegram交流群\";\n this.linkLabel3.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel3_LinkClicked);\n // \n // label11\n // \n this.label11.AutoSize = true;\n this.label11.Location = new System.Drawing.Point(18, 99);\n this.label11.Name = \"label11\";\n this.label11.Size = new System.Drawing.Size(65, 12);\n this.label11.TabIndex = 13;\n this.label11.Text = \"联系方式:\";\n // \n // label10\n // \n this.label10.AutoSize = true;\n this.label10.Location = new System.Drawing.Point(18, 59);\n this.label10.Name = \"label10\";\n this.label10.Size = new System.Drawing.Size(53, 12);\n this.label10.TabIndex = 12;\n this.label10.Text = \"开发者:\";\n // \n // label9\n // \n this.label9.AutoSize = true;\n this.label9.Location = new System.Drawing.Point(18, 19);\n this.label9.Name = \"label9\";\n this.label9.Size = new System.Drawing.Size(65, 12);\n this.label9.TabIndex = 11;\n this.label9.Text = \"当前版本:\";\n // \n // groupBox2\n // \n this.groupBox2.Controls.Add(this.label14);\n this.groupBox2.Location = new System.Drawing.Point(12, 58);\n this.groupBox2.Name = \"groupBox2\";\n this.groupBox2.Size = new System.Drawing.Size(576, 41);\n this.groupBox2.TabIndex = 12;\n this.groupBox2.TabStop = false;\n this.groupBox2.Text = \"软件简介:\";\n // \n // label14\n // \n this.label14.AutoSize = true;\n this.label14.Location = new System.Drawing.Point(18, 19);\n this.label14.Name = \"label14\";\n this.label14.Size = new System.Drawing.Size(365, 12);\n this.label14.TabIndex = 0;\n this.label14.Text = \"节点测速与订阅管理工具,可帮助用户测试、筛选和管理网络节点。\";\n // \n // groupBox3\n // \n this.groupBox3.Controls.Add(this.label15);\n this.groupBox3.Controls.Add(this.linkLabel8);\n this.groupBox3.Controls.Add(this.linkLabel6);\n this.groupBox3.Controls.Add(this.linkLabel5);\n this.groupBox3.Location = new System.Drawing.Point(12, 294);\n this.groupBox3.Name = \"groupBox3\";\n this.groupBox3.Size = new System.Drawing.Size(576, 43);\n this.groupBox3.TabIndex = 13;\n this.groupBox3.TabStop = false;\n this.groupBox3.Text = \"诚挚感谢下列开源项目及其维护者为软件开发提供的支持(排名不分先后,未能及时列出也会心存感激)\";\n // \n // label15\n // \n this.label15.AutoSize = true;\n this.label15.Location = new System.Drawing.Point(201, 19);\n this.label15.Name = \"label15\";\n this.label15.Size = new System.Drawing.Size(65, 12);\n this.label15.TabIndex = 19;\n this.label15.Text = \"ChatGPT 等\";\n // \n // linkLabel8\n // \n this.linkLabel8.AutoSize = true;\n this.linkLabel8.Location = new System.Drawing.Point(136, 19);\n this.linkLabel8.Name = \"linkLabel8\";\n this.linkLabel8.Size = new System.Drawing.Size(59, 12);\n this.linkLabel8.TabIndex = 20;\n this.linkLabel8.TabStop = true;\n this.linkLabel8.Text = \"Sub-Store\";\n this.linkLabel8.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel8_LinkClicked);\n // \n // linkLabel6\n // \n this.linkLabel6.AutoSize = true;\n this.linkLabel6.Location = new System.Drawing.Point(65, 19);\n this.linkLabel6.Name = \"linkLabel6\";\n this.linkLabel6.Size = new System.Drawing.Size(65, 12);\n this.linkLabel6.TabIndex = 19;\n this.linkLabel6.TabStop = true;\n this.linkLabel6.Text = \"bestruirui\";\n this.linkLabel6.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel6_LinkClicked);\n // \n // linkLabel5\n // \n this.linkLabel5.AutoSize = true;\n this.linkLabel5.Location = new System.Drawing.Point(18, 19);\n this.linkLabel5.Name = \"linkLabel5\";\n this.linkLabel5.Size = new System.Drawing.Size(41, 12);\n this.linkLabel5.TabIndex = 18;\n this.linkLabel5.TabStop = true;\n this.linkLabel5.Text = \"beck-8\";\n this.linkLabel5.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel5_LinkClicked);\n // \n // groupBox4\n // \n this.groupBox4.Controls.Add(this.textBox1);\n this.groupBox4.Location = new System.Drawing.Point(12, 343);\n this.groupBox4.Name = \"groupBox4\";\n this.groupBox4.Size = new System.Drawing.Size(576, 270);\n this.groupBox4.TabIndex = 14;\n this.groupBox4.TabStop = false;\n this.groupBox4.Text = \"使用条款 与 免责声明\";\n // \n // textBox1\n // \n this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;\n this.textBox1.Location = new System.Drawing.Point(6, 20);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ReadOnly = true;\n this.textBox1.Size = new System.Drawing.Size(564, 244);\n this.textBox1.TabIndex = 0;\n this.textBox1.Text = resources.GetString(\"textBox1.Text\");\n // \n // label4\n // \n this.label4.AutoSize = true;\n this.label4.Location = new System.Drawing.Point(166, 79);\n this.label4.Name = \"label4\";\n this.label4.Size = new System.Drawing.Size(390, 12);\n this.label4.TabIndex = 18;\n this.label4.Text = \"公益项目!请给我一个免费的点赞和订阅!ヾ(≧∇≦*)ゝ万分感谢!!!\";\n // \n // about\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.AutoSize = true;\n this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\n this.ClientSize = new System.Drawing.Size(598, 651);\n this.Controls.Add(this.groupBox4);\n this.Controls.Add(this.button1);\n this.Controls.Add(this.groupBox3);\n this.Controls.Add(this.groupBox2);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.label1);\n this.MaximizeBox = false;\n this.MinimizeBox = false;\n this.Name = \"about\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"关于 SubsCheck Win GUI\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.groupBox2.ResumeLayout(false);\n this.groupBox2.PerformLayout();\n this.groupBox3.ResumeLayout(false);\n this.groupBox3.PerformLayout();\n this.groupBox4.ResumeLayout(false);\n this.groupBox4.PerformLayout();\n this.ResumeLayout(false);\n this.PerformLayout();\n\n }\n\n #endregion\n\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.Label label1;\n private System.Windows.Forms.Label label2;\n private System.Windows.Forms.Label label3;\n private System.Windows.Forms.Label label5;\n private System.Windows.Forms.LinkLabel linkLabel1;\n private System.Windows.Forms.Label label6;\n private System.Windows.Forms.Label label7;\n private System.Windows.Forms.LinkLabel linkLabel2;\n private System.Windows.Forms.Label label8;\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.LinkLabel linkLabel3;\n private System.Windows.Forms.Label label11;\n private System.Windows.Forms.Label label10;\n private System.Windows.Forms.Label label9;\n private System.Windows.Forms.LinkLabel linkLabel4;\n private System.Windows.Forms.Label label12;\n private System.Windows.Forms.Label label13;\n private System.Windows.Forms.GroupBox groupBox2;\n private System.Windows.Forms.Label label14;\n private System.Windows.Forms.GroupBox groupBox3;\n private System.Windows.Forms.LinkLabel linkLabel6;\n private System.Windows.Forms.LinkLabel linkLabel5;\n private System.Windows.Forms.Label label15;\n private System.Windows.Forms.LinkLabel linkLabel8;\n private System.Windows.Forms.GroupBox groupBox4;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.Label label4;\n }\n}"], ["/SubsCheck-Win-GUI/MoreYAML.Designer.cs", "namespace subs_check.win.gui\n{\n partial class MoreYAML\n {\n /// \n /// Required designer variable.\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// Clean up any resources being used.\n /// \n /// true if managed resources should be disposed; otherwise, false.\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows Form Designer generated code\n\n /// \n /// Required method for Designer support - do not modify\n /// the contents of this method with the code editor.\n /// \n private void InitializeComponent()\n {\n System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MoreYAML));\n this.button1 = new System.Windows.Forms.Button();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.button2 = new System.Windows.Forms.Button();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.linkLabel1 = new System.Windows.Forms.LinkLabel();\n this.button3 = new System.Windows.Forms.Button();\n this.groupBox1.SuspendLayout();\n this.SuspendLayout();\n // \n // button1\n // \n this.button1.Font = new System.Drawing.Font(\"宋体\", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.button1.Location = new System.Drawing.Point(12, 415);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"保存\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // groupBox1\n // \n this.groupBox1.Controls.Add(this.linkLabel1);\n this.groupBox1.Controls.Add(this.textBox1);\n this.groupBox1.Location = new System.Drawing.Point(12, 12);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(776, 397);\n this.groupBox1.TabIndex = 1;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"YAML\";\n // \n // button2\n // \n this.button2.Location = new System.Drawing.Point(713, 415);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"返回\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n // \n // textBox1\n // \n this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n this.textBox1.Font = new System.Drawing.Font(\"微软雅黑\", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.textBox1.Location = new System.Drawing.Point(6, 13);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;\n this.textBox1.Size = new System.Drawing.Size(764, 378);\n this.textBox1.TabIndex = 0;\n this.textBox1.Text = resources.GetString(\"textBox1.Text\");\n this.textBox1.UseWaitCursor = true;\n // \n // linkLabel1\n // \n this.linkLabel1.AutoSize = true;\n this.linkLabel1.Location = new System.Drawing.Point(585, 0);\n this.linkLabel1.Name = \"linkLabel1\";\n this.linkLabel1.Size = new System.Drawing.Size(191, 12);\n this.linkLabel1.TabIndex = 1;\n this.linkLabel1.TabStop = true;\n this.linkLabel1.Text = \"更多请参考 config.yaml 参数文档\";\n this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);\n // \n // button3\n // \n this.button3.Location = new System.Drawing.Point(93, 415);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 3;\n this.button3.Text = \"重置\";\n this.button3.UseVisualStyleBackColor = true;\n this.button3.Click += new System.EventHandler(this.button3_Click);\n // \n // MoreYAML\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.ClientSize = new System.Drawing.Size(800, 450);\n this.Controls.Add(this.button3);\n this.Controls.Add(this.button2);\n this.Controls.Add(this.groupBox1);\n this.Controls.Add(this.button1);\n this.MaximizeBox = false;\n this.MinimizeBox = false;\n this.Name = \"MoreYAML\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"编辑 补充参数\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.ResumeLayout(false);\n\n }\n\n #endregion\n\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.LinkLabel linkLabel1;\n private System.Windows.Forms.Button button3;\n }\n}"], ["/SubsCheck-Win-GUI/EditURLs.Designer.cs", "namespace subs_check.win.gui\n{\n partial class EditURLs\n {\n /// \n /// Required designer variable.\n /// \n private System.ComponentModel.IContainer components = null;\n\n /// \n /// Clean up any resources being used.\n /// \n /// true if managed resources should be disposed; otherwise, false.\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n #region Windows Form Designer generated code\n\n /// \n /// Required method for Designer support - do not modify\n /// the contents of this method with the code editor.\n /// \n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n this.button1 = new System.Windows.Forms.Button();\n this.textBox1 = new System.Windows.Forms.TextBox();\n this.button2 = new System.Windows.Forms.Button();\n this.button3 = new System.Windows.Forms.Button();\n this.button4 = new System.Windows.Forms.Button();\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.SuspendLayout();\n // \n // button1\n // \n this.button1.Font = new System.Drawing.Font(\"宋体\", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));\n this.button1.Location = new System.Drawing.Point(12, 415);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.TabIndex = 0;\n this.button1.Text = \"保存\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n // \n // textBox1\n // \n this.textBox1.Location = new System.Drawing.Point(12, 12);\n this.textBox1.Multiline = true;\n this.textBox1.Name = \"textBox1\";\n this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Both;\n this.textBox1.Size = new System.Drawing.Size(776, 397);\n this.textBox1.TabIndex = 1;\n // \n // button2\n // \n this.button2.Enabled = false;\n this.button2.Location = new System.Drawing.Point(174, 415);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"等待获取\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n // \n // button3\n // \n this.button3.Location = new System.Drawing.Point(93, 415);\n this.button3.Name = \"button3\";\n this.button3.Size = new System.Drawing.Size(75, 23);\n this.button3.TabIndex = 3;\n this.button3.Text = \"去重\";\n this.button3.UseVisualStyleBackColor = true;\n this.button3.Click += new System.EventHandler(this.button3_Click);\n // \n // button4\n // \n this.button4.Location = new System.Drawing.Point(713, 415);\n this.button4.Name = \"button4\";\n this.button4.Size = new System.Drawing.Size(75, 23);\n this.button4.TabIndex = 4;\n this.button4.Text = \"返回\";\n this.button4.UseVisualStyleBackColor = true;\n this.button4.Click += new System.EventHandler(this.button4_Click);\n // \n // timer1\n // \n this.timer1.Tick += new System.EventHandler(this.timer1_Tick);\n // \n // comboBox1\n // \n this.comboBox1.FormattingEnabled = true;\n this.comboBox1.Location = new System.Drawing.Point(255, 418);\n this.comboBox1.Name = \"comboBox1\";\n this.comboBox1.Size = new System.Drawing.Size(120, 20);\n this.comboBox1.TabIndex = 22;\n this.comboBox1.Visible = false;\n // \n // EditURLs\n // \n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.ClientSize = new System.Drawing.Size(800, 450);\n this.Controls.Add(this.comboBox1);\n this.Controls.Add(this.button4);\n this.Controls.Add(this.button3);\n this.Controls.Add(this.button2);\n this.Controls.Add(this.textBox1);\n this.Controls.Add(this.button1);\n this.MinimizeBox = false;\n this.Name = \"EditURLs\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"编辑 节点池订阅链接\";\n this.ResumeLayout(false);\n this.PerformLayout();\n\n }\n\n #endregion\n\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.TextBox textBox1;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.Button button3;\n private System.Windows.Forms.Button button4;\n private System.Windows.Forms.Timer timer1;\n private System.Windows.Forms.ComboBox comboBox1;\n }\n}"], ["/SubsCheck-Win-GUI/Form1.cs", "using Newtonsoft.Json.Linq;\nusing System;\nusing System.Collections.Generic;\nusing System.Data;\nusing System.Diagnostics;\nusing System.Drawing;\nusing System.IO;\nusing System.IO.Compression;\nusing System.Linq;\nusing System.Net.Http;\nusing System.Net.NetworkInformation;\nusing System.Runtime.InteropServices;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\n\nnamespace subs_check.win.gui\n{\n public partial class Form1: Form\n {\n //string 版本号;\n string 标题;\n private Process subsCheckProcess = null;\n string nodeInfo;//进度\n private Icon originalNotifyIcon; // 保存原始图标\n private ToolStripMenuItem startMenuItem;\n private ToolStripMenuItem stopMenuItem;\n string githubProxyURL = \"\";\n int run = 0;\n string 当前subsCheck版本号 = \"未知版本\";\n string 当前GUI版本号 = \"未知版本\";\n string 最新GUI版本号 = \"未知版本\";\n private string nextCheckTime = null;// 用于存储下次检查时间\n string WebUIapiKey = \"CMLiussss\";\n int downloading = 0;\n public Form1()\n {\n InitializeComponent();\n originalNotifyIcon = notifyIcon1.Icon;\n\n toolTip1.SetToolTip(numericUpDown1, \"并发线程数:推荐 宽带峰值/50M。\");\n toolTip1.SetToolTip(numericUpDown2, \"检查间隔时间(分钟):放置后台的时候,下次自动测速的间隔时间。\\n\\n 双击切换 使用「cron表达式」\");\n toolTip1.SetToolTip(label2, \"检查间隔时间(分钟):放置后台的时候,下次自动测速的间隔时间。\\n\\n 双击切换 使用「cron表达式」\");\n\n toolTip1.SetToolTip(numericUpDown3, \"超时时间(毫秒):节点的最大延迟。\");\n toolTip1.SetToolTip(numericUpDown4, \"最低测速结果舍弃(KB/s)。\");\n toolTip1.SetToolTip(numericUpDown5, \"下载测试时间(s):与下载链接大小相关,默认最大测试10s。\");\n toolTip1.SetToolTip(numericUpDown6, \"本地监听端口:用于直接返回测速结果的节点信息,方便 Sub-Store 实现订阅转换。\");\n toolTip1.SetToolTip(numericUpDown7, \"Sub-Store监听端口:用于订阅订阅转换。\\n注意:除非你知道你在干什么,否则不要将你的 Sub-Store 暴露到公网,否则可能会被滥用\");\n toolTip1.SetToolTip(textBox1, \"节点池订阅地址:支持 Link、Base64、Clash 格式的订阅链接。\");\n toolTip1.SetToolTip(checkBox1, \"以节点IP查询位置重命名节点。\\n质量差的节点可能造成IP查询失败,造成整体检查速度稍微变慢。\");\n toolTip1.SetToolTip(checkBox2, \"是否开启流媒体检测,其中IP欺诈依赖'节点地址查询',内核版本需要 v2.0.8 以上\\n\\n示例:美国1 | ⬇️ 5.6MB/s |0%|Netflix|Disney|Openai\\n风控值:0% (使用ping0.cc标准)\\n流媒体解锁:Netflix、Disney、Openai\");\n toolTip1.SetToolTip(comboBox3, \"GitHub 代理:代理订阅 GitHub raw 节点池。\");\n toolTip1.SetToolTip(comboBox2, \"测速地址:注意 并发数*节点速度<最大网速 否则测速结果不准确\\n尽量不要使用Speedtest,Cloudflare提供的下载链接,因为很多节点屏蔽测速网站。\");\n toolTip1.SetToolTip(textBox7, \"将测速结果推送到Worker的地址。\");\n toolTip1.SetToolTip(textBox6, \"Worker令牌。\");\n toolTip1.SetToolTip(comboBox1, \"测速结果的保存方法。\");\n toolTip1.SetToolTip(textBox2, \"Gist ID:注意!非Github用户名!\");\n toolTip1.SetToolTip(textBox3, \"Github TOKEN\");\n \n toolTip1.SetToolTip(comboBox4, \"通用订阅:内置了Sub-Store程序,自适应订阅格式。\\nClash订阅:带规则的 Mihomo、Clash 订阅格式。\");\n toolTip1.SetToolTip(comboBox5, \"生成带规则的 Clash 订阅所需的覆写规则文件\");\n\n toolTip1.SetToolTip(checkBox3, \"保存几个成功的节点,不选代表不限制,内核版本需要 v2.1.0 以上\\n如果你的并发数量超过这个参数,那么成功的结果可能会大于这个数值\");\n toolTip1.SetToolTip(numericUpDown8, \"保存几个成功的节点,不选代表不限制,内核版本需要 v2.1.0 以上\\n如果你的并发数量超过这个参数,那么成功的结果可能会大于这个数值\");\n\n toolTip1.SetToolTip(textBox11, \"支持标准cron表达式,如:\\n 0 */2 * * * 表示每2小时的整点执行\\n 0 0 */2 * * 表示每2天的0点执行\\n 0 0 1 * * 表示每月1日0点执行\\n */30 * * * * 表示每30分钟执行一次\\n\\n 双击切换 使用「分钟倒计时」\");\n\n toolTip1.SetToolTip(checkBox5, \"开机启动:勾选后,程序将在Windows启动时自动运行\");\n // 设置通知图标的上下文菜单\n SetupNotifyIconContextMenu();\n }\n\n private void SetupNotifyIconContextMenu()\n {\n // 创建上下文菜单\n ContextMenuStrip contextMenu = new ContextMenuStrip();\n\n // 创建\"▶️ 启动\"菜单项\n startMenuItem = new ToolStripMenuItem(\"启动\");\n startMenuItem.Click += (sender, e) =>\n {\n if (button1.Text == \"▶️ 启动\")\n {\n button1_Click(sender, e);\n }\n };\n\n // 创建\"⏹️ 停止\"菜单项\n stopMenuItem = new ToolStripMenuItem(\"停止\");\n stopMenuItem.Click += (sender, e) =>\n {\n if (button1.Text == \"⏹️ 停止\")\n {\n button1_Click(sender, e);\n }\n };\n stopMenuItem.Enabled = false; // 初始状态下禁用\n\n // 创建\"退出\"菜单项\n ToolStripMenuItem exitMenuItem = new ToolStripMenuItem(\"退出\");\n exitMenuItem.Click += async (sender, e) =>\n {\n try\n {\n // 如果程序正在运行,先停止它\n if (subsCheckProcess != null && !subsCheckProcess.HasExited)\n {\n await KillNodeProcessAsync();\n StopSubsCheckProcess();\n }\n\n // 确保通知图标被移除\n notifyIcon1.Visible = false;\n\n // 使用更直接的退出方式\n Environment.Exit(0);\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"退出程序时发生错误: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n\n // 如果仍然失败,尝试强制退出\n System.Diagnostics.Process.GetCurrentProcess().Kill();\n }\n };\n\n // 将菜单项添加到上下文菜单\n contextMenu.Items.Add(startMenuItem);\n contextMenu.Items.Add(stopMenuItem);\n contextMenu.Items.Add(new ToolStripSeparator()); // 分隔线\n contextMenu.Items.Add(exitMenuItem);\n\n // 将上下文菜单分配给通知图标\n notifyIcon1.ContextMenuStrip = contextMenu;\n\n // 确保通知图标可见\n notifyIcon1.Visible = true;\n }\n\n protected override void OnFormClosing(FormClosingEventArgs e)\n {\n if (e.CloseReason == CloseReason.UserClosing)\n {\n // 取消关闭操作\n e.Cancel = true;\n // 调用隐藏窗口方法\n 隐藏窗口();\n }\n }\n\n private async void timer1_Tick(object sender, EventArgs e)//初始化\n {\n timer1.Enabled = false;\n if (button2.Text == \"高级设置∧\") button2_Click(sender, e);\n // 检查并创建config文件夹\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string configFolderPath = System.IO.Path.Combine(executablePath, \"config\");\n if (!System.IO.Directory.Exists(configFolderPath))\n {\n // 文件不存在,可以给用户反馈\n string 免责声明 = \"SubsCheck-Win-GUI 项目仅供教育、研究和安全测试目的而设计和开发。本项目旨在为安全研究人员、学术界人士及技术爱好者提供一个探索和实践网络通信技术的工具。\\r\\n在下载和使用本项目代码时,使用者必须严格遵守其所适用的法律和规定。使用者有责任确保其行为符合所在地区的法律框架、规章制度及其他相关规定。\\r\\n\\r\\n使用条款\\r\\n\\r\\n教育与研究用途:本软件仅可用于网络技术和编程领域的学习、研究和安全测试。\\r\\n禁止非法使用:严禁将 SubsCheck-Win-GUI 用于任何非法活动或违反使用者所在地区法律法规的行为。\\r\\n使用时限:基于学习和研究目的,建议用户在完成研究或学习后,或在安装后的24小时内,删除本软件及所有相关文件。\\r\\n免责声明:SubsCheck-Win-GUI 的创建者和贡献者不对因使用或滥用本软件而导致的任何损害或法律问题负责。\\r\\n用户责任:用户对使用本软件的方式以及由此产生的任何后果完全负责。\\r\\n无技术支持:本软件的创建者不提供任何技术支持或使用协助。\\r\\n知情同意:使用 SubsCheck-Win-GUI 即表示您已阅读并理解本免责声明,并同意受其条款的约束。\\r\\n\\r\\n请记住:本软件的主要目的是促进学习、研究和安全测试。创作者不支持或认可任何其他用途。使用者应当在合法和负责任的前提下使用本工具。\\r\\n\\r\\n同意以上条款请点击\\\"是 / Yes\\\",否则程序将退出。\";\n\n // 显示带有 \"同意\" 和 \"拒绝\" 选项的对话框\n DialogResult result = MessageBox.Show(免责声明, \"SubsCheck-Win-GUI 免责声明\", MessageBoxButtons.YesNo, MessageBoxIcon.Question);\n\n // 如果用户点击 \"拒绝\" (对应于 No 按钮)\n if (result == DialogResult.No)\n {\n // 退出程序\n Environment.Exit(0); // 立即退出程序\n }\n System.IO.Directory.CreateDirectory(configFolderPath);\n }\n\n FileVersionInfo myFileVersionInfo = FileVersionInfo.GetVersionInfo(System.Reflection.Assembly.GetExecutingAssembly().Location);\n 当前GUI版本号 = \"v\" + myFileVersionInfo.FileVersion;\n 最新GUI版本号 = 当前GUI版本号;\n 标题 = \"SubsCheck Win GUI \" + 当前GUI版本号;\n this.Text = 标题;// + \" TG:CMLiussss BY:CM喂饭 干货满满\";\n comboBox1.Text = \"本地\";\n comboBox4.Text = \"通用订阅\";\n ReadConfig();\n\n if (CheckCommandLineParameter(\"-auto\"))\n {\n Log(\"检测到开机启动,准备执行任务...\");\n button1_Click(this, EventArgs.Empty);\n this.Hide();\n notifyIcon1.Visible = true;\n } else await CheckGitHubVersionAsync();\n }\n\n private async Task CheckGitHubVersionAsync()\n {\n try\n {\n // 首先检查是否有网络连接\n if (!IsNetworkAvailable())\n {\n return; // 静默返回,不显示错误\n }\n\n var result = await 获取版本号(\"https://api.github.com/repos/cmliu/SubsCheck-Win-GUI/releases/latest\");\n if (result.Item1 != \"未知版本\") \n {\n string latestVersion = result.Item1;\n if (latestVersion != 当前GUI版本号)\n {\n 最新GUI版本号 = latestVersion;\n 标题 = \"SubsCheck Win GUI \" + 当前GUI版本号 + $\" 发现新版本: {最新GUI版本号} 请及时更新!\";\n this.Text = 标题;\n }\n }\n }\n catch\n {\n // 静默处理任何其他异常\n return;\n }\n }\n\n // 添加检查网络连接的辅助方法\n private bool IsNetworkAvailable()\n {\n try\n {\n return NetworkInterface.GetIsNetworkAvailable();\n }\n catch\n {\n return false; // 如果无法检查网络状态,假设网络不可用\n }\n }\n\n private async void ReadConfig()//读取配置文件\n {\n checkBox5.CheckedChanged -= checkBox5_CheckedChanged;// 临时移除事件处理器,防止触发事件\n try\n {\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string configFilePath = Path.Combine(executablePath, \"config\", \"config.yaml\");\n\n if (File.Exists(configFilePath))\n {\n // 读取YAML文件内容\n string yamlContent = File.ReadAllText(configFilePath);\n\n // 使用YamlDotNet解析YAML\n var deserializer = new YamlDotNet.Serialization.Deserializer();\n var config = deserializer.Deserialize>(yamlContent);\n\n // 使用新函数获取整数值并设置UI控件\n int? concurrentValue = 读取config整数(config, \"concurrent\");\n if (concurrentValue.HasValue) numericUpDown1.Value = concurrentValue.Value;\n\n int? checkIntervalValue = 读取config整数(config, \"check-interval\");\n if (checkIntervalValue.HasValue) numericUpDown2.Value = checkIntervalValue.Value;\n\n int? timeoutValue = 读取config整数(config, \"timeout\");\n if (timeoutValue.HasValue) numericUpDown3.Value = timeoutValue.Value;\n\n int? minspeedValue = 读取config整数(config, \"min-speed\");\n if (minspeedValue.HasValue) numericUpDown4.Value = minspeedValue.Value;\n\n int? downloadtimeoutValue = 读取config整数(config, \"download-timeout\");\n if (downloadtimeoutValue.HasValue) numericUpDown5.Value = downloadtimeoutValue.Value;\n\n string speedTestUrl = 读取config字符串(config, \"speed-test-url\");\n if (speedTestUrl != null) comboBox2.Text = speedTestUrl;\n\n string savemethod = 读取config字符串(config, \"save-method\");\n if (savemethod != null)\n {\n if (savemethod == \"local\") comboBox1.Text = \"本地\";\n else comboBox1.Text = savemethod;\n }\n\n string listenport = 读取config字符串(config, \"listen-port\");\n if (listenport != null)\n {\n // 查找最后一个冒号的位置\n int colonIndex = listenport.LastIndexOf(':');\n if (colonIndex >= 0 && colonIndex < listenport.Length - 1)\n {\n // 提取冒号后面的部分作为端口号\n string portStr = listenport.Substring(colonIndex + 1);\n if (decimal.TryParse(portStr, out decimal port))\n {\n numericUpDown6.Value = port;\n }\n }\n }\n\n /*\n int? substoreport = 读取config整数(config, \"sub-store-port\");\n if (substoreport.HasValue) numericUpDown7.Value = substoreport.Value;\n */\n\n string substoreport = 读取config字符串(config, \"sub-store-port\");\n if (substoreport != null)\n {\n // 查找最后一个冒号的位置\n int colonIndex = substoreport.LastIndexOf(':');\n if (colonIndex >= 0 && colonIndex < substoreport.Length - 1)\n {\n // 提取冒号后面的部分作为端口号\n string portStr = substoreport.Substring(colonIndex + 1);\n if (decimal.TryParse(portStr, out decimal port))\n {\n numericUpDown7.Value = port;\n }\n }\n }\n\n string githubproxy = 读取config字符串(config, \"githubproxy\");\n if (githubproxy != null) comboBox3.Text = githubproxy;\n\n const string githubRawPrefix = \"https://raw.githubusercontent.com/\";\n\n string mihomoOverwriteUrl = 读取config字符串(config, \"mihomo-overwrite-url\");\n int mihomoOverwriteUrlIndex = mihomoOverwriteUrl.IndexOf(githubRawPrefix);\n if (mihomoOverwriteUrl != null)\n {\n if (mihomoOverwriteUrl.Contains(\"http://127.0.0\"))\n {\n if (mihomoOverwriteUrl.EndsWith(\"bdg.yaml\", StringComparison.OrdinalIgnoreCase))\n {\n comboBox5.Text = \"[内置]布丁狗的订阅转换\";\n await ProcessComboBox5Selection();\n }\n else if (mihomoOverwriteUrl.EndsWith(\"ACL4SSR_Online_Full.yaml\", StringComparison.OrdinalIgnoreCase))\n {\n comboBox5.Text = \"[内置]ACL4SSR_Online_Full\";\n await ProcessComboBox5Selection();\n }\n }\n else if (mihomoOverwriteUrlIndex > 0) comboBox5.Text = mihomoOverwriteUrl.Substring(mihomoOverwriteUrlIndex);\n else comboBox5.Text = mihomoOverwriteUrl;\n }\n\n // 处理URLs,检查是否包含GitHub raw链接\n List subUrls = 读取config列表(config, \"sub-urls\");\n if (subUrls != null && subUrls.Count > 0)\n {\n // 创建一个新的过滤后的列表\n var filteredUrls = new List();\n\n for (int i = 0; i < subUrls.Count; i++)\n {\n // 排除本地URL\n string localUrlPattern = $\"http://127.0.0.1:{numericUpDown6.Value}/all.yaml\";\n if (!subUrls[i].Equals(localUrlPattern, StringComparison.OrdinalIgnoreCase))\n {\n // 处理GitHub raw链接\n int index = subUrls[i].IndexOf(githubRawPrefix);\n if (index > 0) // 如果找到且不在字符串开头\n {\n // 只保留从githubRawPrefix开始的部分\n filteredUrls.Add(subUrls[i].Substring(index));\n }\n else\n {\n // 如果不是GitHub链接,直接添加\n filteredUrls.Add(subUrls[i]);\n }\n }\n }\n\n // 将过滤后的列表中的每个URL放在单独的行上\n textBox1.Text = string.Join(Environment.NewLine, filteredUrls);\n }\n\n string renamenode = 读取config字符串(config, \"rename-node\");\n if (renamenode != null && renamenode == \"true\") checkBox1.Checked = true;\n else checkBox1.Checked = false;\n\n string mediacheck = 读取config字符串(config, \"media-check\");\n if (mediacheck != null && mediacheck == \"true\") checkBox2.Checked = true;\n else checkBox2.Checked = false;\n\n string githubgistid = 读取config字符串(config, \"github-gist-id\");\n if (githubgistid != null) textBox2.Text = githubgistid;\n string githubtoken = 读取config字符串(config, \"github-token\");\n if (githubtoken != null) textBox3.Text = githubtoken;\n\n string githubapimirror = 读取config字符串(config, \"github-api-mirror\");\n if (githubapimirror != null) textBox4.Text = githubapimirror;\n\n string workerurl = 读取config字符串(config, \"worker-url\");\n if (workerurl != null) textBox7.Text = workerurl;\n string workertoken = 读取config字符串(config, \"worker-token\");\n if (workertoken != null) textBox6.Text = workertoken;\n\n string webdavusername = 读取config字符串(config, \"webdav-username\");\n if (webdavusername != null) textBox9.Text = webdavusername;\n string webdavpassword = 读取config字符串(config, \"webdav-password\");\n if (webdavpassword != null) textBox8.Text = webdavpassword;\n string webdavurl = 读取config字符串(config, \"webdav-url\");\n if (webdavurl != null) textBox5.Text = webdavurl;\n\n string subscheckversion = 读取config字符串(config, \"subscheck-version\");\n if (subscheckversion != null) 当前subsCheck版本号 = subscheckversion;\n\n int? successlimit = 读取config整数(config, \"success-limit\");\n if (successlimit.HasValue)\n {\n if (successlimit.Value == 0)\n {\n checkBox3.Checked = false;\n numericUpDown8.Enabled = false;\n }\n else\n {\n checkBox3.Checked = true;\n numericUpDown8.Enabled = true;\n numericUpDown8.Value = successlimit.Value;\n }\n }\n\n string enablewebui = 读取config字符串(config, \"enable-web-ui\");\n if (enablewebui != null && enablewebui == \"true\") checkBox4.Checked = true;\n else checkBox4.Checked = false;\n\n string apikey = 读取config字符串(config, \"api-key\");\n if (apikey != null)\n {\n if (apikey == GetComputerNameMD5())\n {\n checkBox4.Checked = false;\n string oldapikey = 读取config字符串(config, \"old-api-key\");\n if (oldapikey != null)\n {\n textBox10.Text = oldapikey;\n }\n else\n {\n textBox10.PasswordChar = '\\0';\n textBox10.Text = \"请输入密钥\";\n textBox10.ForeColor = Color.Gray;\n }\n }\n else\n {\n textBox10.Text = apikey;\n }\n }\n\n string cronexpression = 读取config字符串(config, \"cron-expression\");\n if (cronexpression != null)\n {\n textBox11.Text = cronexpression;\n string cronDescription = GetCronExpressionDescription(textBox11.Text);\n textBox11.Location = new Point(9, 48);\n textBox11.Visible = true;\n label2.Visible = false;\n numericUpDown2.Visible = false;\n }\n\n string guiauto = 读取config字符串(config, \"gui-auto\");\n if (guiauto != null && guiauto == \"true\") checkBox5.Checked = true;\n else checkBox5.Checked = false;\n }\n else\n {\n comboBox3.Text = \"自动选择\";\n comboBox5.Text = \"[内置]布丁狗的订阅转换\";\n }\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"读取配置文件时发生错误: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n checkBox5.CheckedChanged += checkBox5_CheckedChanged;// 重新绑定事件处理器\n }\n\n private int? 读取config整数(Dictionary config, string fieldName)\n {\n // 检查是否存在指定字段且不为null\n if (config.ContainsKey(fieldName) && config[fieldName] != null)\n {\n int value;\n if (int.TryParse(config[fieldName].ToString(), out value))\n return value;\n }\n return null;\n }\n\n private string 读取config字符串(Dictionary config, string fieldName)\n {\n // 检查是否存在指定字段且不为null\n if (config.ContainsKey(fieldName) && config[fieldName] != null)\n {\n return config[fieldName].ToString();\n }\n return null;\n }\n\n private List 读取config列表(Dictionary config, string fieldName)\n {\n // 检查是否存在指定字段且不为null\n if (config.ContainsKey(fieldName) && config[fieldName] != null)\n {\n // 尝试将对象转换为列表\n if (config[fieldName] is List listItems)\n {\n return listItems.Select(item => item?.ToString()).Where(s => !string.IsNullOrEmpty(s)).ToList();\n }\n }\n return null;\n }\n\n private async Task SaveConfig(bool githubProxyCheck = true)//保存配置文件\n {\n try\n {\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string configFilePath = Path.Combine(executablePath, \"config\", \"config.yaml\");\n\n // 创建配置字典\n var config = new Dictionary();\n\n // 从UI控件获取值并添加到字典中\n config[\"concurrent\"] = (int)numericUpDown1.Value;\n config[\"check-interval\"] = (int)numericUpDown2.Value;\n if (textBox11.Visible) config[\"cron-expression\"] = textBox11.Text;\n config[\"timeout\"] = (int)numericUpDown3.Value;\n config[\"min-speed\"] = (int)numericUpDown4.Value;\n config[\"download-timeout\"] = (int)numericUpDown5.Value;\n\n if (!string.IsNullOrEmpty(comboBox2.Text)) config[\"speed-test-url\"] = comboBox2.Text;\n\n // 保存save-method,将\"本地\"转换为\"local\"\n config[\"save-method\"] = comboBox1.Text == \"本地\" ? \"local\" : comboBox1.Text;\n\n // 保存gist参数\n config[\"github-gist-id\"] = textBox2.Text;\n config[\"github-token\"] = textBox3.Text;\n\n config[\"github-api-mirror\"] = textBox4.Text;\n\n // 保存r2参数\n config[\"worker-url\"] = textBox7.Text;\n config[\"worker-token\"] = textBox6.Text;\n\n // 保存webdav参数\n config[\"webdav-username\"] = textBox9.Text;\n config[\"webdav-password\"] = textBox8.Text;\n config[\"webdav-url\"] = textBox5.Text;\n\n // 保存enable-web-ui\n config[\"enable-web-ui\"] = true;\n\n // 保存listen-port\n if (checkBox4.Checked) \n {\n WebUIapiKey = textBox10.Text;\n config[\"listen-port\"] = $@\":{numericUpDown6.Value}\";\n }\n else\n {\n WebUIapiKey = GetComputerNameMD5();\n config[\"listen-port\"] = $@\"127.0.0.1:{numericUpDown6.Value}\";\n if (textBox10.Text != \"请输入密钥\") config[\"old-api-key\"] = textBox10.Text;\n }\n config[\"api-key\"] = WebUIapiKey;\n\n // 保存sub-store-port\n config[\"sub-store-port\"] = $@\":{numericUpDown7.Value}\";\n\n string githubRawPrefix = \"https://raw.githubusercontent.com/\";\n if (githubProxyCheck)\n {\n // 检查并处理 GitHub Raw URLs\n if (comboBox3.Text == \"自动选择\")\n {\n // 创建不包含\"自动选择\"的代理列表\n List proxyItems = new List();\n for (int j = 0; j < comboBox3.Items.Count; j++)\n {\n string proxyItem = comboBox3.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n\n // 随机打乱列表顺序\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n\n // 异步检测可用代理\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n }\n }\n\n if (comboBox3.Text != \"自动选择\") githubProxyURL = $\"https://{comboBox3.Text}/\";\n config[\"githubproxy\"] = comboBox3.Text;\n config[\"github-proxy\"] = githubProxyURL;\n\n // 保存sub-urls列表\n List subUrls = new List();\n string allyamlFilePath = System.IO.Path.Combine(executablePath, \"output\", \"all.yaml\");\n if (System.IO.File.Exists(allyamlFilePath))\n {\n subUrls.Add($\"http://127.0.0.1:{numericUpDown6.Value}/all.yaml\");\n Log(\"已加载上次测试结果。\");\n }\n\n if (!string.IsNullOrEmpty(textBox1.Text))\n {\n subUrls.AddRange(textBox1.Text.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList());\n // 处理URLs\n for (int i = 0; i < subUrls.Count; i++)\n {\n if (subUrls[i].StartsWith(githubRawPrefix) && !string.IsNullOrEmpty(githubProxyURL))\n {\n // 替换为代理 URL 格式\n //subUrls[i] = githubProxyURL + githubRawPrefix + subUrls[i].Substring(githubRawPrefix.Length);\n // 使用subs-check内置github-proxy参数\n subUrls[i] = githubRawPrefix + subUrls[i].Substring(githubRawPrefix.Length);\n }\n }\n }\n\n config[\"sub-urls\"] = subUrls;\n\n // 处理配置文件下载与配置\n if (comboBox5.Text.Contains(\"[内置]\"))\n {\n // 确定文件名和下载URL\n string fileName;\n string downloadFilePath;\n string downloadUrl;\n string displayName;\n\n if (comboBox5.Text.Contains(\"[内置]布丁狗\"))\n {\n fileName = \"bdg.yaml\";\n displayName = \"[内置]布丁狗的订阅转换\";\n downloadUrl = \"https://raw.githubusercontent.com/cmliu/ACL4SSR/main/yaml/bdg.yaml\";\n }\n else // [内置]ACL4SSR\n {\n fileName = \"ACL4SSR_Online_Full.yaml\";\n displayName = \"[内置]ACL4SSR_Online_Full\";\n downloadUrl = \"https://raw.githubusercontent.com/beck-8/override-hub/main/yaml/ACL4SSR_Online_Full.yaml\";\n }\n\n // 确保output文件夹存在\n string outputFolderPath = Path.Combine(executablePath, \"output\");\n if (!Directory.Exists(outputFolderPath))\n {\n Directory.CreateDirectory(outputFolderPath);\n }\n\n // 确定文件完整路径\n downloadFilePath = Path.Combine(outputFolderPath, fileName);\n if (!File.Exists(downloadFilePath)) await ProcessComboBox5Selection();\n\n // 检查文件是否存在\n if (!File.Exists(downloadFilePath))\n {\n Log($\"{displayName} 覆写配置文件 未找到,将使用在线版本。\");\n config[\"mihomo-overwrite-url\"] = githubProxyURL + downloadUrl;\n }\n else\n {\n Log($\"{displayName} 覆写配置文件 加载成功。\");\n config[\"mihomo-overwrite-url\"] = $\"http://127.0.0.1:{numericUpDown6.Value}/{fileName}\";\n }\n }\n else if (comboBox5.Text.StartsWith(githubRawPrefix)) config[\"mihomo-overwrite-url\"] = githubProxyURL + comboBox5.Text;\n else config[\"mihomo-overwrite-url\"] = comboBox5.Text != \"\" ? comboBox5.Text : $\"http://127.0.0.1:{numericUpDown6.Value}/ACL4SSR_Online_Full.yaml\";\n \n config[\"rename-node\"] = checkBox1.Checked;//以节点IP查询位置重命名节点\n config[\"media-check\"] = checkBox2.Checked;//是否开启流媒体检测\n config[\"keep-success-proxies\"] = false;\n config[\"print-progress\"] = false;//是否显示进度\n config[\"sub-urls-retry\"] = 3;//重试次数(获取订阅失败后重试次数)\n config[\"subscheck-version\"] = 当前subsCheck版本号;//当前subsCheck版本号\n\n config[\"gui-auto\"] = checkBox5.Checked;//是否开机自启\n\n //保存几个成功的节点,为0代表不限制 \n if (checkBox3.Checked) config[\"success-limit\"] = (int)numericUpDown8.Value;\n else config[\"success-limit\"] = 0;\n\n // 使用YamlDotNet序列化配置\n var serializer = new YamlDotNet.Serialization.SerializerBuilder()\n .WithIndentedSequences() // 使序列化结果更易读\n .Build();\n\n string yamlContent = serializer.Serialize(config);\n\n // 确保配置目录存在\n string configDirPath = Path.GetDirectoryName(configFilePath);\n if (!Directory.Exists(configDirPath))\n Directory.CreateDirectory(configDirPath);\n\n string moreYamlPath = Path.Combine(configDirPath, \"more.yaml\");\n if (File.Exists(moreYamlPath))\n {\n // 读取more.yaml的内容\n string moreYamlContent = File.ReadAllText(moreYamlPath);\n\n // 确保more.yaml内容以换行开始\n if (!moreYamlContent.StartsWith(\"\\n\") && !moreYamlContent.StartsWith(\"\\r\\n\"))\n {\n yamlContent += \"\\n\"; // 添加换行符作为分隔\n }\n\n // 将more.yaml的内容追加到要写入的config.yaml内容后\n yamlContent += moreYamlContent;\n\n Log($\"已将补充参数配置 more.yaml 内容追加到配置文件\");\n }\n // 写入YAML文件\n File.WriteAllText(configFilePath, yamlContent);\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"保存配置文件时发生错误: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n if (button2.Text == \"高级设置∧\")\n {\n button2.Text = \"高级设置∨\";\n groupBox3.Visible = false;\n }\n else\n {\n button2.Text = \"高级设置∧\";\n groupBox3.Visible = true;\n }\n 判断保存类型();\n }\n\n private async void button1_Click(object sender, EventArgs e)\n {\n button1.Enabled = false;\n if (button1.Text == \"▶️ 启动\") \n {\n if (checkBox4.Checked && textBox10.Text == \"请输入密钥\")\n {\n MessageBox.Show(\"您已启用WebUI,请设置WebUI API密钥!\", \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Warning);\n return;\n }\n run = 1;\n if (button3.Enabled==false)\n {\n string executablePath = Path.GetDirectoryName(Application.ExecutablePath);\n string allyamlFilePath = Path.Combine(executablePath, \"output\", \"all.yaml\");\n button3.Enabled = File.Exists(allyamlFilePath);\n }\n\n numericUpDown1.Enabled = false;\n numericUpDown2.Enabled = false;\n textBox11.Enabled = false;\n numericUpDown3.Enabled = false;\n numericUpDown4.Enabled = false;\n numericUpDown5.Enabled = false;\n numericUpDown6.Enabled = false;\n numericUpDown7.Enabled = false;\n comboBox1.Enabled = false;\n textBox1.Enabled = false;\n groupBox3.Enabled = false;\n groupBox4.Enabled = false;\n groupBox5.Enabled = false;\n groupBox6.Enabled = false;\n if (checkBox4.Checked) button6.Enabled = true;\n button1.Text = \"⏹️ 停止\";\n //timer3.Enabled = true;\n // 清空 richTextBox1\n richTextBox1.Clear();\n await KillNodeProcessAsync();\n await SaveConfig();\n\n if (run == 1) \n {\n // 更新菜单项的启用状态\n startMenuItem.Enabled = false;\n stopMenuItem.Enabled = true;\n\n // 清空 richTextBox1\n //richTextBox1.Clear();\n\n notifyIcon1.Text = \"SubsCheck: 已就绪\";\n\n // 启动 subs-check.exe 程序\n StartSubsCheckProcess();\n }\n }\n else\n {\n run = 0;\n Log(\"任务停止\");\n progressBar1.Value = 0;\n groupBox2.Text = \"实时日志\";\n notifyIcon1.Text = \"SubsCheck: 未运行\";\n // 停止 subs-check.exe 程序\n StopSubsCheckProcess();\n // 结束 Sub-Store\n await KillNodeProcessAsync();\n if (checkBox4.Checked) ReadConfig();\n button3.Enabled = false;\n numericUpDown1.Enabled = true;\n numericUpDown2.Enabled = true;\n textBox11.Enabled = true;\n numericUpDown3.Enabled = true;\n numericUpDown4.Enabled = true;\n numericUpDown5.Enabled = true;\n numericUpDown6.Enabled = true;\n numericUpDown7.Enabled = true;\n comboBox1.Enabled = true;\n textBox1.Enabled = true;\n groupBox3.Enabled = true;\n groupBox4.Enabled = true;\n groupBox5.Enabled = true;\n groupBox6.Enabled = true;\n button6.Enabled = false;\n button1.Text = \"▶️ 启动\";\n //timer3.Enabled = false;\n // 更新菜单项的启用状态\n startMenuItem.Enabled = true;\n stopMenuItem.Enabled = false;\n }\n if (downloading == 0) button1.Enabled = true;\n }\n\n private async Task DownloadSubsCheckEXE()\n {\n button1.Enabled = false;\n downloading = 1;\n try\n {\n Log(\"正在检查网络连接...\");\n\n // 首先检查是否有网络连接\n if (!IsNetworkAvailable())\n {\n Log(\"网络连接不可用,无法下载核心文件。\", true);\n MessageBox.Show(\"缺少 subs-check.exe 核心文件。\\n\\n您可以前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n return;\n }\n\n var result = await 获取版本号(\"https://api.github.com/repos/beck-8/subs-check/releases/latest\", true);\n if (result.Item1 != \"未知版本\") \n {\n // 创建不使用系统代理的 HttpClientHandler\n HttpClientHandler handler = new HttpClientHandler\n {\n UseProxy = false,\n Proxy = null\n };\n\n // 使用自定义 handler 创建 HttpClient\n using (HttpClient client = new HttpClient(handler)) \n {\n try\n {\n string latestVersion = result.Item1;\n JArray assets = result.Item2;\n Log($\"subs-check.exe 最新版本为: {latestVersion} \");\n // 查找Windows i386版本的资源\n string downloadUrl = null;\n\n foreach (var asset in assets)\n {\n if (asset[\"name\"].ToString() == \"subs-check_Windows_i386.zip\")\n {\n downloadUrl = asset[\"browser_download_url\"].ToString();\n break;\n }\n }\n\n if (downloadUrl != null)\n {\n string 代理下载链接 = githubProxyURL + downloadUrl;\n string 原生下载链接 = 代理下载链接;\n // 计算\"https://\"在下载链接中出现的次数\n int httpsCount = 0;\n int lastIndex = -1;\n int currentIndex = 0;\n\n // 查找所有\"https://\"出现的位置\n while ((currentIndex = 代理下载链接.IndexOf(\"https://\", currentIndex)) != -1)\n {\n httpsCount++;\n lastIndex = currentIndex;\n currentIndex += 8; // \"https://\".Length = 8\n }\n\n // 如果\"https://\"出现2次或以上,提取最后一个\"https://\"之后的内容\n if (httpsCount >= 2 && lastIndex != -1)\n {\n 原生下载链接 = 代理下载链接.Substring(lastIndex);\n }\n\n string executablePath = Path.GetDirectoryName(Application.ExecutablePath);\n\n // 创建下载请求 - 优化的多级尝试下载逻辑\n Log(\"开始下载文件...\");\n bool downloadSuccess = false;\n string zipFilePath = Path.Combine(executablePath, \"subs-check_Windows_i386.zip\");\n string failureReason = \"\";\n\n // 如果文件已存在,先删除\n if (File.Exists(zipFilePath)) File.Delete(zipFilePath);\n\n // 第一次尝试:使用代理下载链接 + 当前HttpClient(不使用系统代理)\n try\n {\n Log($\"[尝试1/4] 使用代理下载链接:{代理下载链接}\");\n downloadSuccess = await DownloadFileAsync(client, 代理下载链接, zipFilePath);\n }\n catch (Exception ex)\n {\n Log($\"[尝试1/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n\n // 如果第一次尝试失败,且代理链接与原生链接不同,使用原生下载链接尝试\n if (!downloadSuccess && 代理下载链接 != 原生下载链接)\n {\n try\n {\n Log($\"[尝试2/4] 使用原生下载链接:{原生下载链接}\");\n downloadSuccess = await DownloadFileAsync(client, 原生下载链接, zipFilePath);\n }\n catch (Exception ex)\n {\n Log($\"[尝试2/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n }\n\n // 如果前面的尝试都失败,创建使用系统代理的HttpClient再次尝试\n if (!downloadSuccess)\n {\n try\n {\n Log(\"[尝试3/4] 使用系统代理 + 代理下载链接\");\n using (HttpClient proxyClient = new HttpClient())\n {\n proxyClient.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n proxyClient.Timeout = TimeSpan.FromSeconds(30);\n\n downloadSuccess = await DownloadFileAsync(proxyClient, 代理下载链接, zipFilePath);\n }\n }\n catch (Exception ex)\n {\n Log($\"[尝试3/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n\n // 最后一次尝试:使用系统代理 + 原生链接(如果不同)\n if (!downloadSuccess && 代理下载链接 != 原生下载链接)\n {\n try\n {\n Log(\"[尝试4/4] 使用系统代理 + 原生下载链接\");\n using (HttpClient proxyClient = new HttpClient())\n {\n proxyClient.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n proxyClient.Timeout = TimeSpan.FromSeconds(30);\n\n downloadSuccess = await DownloadFileAsync(proxyClient, 原生下载链接, zipFilePath);\n }\n }\n catch (Exception ex)\n {\n Log($\"[尝试4/4] 失败: {ex.Message}\", true);\n failureReason = ex.Message;\n }\n }\n }\n\n if (downloadSuccess)\n {\n Log(\"下载完成,正在解压文件...\");\n\n // 解压文件的代码保持不变\n using (System.IO.Compression.ZipArchive archive = System.IO.Compression.ZipFile.OpenRead(zipFilePath))\n {\n // 查找subs-check.exe\n System.IO.Compression.ZipArchiveEntry exeEntry = archive.Entries.FirstOrDefault(\n entry => entry.Name.Equals(\"subs-check.exe\", StringComparison.OrdinalIgnoreCase));\n\n if (exeEntry != null)\n {\n string exeFilePath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 如果文件已存在,先删除\n if (File.Exists(exeFilePath))\n {\n File.Delete(exeFilePath);\n }\n\n // 解压文件\n exeEntry.ExtractToFile(exeFilePath);\n 当前subsCheck版本号 = latestVersion;\n Log($\"subs-check.exe {当前subsCheck版本号} 已就绪!\");\n\n await SaveConfig(false);\n\n // 删除下载的zip文件\n //File.Delete(zipFilePath);\n }\n else\n {\n Log(\"无法在压缩包中找到 subs-check.exe 文件。\", true);\n }\n }\n }\n else\n {\n // 所有尝试都失败\n Log($\"所有下载尝试均失败,最后错误: {failureReason}\", true);\n MessageBox.Show($\"下载 subs-check.exe 失败,请检查网络连接后重试。\\n\\n可尝试更换 Github Proxy 后,点击「检查更新」>「更新内核」。\\n或前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"下载失败\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n progressBar1.Value = 0;\n }\n\n // 解压文件\n using (System.IO.Compression.ZipArchive archive = System.IO.Compression.ZipFile.OpenRead(zipFilePath))\n {\n // 查找subs-check.exe\n System.IO.Compression.ZipArchiveEntry exeEntry = archive.Entries.FirstOrDefault(\n entry => entry.Name.Equals(\"subs-check.exe\", StringComparison.OrdinalIgnoreCase));\n\n if (exeEntry != null)\n {\n string exeFilePath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 如果文件已存在,先删除\n if (File.Exists(exeFilePath))\n {\n File.Delete(exeFilePath);\n }\n\n // 解压文件\n exeEntry.ExtractToFile(exeFilePath);\n 当前subsCheck版本号 = latestVersion;\n Log($\"subs-check.exe {当前subsCheck版本号} 已就绪!\");\n\n await SaveConfig(false);\n // 这里保留原有行为,不修改button1.Enabled\n\n // 删除下载的zip文件\n //File.Delete(zipFilePath);\n }\n else\n {\n Log(\"无法在压缩包中找到 subs-check.exe 文件。\", true);\n }\n }\n }\n else\n {\n Log(\"无法找到适用于 Windows i386 的下载链接。\", true);\n MessageBox.Show(\"未能找到适用的 subs-check.exe 下载链接。\\n\\n可尝试更换 Github Proxy 后,点击「检查更新」>「更新内核」。\\n或前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n }\n catch (Exception ex)\n {\n Log($\"下载过程中出错: {ex.Message}\", true);\n MessageBox.Show($\"下载 subs-check.exe 时出错: {ex.Message}\\n\\n可尝试更换 Github Proxy 后,点击「检查更新」>「更新内核」。\\n或前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n } \n }\n catch (Exception ex)\n {\n Log($\"初始化下载过程出错: {ex.Message}\", true);\n MessageBox.Show($\"下载准备过程出错: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n\n button1.Enabled = true;\n downloading = 0;\n }\n\n /// \n /// 获取最新版本号和对应的下载链接\n /// \n /// API请求URL\n /// 是否在日志中输出信息\n /// 包含最新版本号和下载链接的元组\n private async Task<(string LatestVersion, JArray assets)> 获取版本号(string 版本号URL, bool 是否输出log = false)\n {\n string latestVersion = \"未知版本\";\n JArray assets = null;\n\n // 创建不使用系统代理的 HttpClientHandler\n HttpClientHandler handler = new HttpClientHandler\n {\n UseProxy = false,\n Proxy = null\n };\n\n // 使用自定义 handler 创建 HttpClient\n using (HttpClient client = new HttpClient(handler))\n {\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n client.Timeout = TimeSpan.FromSeconds(30); // 增加超时时间以适应下载需求\n\n if (是否输出log) Log(\"正在获取最新版本 subs-check.exe 内核下载地址...\");\n string url = 版本号URL;\n string 备用url = 版本号URL.Replace(\"api.github.com\", \"api.github.cmliussss.net\");\n\n HttpResponseMessage response = null;\n string responseBody = null;\n JObject json = null;\n\n // 先尝试主URL\n try\n {\n response = await client.GetAsync(url);\n\n // 如果主URL请求成功返回有效数据\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从主API获取版本信息\");\n }\n // 如果主URL请求不成功但没有抛出异常\n else\n {\n if (是否输出log) Log($\"主API请求失败 HTTP {(int)response.StatusCode},尝试备用API...\");\n response = await client.GetAsync(备用url);\n\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用API获取版本信息\");\n }\n else\n {\n if (是否输出log) Log($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return (latestVersion, assets); // 两个URL都失败,提前退出\n }\n }\n }\n // 捕获网络请求异常(如连接超时、无法解析域名等)\n catch (HttpRequestException ex)\n {\n if (是否输出log) Log($\"主API请求出错: {ex.Message},尝试备用API...\");\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用API获取版本信息\");\n }\n else\n {\n if (是否输出log) Log($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return (latestVersion, assets); // 备用URL也失败,提前退出\n }\n }\n catch (Exception backupEx)\n {\n if (是否输出log) Log($\"备用API请求也出错: {backupEx.Message}\", true);\n return (latestVersion, assets); // 连备用URL也异常,提前退出\n }\n }\n // 捕获JSON解析异常\n catch (Newtonsoft.Json.JsonException ex)\n {\n if (是否输出log) Log($\"解析JSON数据出错: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用API获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n if (是否输出log) Log($\"备用API请求也出错: {backupEx.Message}\", true);\n return (latestVersion, assets); // 连备用URL也有问题,提前退出\n }\n }\n // 捕获其他所有异常\n catch (Exception ex)\n {\n if (是否输出log) Log($\"获取版本信息时出现未预期的错误: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n if (是否输出log) Log(\"成功从备用URL获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n if (是否输出log) Log($\"备用API请求也出错: {backupEx.Message}\", true);\n return (latestVersion, assets); // 连备用URL也有问题,提前退出\n }\n }\n\n // 如果成功获取了JSON数据,继续处理\n if (json != null)\n {\n latestVersion = json[\"tag_name\"].ToString();\n assets = (JArray)json[\"assets\"];\n }\n }\n\n return (latestVersion, assets);\n }\n\n\n private async void StartSubsCheckProcess()\n {\n try\n {\n // 重置进度条\n progressBar1.Value = 0;\n groupBox2.Text = \"实时日志\";\n using (MemoryStream ms = new MemoryStream(Properties.Resources.going))\n {\n notifyIcon1.Icon = new Icon(ms);\n }\n\n // 获取当前应用程序目录\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string subsCheckPath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 检查是否有其他subs-check.exe进程正在运行,并强制结束它们\n try\n {\n Process[] processes = Process.GetProcessesByName(\"subs-check\");\n if (processes.Length > 0)\n {\n Log(\"发现正在运行的subs-check.exe进程,正在强制结束...\");\n foreach (Process process in processes)\n {\n // 确保不是当前应用程序的进程\n if (process != subsCheckProcess)\n {\n try\n {\n process.Kill();\n process.WaitForExit();\n Log($\"成功结束subs-check.exe进程(ID: {process.Id})\");\n }\n catch (Exception ex)\n {\n Log($\"结束subs-check.exe进程时出错(ID: {process.Id}): {ex.Message}\", true);\n }\n }\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"检查运行中的subs-check.exe进程时出错: {ex.Message}\", true);\n }\n\n // 检查文件是否存在\n if (!File.Exists(subsCheckPath))\n {\n Log(\"没有找到 subs-check.exe 文件。\", true);\n await DownloadSubsCheckEXE(); // 使用异步等待\n }\n\n // 创建进程启动信息\n ProcessStartInfo startInfo = new ProcessStartInfo\n {\n FileName = subsCheckPath,\n UseShellExecute = false,\n RedirectStandardOutput = true,\n RedirectStandardError = true,\n CreateNoWindow = true,\n WorkingDirectory = executablePath,\n StandardOutputEncoding = Encoding.UTF8,\n StandardErrorEncoding = Encoding.UTF8\n };\n\n // 创建进程\n subsCheckProcess = new Process { StartInfo = startInfo };\n\n // 设置输出和错误数据接收事件处理\n subsCheckProcess.OutputDataReceived += SubsCheckProcess_OutputDataReceived;\n subsCheckProcess.ErrorDataReceived += SubsCheckProcess_OutputDataReceived;\n\n // 启动进程\n subsCheckProcess.Start();\n\n // 开始异步读取输出\n subsCheckProcess.BeginOutputReadLine();\n subsCheckProcess.BeginErrorReadLine();\n\n // 设置进程退出事件处理\n subsCheckProcess.EnableRaisingEvents = true;\n subsCheckProcess.Exited += SubsCheckProcess_Exited;\n\n Log($\"subs-check.exe {当前subsCheck版本号} 已启动...\");\n timer4.Enabled = true;\n }\n catch (Exception ex)\n {\n Log($\"启动 subs-check.exe 时出错: {ex.Message}\", true);\n button1.Text = \"▶️ 启动\";\n }\n }\n\n\n private void StopSubsCheckProcess()\n {\n timer4.Enabled = false;\n if (subsCheckProcess != null && !subsCheckProcess.HasExited)\n {\n try\n {\n // 尝试正常关闭进程\n subsCheckProcess.Kill();\n subsCheckProcess.WaitForExit();\n Log(\"subs-check.exe 已停止\");\n notifyIcon1.Icon = originalNotifyIcon;\n button7.Enabled = false;\n button7.Text = \"🔀未启动\";\n }\n catch (Exception ex)\n {\n Log($\"停止 subs-check.exe 时出错: {ex.Message}\", true);\n }\n finally\n {\n subsCheckProcess.Dispose();\n subsCheckProcess = null;\n }\n }\n }\n \n private void SubsCheckProcess_OutputDataReceived(object sender, DataReceivedEventArgs e)\n {\n if (!string.IsNullOrEmpty(e.Data))\n {\n // 由于此事件在另一个线程中触发,需要使用 Invoke 在 UI 线程上更新控件\n BeginInvoke(new Action(() =>\n {\n // 过滤ANSI转义序列\n string cleanText = RemoveAnsiEscapeCodes(e.Data);\n\n // 检查是否包含\"下次检查时间\"信息\n if (cleanText.Contains(\"下次检查时间:\"))\n {\n if (button3.Enabled == false)\n {\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string outputFolderPath = System.IO.Path.Combine(executablePath, \"output\");\n if (System.IO.Directory.Exists(outputFolderPath))\n {\n string allyamlFilePath = System.IO.Path.Combine(outputFolderPath, \"all.yaml\");\n if (System.IO.File.Exists(allyamlFilePath)) button3.Enabled = true;\n }\n }\n // 提取完整的下次检查时间信息\n int startIndex = cleanText.IndexOf(\"下次检查时间:\");\n nextCheckTime = cleanText.Substring(startIndex);\n }\n\n if (!cleanText.StartsWith(\"[GIN]\"))\n {\n // 如果不是进度行,则添加到日志中\n richTextBox1.AppendText(cleanText + \"\\r\\n\");\n // 滚动到最底部\n richTextBox1.SelectionStart = richTextBox1.Text.Length;\n richTextBox1.ScrollToCaret();\n }\n\n /*\n // 检查是否是进度信息行\n if (cleanText.StartsWith(\"进度: [\"))\n {\n // 解析百分比\n int percentIndex = cleanText.IndexOf('%');\n if (percentIndex > 0)\n {\n // 查找百分比前面的数字部分\n int startIndex = cleanText.LastIndexOfAny(new char[] { ' ', '>' }, percentIndex) + 1;\n string percentText = cleanText.Substring(startIndex, percentIndex - startIndex);\n\n if (double.TryParse(percentText, out double percentValue))\n {\n // 更新进度条,将百分比值(0-100)设置给进度条\n progressBar1.Value = (int)Math.Round(percentValue);\n }\n }\n\n // 解析节点信息部分(例如:(12/6167) 可用: 0)\n int infoStartIndex = cleanText.IndexOf('(');\n if (infoStartIndex > 0)\n {\n string fullNodeInfo = cleanText.Substring(infoStartIndex);\n\n // 提取最重要的信息:节点数量和可用数量\n int endIndex = fullNodeInfo.IndexOf(\"2025-\"); // 查找日期部分开始位置\n if (endIndex > 0)\n {\n nodeInfo = fullNodeInfo.Substring(0, endIndex).Trim();\n }\n else\n {\n // 如果找不到日期部分,则取前30个字符\n nodeInfo = fullNodeInfo.Length > 30 ? fullNodeInfo.Substring(0, 30) + \"...\" : fullNodeInfo;\n }\n\n groupBox2.Text = \"实时日志 \" + nodeInfo;\n\n // 确保通知图标文本不超过63个字符\n string notifyText = \"SubsCheck: \" + nodeInfo;\n if (notifyText.Length > 63)\n {\n notifyText = notifyText.Substring(0, 60) + \"...\";\n }\n notifyIcon1.Text = notifyText;\n }\n\n // 更新lastProgressLine,但不向richTextBox添加文本\n lastProgressLine = cleanText;\n }\n else\n {\n // 如果不是进度行,则添加到日志中\n richTextBox1.AppendText(cleanText + \"\\r\\n\");\n // 滚动到最底部\n richTextBox1.SelectionStart = richTextBox1.Text.Length;\n richTextBox1.ScrollToCaret();\n }\n */\n }));\n }\n }\n\n\n // 添加一个方法来过滤ANSI转义序列\n private string RemoveAnsiEscapeCodes(string input)\n {\n // 匹配ANSI转义序列的正则表达式\n // 这将匹配类似 \"[2m\"、\"[0m\"、\"[92m\" 等格式的ANSI颜色代码\n return System.Text.RegularExpressions.Regex.Replace(input, @\"\\x1B\\[[0-9;]*[mGK]\", string.Empty);\n }\n\n private void SubsCheckProcess_Exited(object sender, EventArgs e)\n {\n // 进程退出时,在 UI 线程上更新控件\n BeginInvoke(new Action(() =>\n {\n Log(\"subs-check.exe 已退出\");\n button1.Text = \"▶️ 启动\";\n\n // 更新菜单项的启用状态\n startMenuItem.Enabled = true;\n stopMenuItem.Enabled = false;\n\n // 重新启用控件\n numericUpDown1.Enabled = true;\n numericUpDown2.Enabled = true;\n numericUpDown3.Enabled = true;\n numericUpDown4.Enabled = true;\n numericUpDown5.Enabled = true;\n numericUpDown6.Enabled = true;\n textBox1.Enabled = true;\n groupBox3.Enabled = true;\n }));\n }\n\n /// \n /// 获取本地局域网IP地址,如果有多个则让用户选择\n /// \n /// 用户选择的IP地址,如果未选择则返回127.0.0.1\n private string GetLocalLANIP()\n {\n try\n {\n // 获取所有网卡的IP地址\n List lanIPs = new List();\n\n // 获取所有网络接口\n foreach (System.Net.NetworkInformation.NetworkInterface ni in System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces())\n {\n // 排除loopback、虚拟网卡和非活动网卡\n if (ni.NetworkInterfaceType != System.Net.NetworkInformation.NetworkInterfaceType.Loopback &&\n ni.OperationalStatus == System.Net.NetworkInformation.OperationalStatus.Up)\n {\n // 获取该网卡的所有IP地址\n foreach (System.Net.NetworkInformation.UnicastIPAddressInformation ip in ni.GetIPProperties().UnicastAddresses)\n {\n // 只添加IPv4地址且不是回环地址\n if (ip.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork &&\n !System.Net.IPAddress.IsLoopback(ip.Address))\n {\n lanIPs.Add(ip.Address.ToString());\n }\n }\n }\n }\n\n // 如果没有找到任何IP地址,返回本地回环地址\n if (lanIPs.Count == 0)\n {\n return \"127.0.0.1\";\n }\n // 如果只找到一个IP地址,直接返回\n else if (lanIPs.Count == 1)\n {\n return lanIPs[0];\n }\n // 如果有多个IP地址,让用户选择\n else\n {\n // 创建选择窗口\n Form selectForm = new Form();\n selectForm.Text = \"选择局域网IP地址\";\n selectForm.StartPosition = FormStartPosition.CenterParent;\n /*\n selectForm.Width = 520; // 保持宽度\n selectForm.Height = 320; // 增加高度以容纳额外的警告标签\n selectForm.FormBorderStyle = FormBorderStyle.FixedDialog;\n */\n selectForm.AutoSize = true; // 启用自动大小调整\n selectForm.AutoSizeMode = AutoSizeMode.GrowAndShrink; // 根据内容调整大小\n selectForm.FormBorderStyle = FormBorderStyle.FixedSingle; // 使用固定但可调整的边框\n selectForm.ShowIcon = false;\n selectForm.MaximizeBox = false;\n selectForm.MinimizeBox = false;\n\n // 添加说明标签\n Label label = new Label();\n label.Text = \"发现多个局域网IP地址:\\n\\n\" +\n \"· 仅在本机访问:直接点击【取消】,将使用127.0.0.1\\n\\n\" +\n \"· 局域网内其他设备访问:请在下面列表中选择一个正确的局域网IP\";\n label.Location = new Point(15, 10);\n label.AutoSize = true;\n label.MaximumSize = new Size(380, 0); // 设置最大宽度,允许自动换行\n selectForm.Controls.Add(label);\n\n // 计算标签高度以正确放置列表框\n int labelHeight = label.Height + 20;\n\n // 添加IP地址列表框\n ListBox listBox = new ListBox();\n listBox.Location = new Point(15, labelHeight);\n listBox.Width = 380;\n listBox.Height = 130; // 保持列表框高度\n foreach (string ip in lanIPs)\n {\n listBox.Items.Add(ip);\n }\n // 查找非\".1\"结尾的IP地址,如果所有IP都以\".1\"结尾,则使用第一个IP\n int selectedIndex = 0;\n for (int i = 0; i < lanIPs.Count; i++)\n {\n if (!lanIPs[i].EndsWith(\".1\"))\n {\n selectedIndex = i;\n break;\n }\n }\n\n // 设置选中的索引\n listBox.SelectedIndex = selectedIndex;\n selectForm.Controls.Add(listBox);\n\n // 添加警告标签(放在列表框下方)\n Label warningLabel = new Label();\n warningLabel.Text = \"注意:选择错误的IP会导致局域网内其他设备无法访问。\\n\\n   推荐您可以先尝试使用非“.1”结尾的IP!\";\n warningLabel.Location = new Point(15, labelHeight + listBox.Height + 10);\n warningLabel.AutoSize = true;\n warningLabel.ForeColor = Color.Red; // 警告文本使用红色\n selectForm.Controls.Add(warningLabel);\n\n // 计算按钮位置(居中排布)\n int buttonY = labelHeight + listBox.Height + warningLabel.Height + 20;\n int buttonTotalWidth = 75 * 2 + 15; // 两个按钮的宽度加间距\n int buttonStartX = (selectForm.ClientSize.Width - buttonTotalWidth) / 2;\n\n // 添加确定按钮\n Button okButton = new Button();\n okButton.Text = \"确定\";\n okButton.DialogResult = DialogResult.OK;\n okButton.Location = new Point(buttonStartX, buttonY);\n okButton.Width = 75;\n selectForm.Controls.Add(okButton);\n selectForm.AcceptButton = okButton;\n\n // 添加取消按钮\n Button cancelButton = new Button();\n cancelButton.Text = \"取消\";\n cancelButton.DialogResult = DialogResult.Cancel;\n cancelButton.Location = new Point(buttonStartX + 90, buttonY);\n cancelButton.Width = 75;\n selectForm.Controls.Add(cancelButton);\n selectForm.CancelButton = cancelButton;\n\n // 显示选择窗口\n if (selectForm.ShowDialog() == DialogResult.OK)\n {\n return listBox.SelectedItem.ToString();\n }\n else\n {\n return \"127.0.0.1\"; // 如果用户取消,返回本地回环地址\n }\n }\n\n\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"获取局域网IP地址时出错: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n return \"127.0.0.1\";\n }\n }\n\n private void button3_Click(object sender, EventArgs e)\n {\n string 本地IP = GetLocalLANIP();\n try\n {\n // 构造URL\n string url = comboBox4.Text == \"Clash\" ? $\"http://{本地IP}:{numericUpDown7.Value}/api/file/mihomo\" : $\"http://{本地IP}:{numericUpDown7.Value}/download/sub\";\n\n // 将URL复制到剪贴板\n Clipboard.SetText(url);\n button3.Text = \"复制成功\";\n timer2.Enabled = true;\n // 可选:显示提示消息\n //MessageBox.Show($\"URL已复制到剪贴板:\\n{url}\", \"复制成功\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"复制到剪贴板时出错:{ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n private void timer2_Tick(object sender, EventArgs e)\n {\n button3.Text = \"复制订阅\";\n }\n\n private void comboBox3_Leave(object sender, EventArgs e)\n {\n // 检查是否有内容\n if (string.IsNullOrWhiteSpace(comboBox3.Text)) \n {\n comboBox3.Text = \"自动选择\";\n return;\n }\n\n string input = comboBox3.Text.Trim();\n\n // 检查是否存在 \"://\" 协议部分\n int protocolIndex = input.IndexOf(\"://\");\n if (protocolIndex >= 0)\n {\n // 保留 \"://\" 之后的内容\n input = input.Substring(protocolIndex + 3);\n }\n\n // 检查是否存在 \"/\" 路径部分\n int pathIndex = input.IndexOf('/');\n if (pathIndex >= 0)\n {\n // 只保留 \"/\" 之前的域名部分\n input = input.Substring(0, pathIndex);\n }\n\n // 更新 comboBox3 的文本\n comboBox3.Text = input;\n }\n\n private void 判断保存类型()\n {\n if (comboBox1.Text == \"本地\" || button2.Text == \"高级设置∨\")\n {\n groupBox4.Visible = false;\n groupBox5.Visible = false;\n groupBox6.Visible = false;\n }\n else if (comboBox1.Text == \"gist\" && button2.Text == \"高级设置∧\")\n {\n groupBox4.Visible = true;\n\n groupBox5.Visible = false;\n groupBox6.Visible = false;\n }\n else if (comboBox1.Text == \"r2\" && button2.Text == \"高级设置∧\")\n {\n groupBox5.Location = groupBox4.Location;\n groupBox5.Visible = true;\n\n groupBox4.Visible = false;\n groupBox6.Visible = false;\n }\n else if (comboBox1.Text == \"webdav\" && button2.Text == \"高级设置∧\")\n {\n groupBox6.Location = groupBox4.Location;\n groupBox6.Visible = true;\n\n groupBox4.Visible = false;\n groupBox5.Visible = false;\n }\n }\n\n private void comboBox1_TextChanged(object sender, EventArgs e)\n {\n 判断保存类型();\n if(!(comboBox1.Text == \"本地\" || comboBox1.Text == \"\") && button2.Text == \"高级设置∨\") button2_Click(sender, e);\n }\n\n private void textBox3_Enter(object sender, EventArgs e)\n {\n textBox3.PasswordChar = '\\0';\n textBox6.PasswordChar = '\\0';\n textBox8.PasswordChar = '\\0';\n }\n\n private void textBox3_Leave(object sender, EventArgs e)\n {\n textBox3.PasswordChar = '*';\n textBox6.PasswordChar = '*';\n textBox8.PasswordChar = '*';\n }\n\n private void textBox10_Enter(object sender, EventArgs e)\n {\n textBox10.PasswordChar = '\\0';\n if (textBox10.Text == \"请输入密钥\")\n {\n textBox10.Text = \"\";\n textBox10.ForeColor = Color.Black;\n }\n }\n\n private void textBox10_Leave(object sender, EventArgs e)\n {\n \n if (textBox10.Text == \"\")\n {\n textBox10.PasswordChar = '\\0';\n textBox10.Text = \"请输入密钥\";\n textBox10.ForeColor = Color.Gray;\n }\n else\n {\n textBox10.ForeColor = Color.Black;\n textBox10.PasswordChar = '*';\n }\n }\n\n private void textBox7_Leave(object sender, EventArgs e)\n {\n // 检查是否有内容\n if (string.IsNullOrWhiteSpace(textBox7.Text))\n return;\n\n string input = textBox7.Text.Trim();\n\n try\n {\n // 尝试解析为 URI\n Uri uri = new Uri(input);\n\n // 构建基础 URL (scheme + authority)\n string baseUrl = $\"{uri.Scheme}://{uri.Authority}\";\n\n // 更新 textBox7 的文本为基础 URL\n textBox7.Text = baseUrl;\n }\n catch (UriFormatException)\n {\n // 如果输入的不是有效 URI,尝试使用简单的字符串处理\n // 查找双斜杠后的第一个斜杠\n int schemeIndex = input.IndexOf(\"://\");\n if (schemeIndex >= 0)\n {\n int pathStartIndex = input.IndexOf('/', schemeIndex + 3);\n if (pathStartIndex >= 0)\n {\n // 截取到路径开始之前\n textBox7.Text = input.Substring(0, pathStartIndex);\n }\n }\n }\n }\n\n private void Log(string message, bool isError = false)\n {\n string timestamp = DateTime.Now.ToString(\"yyyy-MM-dd HH:mm:ss\");\n string logType = isError ? \"ERR\" : \"INF\";\n richTextBox1.AppendText($\"{timestamp} {logType} {message}\\r\\n\");\n\n if (richTextBox1.IsHandleCreated)\n {\n richTextBox1.BeginInvoke((MethodInvoker)(() =>\n {\n // 滚动到最底部\n richTextBox1.SelectionStart = richTextBox1.Text.Length;\n richTextBox1.ScrollToCaret();\n }));\n }\n }\n\n private void 恢复窗口()\n {\n // 首先显示窗体\n this.Show();\n\n // 强制停止当前布局逻辑\n this.SuspendLayout();\n\n // 恢复窗口状态\n this.WindowState = FormWindowState.Normal;\n\n // 强制重新布局\n this.ResumeLayout(true); // 参数true表示立即执行布局\n\n // 调用刷新布局的方法\n this.PerformLayout();\n\n // 处理WindowsForms消息队列中的所有挂起消息\n Application.DoEvents();\n\n // 激活窗口(使其获得焦点)\n this.Activate();\n }\n\n private void 隐藏窗口()\n {\n // 隐藏窗体(从任务栏消失)\n this.Hide();\n\n // 确保通知图标可见\n notifyIcon1.Visible = true;\n\n // 可选:显示气泡提示\n notifyIcon1.ShowBalloonTip(1000, \"SubsCheck\", \"程序已最小化到系统托盘\", ToolTipIcon.Info);\n }\n\n private void notifyIcon1_MouseClick(object sender, MouseEventArgs e)\n {\n if (e.Button == MouseButtons.Left)\n {\n // 检查窗口是否可见\n if (this.Visible)\n {\n // 如果窗口当前可见,则隐藏窗口\n 隐藏窗口();\n }\n else\n {\n // 如果窗口当前不可见,则恢复窗口\n 恢复窗口();\n }\n }\n }\n\n // 创建专用方法用于异步检测GitHub代理\n private async Task DetectGitHubProxyAsync(List proxyItems)\n {\n bool proxyFound = false;\n string detectedProxyURL = \"\";\n\n Log(\"检测可用 GitHub 代理...\");\n\n // 遍历随机排序后的代理列表\n foreach (string proxyItem in proxyItems)\n {\n string checkUrl = $\"https://{proxyItem}/https://raw.githubusercontent.com/cmliu/SubsCheck-Win-GUI/master/packages.config\";\n Log($\"正在测试 GitHub 代理: {proxyItem}\");\n richTextBox1.Refresh();\n\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); // 设置5秒超时\n // 添加User-Agent头,避免被拒绝访问\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n\n // 使用异步方式\n HttpResponseMessage response = await client.GetAsync(checkUrl);\n if (response.IsSuccessStatusCode)\n {\n // 找到可用代理\n detectedProxyURL = $\"https://{proxyItem}/\";\n Log($\"找到可用 GitHub 代理: {proxyItem}\");\n proxyFound = true;\n break;\n }\n }\n }\n catch (Exception ex)\n {\n // 记录错误但继续尝试下一个\n Log($\"代理 {proxyItem} 测试失败: {ex.Message}\", true);\n richTextBox1.Refresh();\n }\n }\n\n // 如果没有找到可用的代理\n if (!proxyFound)\n {\n Log(\"未找到可用的 GitHub 代理,请在高级设置中手动设置。\", true);\n MessageBox.Show(\"未找到可用的 GitHub 代理。\\n\\n请打开高级设置手动填入一个可用的Github Proxy,或检查您的网络连接。\",\n \"代理检测失败\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Warning);\n }\n\n return detectedProxyURL;\n }\n\n private async void button5_Click(object sender, EventArgs e)\n {\n try\n {\n button5.Enabled = false;\n button1.Enabled = false;\n // 清空日志\n richTextBox1.Clear();\n Log(\"开始检查和下载最新版本的 subs-check.exe...\");\n\n // 获取当前应用程序目录\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n string subsCheckPath = Path.Combine(executablePath, \"subs-check.exe\");\n\n // 检查文件是否存在\n if (File.Exists(subsCheckPath))\n {\n Log($\"发现 subs-check.exe,正在删除...\");\n\n try\n {\n // 首先检查是否有进程正在运行\n Process[] processes = Process.GetProcessesByName(\"subs-check\");\n if (processes.Length > 0)\n {\n Log(\"发现正在运行的 subs-check.exe 进程,正在强制结束...\");\n foreach (Process process in processes)\n {\n try\n {\n process.Kill();\n process.WaitForExit();\n Log($\"成功结束 subs-check.exe 进程(ID: {process.Id})\");\n }\n catch (Exception ex)\n {\n Log($\"结束进程时出错(ID: {process.Id}): {ex.Message}\", true);\n }\n }\n }\n\n // 删除文件\n File.Delete(subsCheckPath);\n Log(\"成功删除旧版本 subs-check.exe\");\n }\n catch (Exception ex)\n {\n Log($\"删除 subs-check.exe 时出错: {ex.Message}\", true);\n MessageBox.Show($\"无法删除现有的 subs-check.exe 文件: {ex.Message}\\n\\n请手动删除后重试,或者检查文件是否被其他程序占用。\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n button5.Enabled = true;\n return;\n }\n }\n else\n {\n Log(\"未找到现有的 subs-check.exe 文件,将直接下载最新版本\");\n }\n\n // 检测可用的 GitHub 代理\n if (!string.IsNullOrEmpty(comboBox3.Text) && comboBox3.Text == \"自动选择\")\n {\n // 创建不包含\"自动选择\"的代理列表\n List proxyItems = new List();\n for (int j = 0; j < comboBox3.Items.Count; j++)\n {\n string proxyItem = comboBox3.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n\n // 随机打乱列表顺序\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n\n // 异步检测可用代理\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n\n // 如果未能找到可用代理,提示用户\n if (string.IsNullOrEmpty(githubProxyURL))\n {\n Log(\"未能找到可用的 GitHub 代理,下载可能会失败\", true);\n }\n }\n else if (!string.IsNullOrEmpty(comboBox3.Text))\n {\n githubProxyURL = $\"https://{comboBox3.Text}/\";\n Log($\"使用指定的 GitHub 代理: {comboBox3.Text}\");\n }\n else\n {\n Log(\"未设置 GitHub 代理,将尝试直接下载\", true);\n }\n\n // 下载最新版本的 subs-check.exe\n await DownloadSubsCheckEXE();\n\n // 完成\n Log(\"内核更新完成!\");\n }\n catch (Exception ex)\n {\n Log($\"操作过程中出错: {ex.Message}\", true);\n MessageBox.Show($\"处理过程中出现错误: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n finally\n {\n button5.Enabled = true;\n button1.Enabled = true;\n }\n }\n\n private decimal 订阅端口;\n private decimal SubStore端口;\n private void numericUpDown6_ValueChanged(object sender, EventArgs e)\n {\n // 检查numericUpDown7是否存在并且与numericUpDown6的值相等\n if (numericUpDown6.Value == numericUpDown7.Value)\n {\n // 显示警告消息\n MessageBox.Show(\"订阅端口 和 Sub-Store端口 不能相同!\",\n \"端口冲突\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Warning);\n\n // 将numericUpDown6的值恢复为更改前的值\n numericUpDown6.Value = 订阅端口;\n numericUpDown7.Value = SubStore端口;\n }\n else\n {\n // 保存当前值作为下次比较的基准\n 订阅端口 = numericUpDown6.Value;\n SubStore端口 = numericUpDown7.Value;\n }\n }\n\n /// \n /// 异步检测并强制终止所有程序目录下的output\\node.exe进程\n /// \n private async Task KillNodeProcessAsync()\n {\n try\n {\n Log(\"检查 node.exe 进程状态...\");\n\n // 获取当前应用程序的执行目录\n string executablePath = Path.GetDirectoryName(Application.ExecutablePath);\n string nodeExePath = Path.Combine(executablePath, \"output\", \"node.exe\");\n\n // 获取所有node.exe进程\n Process[] nodeProcesses = Process.GetProcessesByName(\"node\");\n\n if (nodeProcesses.Length == 0)\n {\n Log(\"未发现运行中的 node.exe 进程\");\n return;\n }\n\n Log($\"发现 {nodeProcesses.Length} 个 node.exe 进程,开始检查并终止匹配路径的进程...\");\n\n int terminatedCount = 0;\n\n foreach (Process process in nodeProcesses)\n {\n try\n {\n // 使用Task.Run将可能耗时的操作放在后台线程执行\n string processPath = await Task.Run(() => {\n try\n {\n return process.MainModule?.FileName;\n }\n catch (Exception)\n {\n return null;\n }\n });\n\n // 检查是否匹配我们要查找的node.exe路径\n if (!string.IsNullOrEmpty(processPath) &&\n processPath.Equals(nodeExePath, StringComparison.OrdinalIgnoreCase))\n {\n // 找到匹配的进程,终止它\n Log($\"发现匹配路径的 node.exe 进程(ID: {process.Id}),正在强制结束...\");\n\n await Task.Run(() => {\n process.Kill();\n process.WaitForExit();\n });\n\n Log($\"成功结束 node.exe 进程(ID: {process.Id})\");\n terminatedCount++;\n }\n }\n catch (Exception ex)\n {\n // 访问进程信息时可能会因为权限问题抛出异常\n Log($\"访问或终止进程(ID: {process.Id})时出错: {ex.Message}\", true);\n }\n }\n\n if (terminatedCount > 0)\n {\n Log($\"总共终止了 {terminatedCount} 个匹配路径的 node.exe 进程\");\n }\n else\n {\n Log(\"未发现需要终止的 node.exe 进程\");\n }\n }\n catch (Exception ex)\n {\n Log($\"检查或终止 node.exe 进程时出错: {ex.Message}\", true);\n }\n }\n\n private async void textBox1_DoubleClick(object sender, EventArgs e)\n {\n if (textBox1.Enabled)\n {\n // 创建EditURLs窗口的实例\n EditURLs editURLsForm = new EditURLs();\n\n // 传递当前textBox1的内容到EditURLs窗口\n editURLsForm.UrlContent = textBox1.Text + \"\\n\";\n editURLsForm.githubProxys = comboBox3.Items;\n editURLsForm.githubProxy = comboBox3.Text;\n // 显示对话框并等待结果\n DialogResult result = editURLsForm.ShowDialog();\n\n // 如果用户点击了\"保存并关闭\"按钮(返回DialogResult.OK)\n if (result == DialogResult.OK)\n {\n // 获取编辑后的内容,按行拆分,过滤空行\n string[] lines = editURLsForm.UrlContent.Split(\n new[] { \"\\r\\n\", \"\\r\", \"\\n\" },\n StringSplitOptions.RemoveEmptyEntries);\n\n // 去除每行首尾的空白字符\n for (int i = 0; i < lines.Length; i++)\n {\n lines[i] = lines[i].Trim();\n }\n\n // 再次过滤掉空行\n lines = lines.Where(line => !string.IsNullOrWhiteSpace(line)).ToArray();\n\n // 将处理后的内容更新到Form1的textBox1\n textBox1.Text = string.Join(Environment.NewLine, lines);\n await SaveConfig(false);\n Log(\"已保存订阅地址列表。\");\n }\n }\n\n }\n\n private void checkBox1_CheckedChanged(object sender, EventArgs e)\n {\n if (checkBox1.Checked == false) checkBox2.Checked = false;\n }\n\n private void checkBox2_CheckedChanged(object sender, EventArgs e)\n {\n if (checkBox2.Checked == true) checkBox1.Checked = true;\n }\n\n private async void timer3_Tick(object sender, EventArgs e)\n {\n if (button1.Text == \"⏹️ 停止\") \n {\n Log(\"subs-check.exe 运行时满24小时,自动重启清理内存占用。\");\n // 停止 subs-check.exe 程序\n StopSubsCheckProcess();\n // 结束 Sub-Store\n await KillNodeProcessAsync();\n // 重新启动 subs-check.exe 程序\n StartSubsCheckProcess();\n numericUpDown1.Enabled = false;\n numericUpDown2.Enabled = false;\n numericUpDown3.Enabled = false;\n numericUpDown4.Enabled = false;\n numericUpDown5.Enabled = false;\n numericUpDown6.Enabled = false;\n numericUpDown7.Enabled = false;\n comboBox1.Enabled = false;\n textBox1.Enabled = false;\n groupBox3.Enabled = false;\n groupBox4.Enabled = false;\n groupBox5.Enabled = false;\n groupBox6.Enabled = false;\n button1.Text = \"⏹️ 停止\";\n }\n }\n\n private void button4_Click(object sender, EventArgs e)\n {\n // 创建 CheckUpdates 窗口实例\n CheckUpdates checkUpdatesForm = new CheckUpdates();\n\n // 传递必要的数据和状态\n checkUpdatesForm.githubProxys = comboBox3.Items;\n checkUpdatesForm.githubProxy = comboBox3.Text;\n\n checkUpdatesForm.当前subsCheck版本号 = 当前subsCheck版本号;\n checkUpdatesForm.当前GUI版本号 = 当前GUI版本号;\n checkUpdatesForm.最新GUI版本号 = 最新GUI版本号;\n\n // 为 CheckUpdates 的 button2 添加点击事件处理程序\n checkUpdatesForm.FormClosed += (s, args) => {\n // 移除事件处理,避免内存泄漏\n if (checkUpdatesForm.DialogResult == DialogResult.OK)\n {\n // 如果返回OK结果,表示按钮被点击并需要更新内核\n button5_Click(this, EventArgs.Empty);\n }\n };\n\n // 设置 button2 点击后关闭窗口并返回 DialogResult.OK\n // 这需要在 CheckUpdates.cs 中修改 button2_Click 方法\n\n // 显示 CheckUpdates 窗口\n checkUpdatesForm.ShowDialog();\n }\n\n private void checkBox3_CheckedChanged(object sender, EventArgs e)\n {\n if (checkBox3.Checked) numericUpDown8.Enabled = true;\n else numericUpDown8.Enabled = false;\n }\n\n private async void comboBox5_SelectedIndexChanged(object sender, EventArgs e)\n {\n if (comboBox5.Text.Contains(\"[内置]\")) await ProcessComboBox5Selection(true);\n }\n\n private async Task ProcessComboBox5Selection(bool 汇报Log = false)\n {\n // 确定文件名和下载URL\n string fileName;\n string downloadFilePath;\n string downloadUrl;\n string displayName;\n string executablePath = Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n if (comboBox5.Text.Contains(\"[内置]布丁狗\"))\n {\n fileName = \"bdg.yaml\";\n displayName = \"[内置]布丁狗的订阅转换\";\n downloadUrl = \"https://raw.githubusercontent.com/cmliu/ACL4SSR/main/yaml/bdg.yaml\";\n }\n else // [内置]ACL4SSR\n {\n fileName = \"ACL4SSR_Online_Full.yaml\";\n displayName = \"[内置]ACL4SSR_Online_Full\";\n downloadUrl = \"https://raw.githubusercontent.com/beck-8/override-hub/main/yaml/ACL4SSR_Online_Full.yaml\";\n }\n\n // 确保output文件夹存在\n string outputFolderPath = Path.Combine(executablePath, \"output\");\n if (!Directory.Exists(outputFolderPath))\n {\n Directory.CreateDirectory(outputFolderPath);\n }\n\n // 确定文件完整路径\n downloadFilePath = Path.Combine(outputFolderPath, fileName);\n\n // 检查文件是否存在\n if (!File.Exists(downloadFilePath))\n {\n Log($\"{displayName} 覆写配置文件 未找到,正在下载...\");\n\n // 重置进度条\n progressBar1.Value = 0;\n\n // 添加GitHub代理前缀如果有\n string fullDownloadUrl = githubProxyURL + downloadUrl;\n\n try\n {\n // 创建不使用系统代理的HttpClientHandler\n using (HttpClientHandler handler = new HttpClientHandler { UseProxy = false, Proxy = null })\n using (HttpClient client = new HttpClient(handler))\n {\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n client.Timeout = TimeSpan.FromSeconds(15); // 设置15秒超时\n\n // 先获取文件大小\n HttpResponseMessage headResponse = await client.SendAsync(new HttpRequestMessage(HttpMethod.Head, fullDownloadUrl));\n long totalBytes = headResponse.Content.Headers.ContentLength ?? 0;\n\n // 如果无法获取文件大小,显示不确定进度\n if (totalBytes == 0)\n {\n Console.WriteLine($\"无法获取 {displayName} 文件大小,将显示不确定进度\");\n }\n\n // 创建下载请求并获取响应流\n using (var response = await client.GetAsync(fullDownloadUrl, HttpCompletionOption.ResponseHeadersRead))\n {\n if (response.IsSuccessStatusCode)\n {\n using (var contentStream = await response.Content.ReadAsStreamAsync())\n using (var fileStream = new FileStream(downloadFilePath, FileMode.Create, FileAccess.Write, FileShare.None, 8192, true))\n {\n byte[] buffer = new byte[8192];\n long totalBytesRead = 0;\n int bytesRead;\n\n while ((bytesRead = await contentStream.ReadAsync(buffer, 0, buffer.Length)) > 0)\n {\n await fileStream.WriteAsync(buffer, 0, bytesRead);\n totalBytesRead += bytesRead;\n\n // 更新进度条\n if (totalBytes > 0)\n {\n int progressPercentage = (int)((totalBytesRead * 100) / totalBytes);\n // 确保进度值在有效范围内 (0-100)\n progressPercentage = Math.Min(100, Math.Max(0, progressPercentage));\n progressBar1.Value = progressPercentage;\n }\n }\n\n // 确保进度条显示100%\n progressBar1.Value = 100;\n }\n\n Log($\"{displayName} 覆写配置文件 下载成功\");\n }\n else\n {\n Log($\"{displayName} 覆写配置文件 下载失败: HTTP {(int)response.StatusCode} {response.ReasonPhrase}\", true);\n }\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"{displayName} 覆写配置文件 下载失败: {ex.Message}\", true);\n // 出错时重置进度条\n progressBar1.Value = 0;\n }\n }\n else\n {\n if (汇报Log) Log($\"{displayName} 覆写配置文件 已就绪。\");\n }\n }\n\n private void numericUpDown1_ValueChanged(object sender, EventArgs e)\n {\n if (numericUpDown1.Value > 128)\n {\n string warningMessage =\n \"⚠️ 高并发风险提醒 ⚠️\\n\\n\" +\n \"您设置的并发数值过高,可能导致:\\n\\n\" +\n \"• 运营商判定为异常流量并限制网络\\n\" +\n \"• 路由器性能压力过大\\n\" +\n \"• 测速结果不准确\\n\\n\" +\n \"并发数设置建议:\\n\" +\n \"• 宽带峰值/50Mbps:一般对网络无影响\\n\" +\n \"• 宽带峰值/25Mbps:可能会影响同网络下载任务\\n\" +\n \"• 宽带峰值/10Mbps:可能会影响同网络下其他设备的上网体验\\n\";\n\n Log(warningMessage);\n }\n }\n\n private void checkBox4_CheckedChanged(object sender, EventArgs e)\n {\n if(checkBox4.Checked) textBox10.Enabled = true;\n else textBox10.Enabled = false;\n }\n\n private void button6_Click(object sender, EventArgs e)\n {\n string 本地IP = GetLocalLANIP();\n try\n {\n // 构造URL\n string url = $\"http://{本地IP}:{numericUpDown6.Value}/admin\";\n\n // 使用系统默认浏览器打开URL\n System.Diagnostics.Process.Start(url);\n\n Log($\"正在浏览器中打开 Subs-Check 配置管理: {url}\");\n }\n catch (Exception ex)\n {\n Log($\"打开浏览器失败: {ex.Message}\", true);\n MessageBox.Show($\"打开浏览器时出错: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n /// \n /// 获取API状态信息并返回包含6个元素的字符串数组\n /// \n /// \n /// 包含6个元素的字符串数组:\n /// [0] - 状态类型 (\"checking\"/\"idle\"/\"error\")\n /// [1] - 状态图标类别 (\"primary\"/\"success\"/\"danger\")\n /// [2] - 状态文本 (\"正在检测中...\"/\"空闲\"/\"获取状态失败\")\n /// [3] - 节点总数 (proxyCount或\"N/A\")\n /// [4] - 进度百分比 (progress或\"N/A\")\n /// [5] - 可用节点数量 (available或\"N/A\")\n /// \n private async Task GetApiStatusAsync()\n {\n string[] resultArray = new string[6];\n string baseUrl = $\"http://127.0.0.1:{numericUpDown6.Value}\";\n\n try\n {\n using (HttpClient client = new HttpClient())\n {\n // 设置基础URL\n client.BaseAddress = new Uri(baseUrl);\n\n // 添加API密钥请求头\n client.DefaultRequestHeaders.Add(\"X-API-Key\", WebUIapiKey);\n\n // 设置超时时间\n client.Timeout = TimeSpan.FromSeconds(5);\n\n // 发送请求\n HttpResponseMessage response = await client.GetAsync(\"/api/status\");\n\n // 检查响应状态\n if (response.IsSuccessStatusCode)\n {\n // 读取响应内容\n string content = await response.Content.ReadAsStringAsync();\n\n // 解析JSON\n JObject data = JObject.Parse(content);\n\n if (data[\"checking\"] != null && data[\"checking\"].Value())\n {\n // 正在检测状态\n resultArray[0] = \"checking\";\n resultArray[1] = \"primary\";\n resultArray[2] = \"正在检测中...\";\n\n // 提取节点数据\n resultArray[3] = data[\"proxyCount\"]?.ToString() ?? \"0\";\n resultArray[4] = data[\"progress\"]?.ToString() ?? \"0\";\n resultArray[5] = data[\"available\"]?.ToString() ?? \"0\";\n }\n else\n {\n // 空闲状态\n resultArray[0] = \"idle\";\n resultArray[1] = \"success\";\n resultArray[2] = \"空闲\";\n\n // 空闲时相关数据设为N/A\n resultArray[3] = \"N/A\";\n resultArray[4] = \"N/A\";\n resultArray[5] = \"N/A\";\n }\n }\n else\n {\n // 请求失败,例如未授权\n resultArray[0] = \"error\";\n resultArray[1] = \"danger\";\n resultArray[2] = $\"API请求失败: {(int)response.StatusCode}\";\n resultArray[3] = \"N/A\";\n resultArray[4] = \"N/A\";\n resultArray[5] = \"N/A\";\n }\n }\n }\n catch (Exception ex)\n {\n // 发生异常\n resultArray[0] = \"error\";\n resultArray[1] = \"danger\";\n resultArray[2] = $\"获取状态失败: {ex.Message}\";\n resultArray[3] = \"N/A\";\n resultArray[4] = \"N/A\";\n resultArray[5] = \"N/A\";\n\n // 可选:记录错误到日志\n Log($\"获取API状态失败: {ex.Message}\", true);\n }\n\n return resultArray;\n }\n\n private async void timer4_Tick(object sender, EventArgs e)\n {\n //if (!button7.Enabled) button7.Enabled = true;\n string[] subscheck状态 = await GetApiStatusAsync();\n string 状态类型 = subscheck状态[0];\n string 状态图标类别 = subscheck状态[1];\n string 状态文本 = subscheck状态[2];\n string 节点总数 = subscheck状态[3];\n string 进度百分比 = subscheck状态[4];\n string 可用节点数量 = subscheck状态[5];\n // 更新状态文本\n\n if (状态类型 == \"checking\")\n {\n button7.Text = \"⏸️ 暂停\";\n nodeInfo = $\"({进度百分比}/{节点总数}) 可用: {可用节点数量}\";\n int nodeTotal = int.Parse(节点总数);\n if (nodeTotal > 0) {\n int 进度条百分比 = int.Parse(进度百分比) * 100 / nodeTotal;\n progressBar1.Value = 进度条百分比;\n if (!button7.Enabled) button7.Enabled = true;\n }\n \n // 确保通知图标文本不超过63个字符\n string notifyText = \"SubsCheck: \" + nodeInfo;\n if (notifyText.Length > 63)\n {\n notifyText = notifyText.Substring(0, 60) + \"...\";\n }\n notifyIcon1.Text = notifyText;\n textBox1.Enabled = false;\n }\n else if (状态类型 == \"idle\")\n {\n button7.Text = \"⏯️ 开始\";\n progressBar1.Value = 100;\n nodeInfo = $\"等待{nextCheckTime}\";\n notifyIcon1.Text = \"SubsCheck: 已就绪\\n\" + nextCheckTime; ;\n textBox1.Enabled = true;\n }\n else if (状态类型 == \"error\")\n {\n button7.Text = \"🔀 未知\";\n nodeInfo = 状态文本;\n }\n groupBox2.Text = $\"实时日志 {nodeInfo}\";\n }\n\n private async void button7_Click(object sender, EventArgs e)\n {\n button7.Enabled = false;\n timer4.Enabled = false;\n\n try\n {\n bool isSuccess;\n\n if (button7.Text == \"⏯️ 开始\")\n {\n isSuccess = await SendApiRequestAsync(\"/api/trigger-check\", \"节点检查\");\n if (isSuccess)\n {\n button7.Text = \"⏸️ 暂停\";\n textBox1.Enabled = false; // 检查开始后禁用订阅编辑\n }\n }\n else // \"⏸️ 暂停\"\n {\n isSuccess = await SendApiRequestAsync(\"/api/force-close\", \"强制关闭\");\n }\n\n // 如果请求失败,更新按钮状态为未知\n if (!isSuccess) button7.Text = \"🔀 未知\";\n }\n finally\n {\n // 无论成功失败都重新启用定时器和按钮\n timer4.Enabled = true;\n timer4.Start();\n //button7.Enabled = true;\n }\n }\n\n /// \n /// 发送API请求到SubsCheck服务\n /// \n /// API端点路径\n /// 操作名称(用于日志)\n /// 操作是否成功\n private async Task SendApiRequestAsync(string endpoint, string operationName)\n {\n try\n {\n // 获取API基础地址和API密钥\n string baseUrl = $\"http://127.0.0.1:{numericUpDown6.Value}\";\n\n using (HttpClient client = new HttpClient())\n {\n client.BaseAddress = new Uri(baseUrl);\n client.DefaultRequestHeaders.Add(\"X-API-Key\", WebUIapiKey);\n client.Timeout = TimeSpan.FromSeconds(10);\n\n // 发送POST请求\n HttpResponseMessage response = await client.PostAsync(endpoint, new StringContent(\"\"));\n\n // 检查响应状态\n if (response.IsSuccessStatusCode)\n {\n Log($\"成功{operationName}\");\n return true;\n }\n else\n {\n string errorContent = await response.Content.ReadAsStringAsync();\n Log($\"{operationName}失败: HTTP {(int)response.StatusCode} {response.ReasonPhrase}\\n{errorContent}\", true);\n return false;\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"{operationName}时发生错误: {ex.Message}\", true);\n return false;\n }\n }\n\n private void textBox11_Leave(object sender, EventArgs e)\n {\n if (IsValidCronExpression(textBox11.Text))\n {\n // 计算并显示cron表达式的说明\n string cronDescription = GetCronExpressionDescription(textBox11.Text);\n // 可以用工具提示或者消息框显示,这里使用消息框\n //MessageBox.Show(cronDescription, \"Cron表达式说明\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n Log($\"Cron表达式说明 {cronDescription}\");\n }\n else\n {\n MessageBox.Show(\"请输入有效的cron表达式,例如:*/30 * * * *\", \"无效的cron表达式\",\n MessageBoxButtons.OK, MessageBoxIcon.Warning);\n textBox11.Focus();\n textBox11.Text = \"0 */2 * * *\"; // 恢复默认值\n }\n }\n\n /// \n /// 验证输入文本是否是合法的cron表达式\n /// \n /// 如果是合法的cron表达式,则返回true;否则返回false\n private bool IsValidCronExpression(string cron表达式)\n {\n string cronExpression = cron表达式.Trim();\n\n // 如果是空字符串,则不是有效表达式\n if (string.IsNullOrWhiteSpace(cronExpression))\n return false;\n\n // 分割cron表达式为5个部分:分钟 小时 日期 月份 星期\n string[] parts = cronExpression.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n\n // cron表达式必须有5个部分\n if (parts.Length != 5)\n return false;\n\n try\n {\n // 验证每个部分\n // 分钟 (0-59)\n if (!IsValidCronField(parts[0], 0, 59))\n return false;\n\n // 小时 (0-23)\n if (!IsValidCronField(parts[1], 0, 23))\n return false;\n\n // 日期 (1-31)\n if (!IsValidCronField(parts[2], 1, 31))\n return false;\n\n // 月份 (1-12)\n if (!IsValidCronField(parts[3], 1, 12))\n return false;\n\n // 星期 (0-7,0和7都表示星期日)\n if (!IsValidCronField(parts[4], 0, 7))\n return false;\n\n return true;\n }\n catch\n {\n return false;\n }\n }\n\n /// \n /// 验证cron表达式中的单个字段是否合法\n /// \n /// 字段值\n /// 最小允许值\n /// 最大允许值\n /// 如果字段合法,则返回true;否则返回false\n private bool IsValidCronField(string field, int min, int max)\n {\n // 处理通配符 \"*\"\n if (field == \"*\")\n return true;\n\n // 处理步长 \"*/n\"\n if (field.StartsWith(\"*/\"))\n {\n string stepStr = field.Substring(2);\n if (int.TryParse(stepStr, out int step))\n return step > 0 && step <= max;\n return false;\n }\n\n // 处理范围 \"n-m\"\n if (field.Contains(\"-\"))\n {\n string[] range = field.Split('-');\n if (range.Length != 2)\n return false;\n\n if (int.TryParse(range[0], out int start) && int.TryParse(range[1], out int end))\n return start >= min && end <= max && start <= end;\n return false;\n }\n\n // 处理列表 \"n,m,k\"\n if (field.Contains(\",\"))\n {\n string[] values = field.Split(',');\n foreach (string item in values)\n {\n if (!int.TryParse(item, out int itemValue) || itemValue < min || itemValue > max)\n return false;\n }\n return true;\n }\n\n // 处理单个数字\n if (int.TryParse(field, out int fieldValue))\n return fieldValue >= min && fieldValue <= max;\n\n return false;\n }\n\n /// \n /// 获取cron表达式的友好文本说明\n /// \n /// 要解析的cron表达式\n /// 返回cron表达式的执行时间说明\n private string GetCronExpressionDescription(string cron表达式)\n {\n try\n {\n string cronExpression = cron表达式.Trim();\n string[] parts = cronExpression.Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);\n\n if (parts.Length != 5)\n return \"无效的cron表达式\";\n\n // 分别解析每个部分\n string minuteDesc = ParseCronPart(parts[0], \"分钟\", 0, 59);\n string hourDesc = ParseCronPart(parts[1], \"小时\", 0, 23);\n string dayDesc = ParseCronPart(parts[2], \"日\", 1, 31);\n string monthDesc = ParseCronPart(parts[3], \"月\", 1, 12);\n string weekDesc = ParseCronPart(parts[4], \"星期\", 0, 7, true);\n\n // 组合最终说明\n string description = \"执行时间: \";\n\n // 月份\n if (monthDesc != \"每月\")\n description += monthDesc + \"的\";\n\n // 星期与日期的关系\n if (parts[2] == \"*\" && parts[4] != \"*\")\n description += weekDesc + \"的\";\n else if (parts[2] != \"*\" && parts[4] == \"*\")\n description += dayDesc;\n else if (parts[2] != \"*\" && parts[4] != \"*\")\n description += $\"{dayDesc}或{weekDesc}\";\n else\n description += \"每天\";\n\n // 时间(小时:分钟)\n description += $\"{hourDesc}{minuteDesc}\";\n\n return description;\n }\n catch\n {\n return \"无法解析cron表达式\";\n }\n }\n\n /// \n /// 解析cron表达式的单个部分\n /// \n private string ParseCronPart(string part, string unit, int min, int max, bool isWeekday = false)\n {\n // 处理星号,表示每个时间单位\n if (part == \"*\")\n {\n return $\"每{unit}\";\n }\n\n // 处理步长 */n\n if (part.StartsWith(\"*/\"))\n {\n int step = int.Parse(part.Substring(2));\n return $\"每{step}{unit}\";\n }\n\n // 处理范围 n-m\n if (part.Contains(\"-\"))\n {\n string[] range = part.Split('-');\n int start = int.Parse(range[0]);\n int end = int.Parse(range[1]);\n\n if (isWeekday)\n {\n string[] weekdays = { \"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\", \"星期日\" };\n return $\"从{weekdays[start]}到{weekdays[end]}\";\n }\n\n return $\"从{start}{unit}到{end}{unit}\";\n }\n\n // 处理列表 n,m,k\n if (part.Contains(\",\"))\n {\n string[] values = part.Split(',');\n if (isWeekday)\n {\n string[] weekdays = { \"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\", \"星期日\" };\n return string.Join(\"、\", values.Select(v => weekdays[int.Parse(v)]));\n }\n return $\"{string.Join(\"、\", values)}{unit}\";\n }\n\n // 处理单个数字\n int value = int.Parse(part);\n if (isWeekday)\n {\n string[] weekdays = { \"星期日\", \"星期一\", \"星期二\", \"星期三\", \"星期四\", \"星期五\", \"星期六\", \"星期日\" };\n return weekdays[value];\n }\n return $\"{value}{unit}\";\n }\n\n private void 切换cron表达式(object sender, EventArgs e)\n {\n if (textBox11.Visible)\n {\n textBox11.Visible = false;\n label2.Visible = true;\n numericUpDown2.Visible = true;\n Log(\"下次检查时间间隔 使用分钟倒计时\");\n }\n else\n {\n textBox11.Location = new Point(9, 48);\n textBox11.Visible = true;\n label2.Visible = false;\n numericUpDown2.Visible = false;\n Log(\"下次检查时间间隔 使用cron表达式\");\n }\n }\n\n /// \n /// 获取计算机名的MD5哈希值\n /// \n /// 返回计算机名的MD5哈希字符串(32位小写)\n private string GetComputerNameMD5()\n {\n try\n {\n // 获取计算机名\n string computerName = System.Environment.MachineName;\n\n // 引入必要的命名空间\n using (System.Security.Cryptography.MD5 md5 = System.Security.Cryptography.MD5.Create())\n {\n // 将计算机名转换为字节数组\n byte[] inputBytes = System.Text.Encoding.UTF8.GetBytes(computerName);\n\n // 计算MD5哈希值\n byte[] hashBytes = md5.ComputeHash(inputBytes);\n\n // 将字节数组转换为十六进制字符串\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < hashBytes.Length; i++)\n {\n sb.Append(hashBytes[i].ToString(\"x2\"));\n }\n\n return sb.ToString();\n }\n }\n catch (Exception ex)\n {\n Log($\"计算计算机名MD5时出错: {ex.Message}\", true);\n return \"CMLiussss\";\n }\n }\n\n // 添加辅助下载方法\n async Task DownloadFileAsync(HttpClient httpClient, string url, string filePath)\n {\n try\n {\n // 获取文件大小\n HttpResponseMessage headResponse = await httpClient.SendAsync(new HttpRequestMessage(HttpMethod.Head, url));\n headResponse.EnsureSuccessStatusCode(); // 确保请求成功\n long totalBytes = headResponse.Content.Headers.ContentLength ?? 0;\n\n // 下载文件\n using (var response = await httpClient.GetAsync(url, HttpCompletionOption.ResponseHeadersRead))\n {\n response.EnsureSuccessStatusCode(); // 确保请求成功\n\n using (var contentStream = await response.Content.ReadAsStreamAsync())\n using (var fileStream = new FileStream(filePath, FileMode.Create, FileAccess.Write, FileShare.None, 8192, true))\n {\n byte[] buffer = new byte[8192];\n long totalBytesRead = 0;\n int bytesRead;\n\n while ((bytesRead = await contentStream.ReadAsync(buffer, 0, buffer.Length)) > 0)\n {\n await fileStream.WriteAsync(buffer, 0, bytesRead);\n totalBytesRead += bytesRead;\n\n // 更新进度条\n if (totalBytes > 0)\n {\n int progressPercentage = (int)((totalBytesRead * 100) / totalBytes);\n progressPercentage = Math.Min(100, Math.Max(0, progressPercentage));\n progressBar1.Value = progressPercentage;\n }\n }\n }\n }\n\n return true; // 下载成功\n }\n catch\n {\n throw; // 重新抛出异常,让调用者处理\n }\n }\n\n private static about aboutWindow = null;\n private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n // 检查窗口是否已经打开\n if (aboutWindow != null && !aboutWindow.IsDisposed)\n {\n // 窗口已经存在,激活它\n aboutWindow.Activate();\n return;\n }\n\n // 需要创建新窗口\n this.BeginInvoke(new Action(() =>\n {\n // 创建about窗口实例\n aboutWindow = new about();\n\n // 传递版本号信息\n aboutWindow.GuiVersion = 当前GUI版本号;\n aboutWindow.CoreVersion = 当前subsCheck版本号;\n\n // 添加窗口关闭时的处理,清除静态引用\n aboutWindow.FormClosed += (s, args) => aboutWindow = null;\n\n // 非模态显示窗口\n aboutWindow.Show(this);\n\n // 设置TopMost确保窗口显示在最前面\n aboutWindow.TopMost = true;\n }));\n }\n\n private void button8_Click(object sender, EventArgs e)\n {\n try\n {\n // 创建MoreYAML窗口实例\n MoreYAML moreYamlWindow = new MoreYAML();\n\n // 显示为模态对话框,这会阻塞主线程直到窗口关闭\n DialogResult result = moreYamlWindow.ShowDialog(this);\n\n // 如果需要,可以处理对话框的返回结果\n if (result == DialogResult.OK)\n {\n // 用户点击了\"确定\"或某种完成操作的按钮\n Log(\"补充参数配置已成功保存到 more.yaml 文件!设置已应用\");\n }\n }\n catch (Exception ex)\n {\n Log($\"打开MoreYAML窗口时出错: {ex.Message}\", true);\n MessageBox.Show($\"打开MoreYAML窗口时出错: {ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n private async void checkBox5_CheckedChanged(object sender, EventArgs e)\n {\n checkBox5.Enabled = false;\n try\n {\n // 获取当前应用程序的可执行文件路径\n string appPath = Application.ExecutablePath;\n // 获取应用程序名称(不包含扩展名)\n string appName = Path.GetFileNameWithoutExtension(appPath);\n // 获取启动文件夹的路径\n string startupFolderPath = Environment.GetFolderPath(Environment.SpecialFolder.Startup);\n // 快捷方式文件的完整路径\n string shortcutPath = Path.Combine(startupFolderPath, $\"{appName}.lnk\");\n\n if (checkBox5.Checked)\n {\n // 检查启动文件夹中是否已存在该快捷方式\n if (File.Exists(shortcutPath))\n {\n Log(\"开机启动项已存在,无需重复创建\");\n }\n else\n {\n // 创建快捷方式\n CreateShortcut(appPath, shortcutPath, \"-auto\");\n Log(\"已成功创建开机启动项,下次电脑启动时将自动运行程序\");\n }\n }\n else\n {\n // 删除启动项\n if (File.Exists(shortcutPath))\n {\n File.Delete(shortcutPath);\n Log(\"已移除开机启动项,下次开机将不会自动启动\");\n }\n }\n }\n catch (Exception ex)\n {\n Log($\"设置开机启动项时出错: {ex.Message}\", true);\n MessageBox.Show($\"设置开机启动项失败: {ex.Message}\", \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n\n // 恢复CheckBox状态,避免UI状态与实际状态不一致\n checkBox5.CheckedChanged -= checkBox5_CheckedChanged;\n checkBox5.Checked = !checkBox5.Checked;\n checkBox5.CheckedChanged += checkBox5_CheckedChanged;\n }\n checkBox5.Enabled = true;\n await SaveConfig(false);\n }\n\n /// \n /// 创建指向指定路径应用程序的快捷方式\n /// \n /// 目标应用程序的完整路径\n /// 要创建的快捷方式的完整路径\n /// 可选的启动参数\n private void CreateShortcut(string targetPath, string shortcutPath, string arguments = \"\")\n {\n // 使用COM接口创建快捷方式\n Type t = Type.GetTypeFromProgID(\"WScript.Shell\");\n dynamic shell = Activator.CreateInstance(t);\n var shortcut = shell.CreateShortcut(shortcutPath);\n\n shortcut.TargetPath = targetPath;\n if (!string.IsNullOrEmpty(arguments))\n shortcut.Arguments = arguments; // 设置启动参数\n\n shortcut.WorkingDirectory = Path.GetDirectoryName(targetPath);\n shortcut.WindowStyle = 7; // 最小化启动: 7, 正常启动: 1, 最大化启动: 3\n shortcut.Description = \"SubsCheck Win GUI自启动快捷方式\";\n shortcut.IconLocation = targetPath + \",0\"; // 使用应用程序自身的图标\n\n // 保存快捷方式\n shortcut.Save();\n\n // 释放COM对象\n System.Runtime.InteropServices.Marshal.FinalReleaseComObject(shortcut);\n System.Runtime.InteropServices.Marshal.FinalReleaseComObject(shell);\n }\n\n /// \n /// 检查启动参数中是否包含指定的参数\n /// \n /// 要检查的参数名称,例如\"-autoup\"\n /// 如果存在指定参数,则返回true;否则返回false\n private bool CheckCommandLineParameter(string parameterName)\n {\n // 获取命令行参数数组\n string[] args = Environment.GetCommandLineArgs();\n\n // 遍历所有参数,检查是否有匹配的参数\n foreach (string arg in args)\n {\n // 不区分大小写比较\n if (string.Equals(arg, parameterName, StringComparison.OrdinalIgnoreCase))\n {\n return true;\n }\n }\n\n return false;\n }\n\n private void richTextBox1_DoubleClick(object sender, EventArgs e)\n {\n // 检查是否有日志内容\n if (richTextBox1.TextLength > 0)\n {\n // 显示确认对话框,询问用户是否要清空日志\n DialogResult result = MessageBox.Show(\n \"是否要清空当前日志?\",\n \"清空日志确认\",\n MessageBoxButtons.YesNo,\n MessageBoxIcon.Question,\n MessageBoxDefaultButton.Button2); // 默认选择\"否\"按钮\n\n if (result == DialogResult.Yes)\n {\n // 清空richTextBox1内容\n richTextBox1.Clear();\n // 记录一条清空日志的操作信息\n Log(\"日志已清空\");\n }\n }\n }\n\n private void numericUpDown4_ValueChanged(object sender, EventArgs e)\n {\n if (numericUpDown4.Value > 4096)\n {\n string warningMessage =\n \"⚠️ 测速下限设置提醒 ⚠️\\n\\n\" +\n \"您设置的测速下限值过高,可能导致:\\n\\n\" +\n \"• 可用节点数量显著减少\\n\" +\n \"• 部分低速但稳定的节点被过滤\\n\" +\n \"测速下限设置建议:\\n\" +\n \"• 日常浏览:512-1024 KB/s\\n\" +\n \"• 视频观看:1024-2048 KB/s\\n\" +\n \"• 大文件下载:根据实际需求设置\\n\";\n\n Log(warningMessage);\n }\n }\n\n private void numericUpDown3_ValueChanged(object sender, EventArgs e)\n {\n if (numericUpDown3.Value < 5000)\n {\n string warningMessage =\n \"⚠️ 超时时间设置提醒 ⚠️\\n\\n\" +\n \"该超时时间并非延迟时间,除非您的网络极其优秀,否则超时时间过低会导致无可用节点。\\n\\n\" +\n \"• 超时时间是真连接测试的最大等待时间\\n\" +\n \"• 设置过低会导致大部分节点连接失败\\n\" +\n \"• 推荐设置不低于5000ms\\n\\n\" +\n \"建议超时时间设置:\\n\" +\n \"• 普通网络环境:5000± ms\\n\" +\n \"• 极好网络环境:3000± ms\\n\";\n\n Log(warningMessage);\n }\n\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/CheckUpdates.cs", "using Newtonsoft.Json.Linq;\nusing System;\nusing System.Collections.Generic;\nusing System.Data;\nusing System.Linq;\nusing System.Net.Http;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\nusing static System.Windows.Forms.VisualStyles.VisualStyleElement;\n\nnamespace subs_check.win.gui\n{\n public partial class CheckUpdates : Form\n {\n // 添加一个属性用于存储和传递文本内容\n public string UrlContent { get; set; }\n public System.Windows.Forms.ComboBox.ObjectCollection githubProxys { get; set; }\n public string githubProxy { get; set; }\n string githubProxyURL;\n public string 当前subsCheck版本号 { get; set; }\n public string 当前GUI版本号 { get; set; }\n public string 最新GUI版本号 { get; set; }\n\n public CheckUpdates()\n {\n InitializeComponent();\n }\n\n protected override void OnLoad(EventArgs e)\n {\n base.OnLoad(e);\n\n timer1.Enabled = true;\n\n if (githubProxys != null)\n {\n comboBox1.Items.Clear();\n foreach (var item in githubProxys)\n {\n comboBox1.Items.Add(item);\n }\n }\n if (!string.IsNullOrEmpty(githubProxy)) comboBox1.Text = githubProxy;\n }\n\n private async void timer1_Tick(object sender, EventArgs e)\n {\n timer1.Enabled = false;\n label3.Text = 最新GUI版本号;\n label4.Text = 当前GUI版本号;\n\n label5.Text = 当前subsCheck版本号;\n\n if (comboBox1.Text == \"自动选择\")\n {\n // 创建不包含\"自动选择\"的代理列表\n List proxyItems = new List();\n for (int j = 0; j < comboBox1.Items.Count; j++)\n {\n string proxyItem = comboBox1.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n\n // 随机打乱列表顺序\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n\n // 异步检测可用代理\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n }\n else\n {\n githubProxyURL = $\"https://{comboBox1.Text}/\";\n }\n\n if (最新GUI版本号 != 当前GUI版本号)\n {\n // 检查当前目录下是否存在 Upgrade.exe\n string upgradeExePath = System.IO.Path.Combine(Application.StartupPath, \"Upgrade.exe\");\n if (System.IO.File.Exists(upgradeExePath))\n {\n button1.Text = \"立即更新\";\n button1.Enabled = true;\n }\n else\n {\n button1.Text = \"缺少更新程序\";\n button1.Enabled = false;\n }\n }\n else\n {\n button1.Text = \"已是最新版本\";\n button1.Enabled = false;\n }\n\n using (HttpClient client = new HttpClient())\n {\n try\n {\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n client.Timeout = TimeSpan.FromSeconds(30); // 增加超时时间以适应下载需求\n\n string url = \"https://api.github.com/repos/beck-8/subs-check/releases/latest\";\n string 备用url = \"https://api.github.cmliussss.net/repos/beck-8/subs-check/releases/latest\";\n\n HttpResponseMessage response = null;\n string responseBody = null;\n JObject json = null;\n\n // 先尝试主URL\n try\n {\n response = await client.GetAsync(url);\n\n // 如果主URL请求成功返回有效数据\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从主API获取版本信息\");\n }\n // 如果主URL请求不成功但没有抛出异常\n else\n {\n Console.WriteLine($\"主API请求失败 HTTP {(int)response.StatusCode},尝试备用API...\");\n response = await client.GetAsync(备用url);\n\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用API获取版本信息\");\n }\n else\n {\n Console.WriteLine($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return; // 两个URL都失败,提前退出\n }\n }\n }\n // 捕获网络请求异常(如连接超时、无法解析域名等)\n catch (HttpRequestException ex)\n {\n Console.WriteLine($\"主API请求出错: {ex.Message},尝试备用API...\");\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用API获取版本信息\");\n }\n else\n {\n Console.WriteLine($\"备用API也请求失败: HTTP {(int)response.StatusCode}\", true);\n return; // 备用URL也失败,提前退出\n }\n }\n catch (Exception backupEx)\n {\n Console.WriteLine($\"备用API请求也出错: {backupEx.Message}\", true);\n return; // 连备用URL也异常,提前退出\n }\n }\n // 捕获JSON解析异常\n catch (Newtonsoft.Json.JsonException ex)\n {\n Console.WriteLine($\"解析JSON数据出错: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用API获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n Console.WriteLine($\"备用API请求也出错: {backupEx.Message}\", true);\n return; // 连备用URL也有问题,提前退出\n }\n }\n // 捕获其他所有异常\n catch (Exception ex)\n {\n Console.WriteLine($\"获取版本信息时出现未预期的错误: {ex.Message}\", true);\n try\n {\n response = await client.GetAsync(备用url);\n if (response.IsSuccessStatusCode)\n {\n responseBody = await response.Content.ReadAsStringAsync();\n json = JObject.Parse(responseBody);\n Console.WriteLine(\"成功从备用URL获取版本信息\");\n }\n }\n catch (Exception backupEx)\n {\n //控制台打印错误\n Console.WriteLine($\"备用API请求也出错: {backupEx.Message}\", true);\n return; // 连备用URL也有问题,提前退出\n }\n }\n\n // 如果成功获取了JSON数据,继续处理\n if (json != null)\n {\n string latestVersion = json[\"tag_name\"].ToString();\n label6.Text = latestVersion;\n if (当前subsCheck版本号 != latestVersion)\n {\n button2.Text = \"立即更新\";\n button2.Enabled = true;\n }\n else\n {\n button2.Text = \"已是最新版本\";\n button2.Enabled = false;\n }\n }\n\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"下载 subs-check.exe 时出错: {ex.Message}\\n\\n请前往 https://github.com/beck-8/subs-check/releases 自行下载!\",\n \"错误\", MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n }\n\n // 创建专用方法用于异步检测GitHub代理\n private async Task DetectGitHubProxyAsync(List proxyItems)\n {\n string detectedProxyURL = \"\";\n\n // 遍历随机排序后的代理列表\n foreach (string proxyItem in proxyItems)\n {\n string checkUrl = $\"https://{proxyItem}/https://raw.githubusercontent.com/cmliu/SubsCheck-Win-GUI/master/packages.config\";\n\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); // 设置5秒超时\n // 添加User-Agent头,避免被拒绝访问\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n\n // 使用异步方式\n HttpResponseMessage response = await client.GetAsync(checkUrl);\n if (response.IsSuccessStatusCode)\n {\n // 找到可用代理\n detectedProxyURL = $\"https://{proxyItem}/\";\n break;\n }\n }\n }\n catch (Exception ex)\n {\n // 记录错误但继续尝试下一个\n Console.WriteLine($\"Error: {ex.Message}\");\n }\n }\n return detectedProxyURL;\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n // 设置对话框结果为OK,表示用户点击了\"立即更新\"按钮\n this.DialogResult = DialogResult.OK;\n\n // 关闭窗口\n this.Close();\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n //下载链接\n string downloadURL = $\"{githubProxyURL}https://github.com/cmliu/SubsCheck-Win-GUI/releases/download/{最新GUI版本号}/SubsCheck_Win_GUI.zip\";\n //目标文件\n string downloadEXE = \"subs-check.win.gui.exe\";\n\n try\n {\n // 获取应用程序目录\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n // 创建 Upgrade.ini 文件路径\n string iniFilePath = System.IO.Path.Combine(executablePath, \"Upgrade.ini\");\n\n // 准备 INI 文件内容\n string iniContent =\n \"[Upgrade]\\r\\n\" +\n $\"DownloadURL={downloadURL}\\r\\n\" +\n $\"TargetFile={downloadEXE}\\r\\n\";\n\n // 写入文件(如果文件已存在会被覆盖)\n System.IO.File.WriteAllText(iniFilePath, iniContent);\n\n DialogResult result = MessageBox.Show(\n $\"发现新版本: {最新GUI版本号}\\n\\n\" +\n \"· 点击【确定】将下载并安装更新\\n\" +\n \"· 更新过程中程序会自动关闭并重启\\n\" +\n \"· 更新完成后所有设置将保持不变\\n\\n\" +\n \"是否立即更新到最新版本?\",\n \"发现新版本\",\n MessageBoxButtons.OKCancel,\n MessageBoxIcon.Information);\n\n if (result == DialogResult.OK)\n {\n // 检查目标文件是否存在\n string targetFilePath = System.IO.Path.Combine(Application.StartupPath, \"Upgrade.exe\");\n if (System.IO.File.Exists(targetFilePath))\n {\n // 使用Process.Start异步启动应用程序\n System.Diagnostics.Process.Start(targetFilePath);\n this.Close();\n }\n else\n {\n MessageBox.Show(\"更新程序 Upgrade.exe 不存在!\",\n \"错误\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Error);\n }\n }\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"写入更新信息时出错: {ex.Message}\",\n \"错误\",\n MessageBoxButtons.OK,\n MessageBoxIcon.Error);\n }\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/EditURLs.cs", "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Drawing;\nusing System.Linq;\nusing System.Net.Http;\nusing System.Security.Policy;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\nusing static System.Windows.Forms.VisualStyles.VisualStyleElement;\n\nnamespace subs_check.win.gui\n{\n public partial class EditURLs: Form\n {\n // 添加一个属性用于存储和传递文本内容\n public string UrlContent { get; set; }\n public System.Windows.Forms.ComboBox.ObjectCollection githubProxys { get; set; }\n public string githubProxy { get; set; }\n string githubProxyURL;\n string SubsCheckURLs;\n public EditURLs()\n {\n InitializeComponent();\n\n // 设置textBox1的锚点为上、左、右\n textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom;\n\n // 设置button1、button2、button3的锚点为左、下\n button1.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;\n button2.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;\n button3.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;\n\n // 设置button4的锚点为右、下\n button4.Anchor = AnchorStyles.Right | AnchorStyles.Bottom;\n }\n\n // 加载窗体时处理传入的内容\n protected override void OnLoad(EventArgs e)\n {\n base.OnLoad(e);\n\n // 将传入的内容显示在textBox1中\n if (!string.IsNullOrEmpty(UrlContent)) textBox1.Text = UrlContent;\n\n timer1.Enabled = true;\n\n if (githubProxys != null)\n {\n comboBox1.Items.Clear();\n foreach (var item in githubProxys)\n {\n comboBox1.Items.Add(item);\n }\n }\n if (!string.IsNullOrEmpty(githubProxy)) comboBox1.Text = githubProxy;\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n // 将textBox1的内容保存到UrlContent属性\n UrlContent = textBox1.Text;\n\n // 设置对话框结果为OK并关闭窗口\n this.DialogResult = DialogResult.OK;\n this.Close();\n }\n\n private void button4_Click(object sender, EventArgs e)\n {\n this.Close();\n }\n\n private void button3_Click(object sender, EventArgs e)\n {\n // 确保有内容需要处理\n if (string.IsNullOrWhiteSpace(textBox1.Text))\n return;\n\n // 按行分割文本\n string[] lines = textBox1.Text.Split(\n new[] { \"\\r\\n\", \"\\r\", \"\\n\" },\n StringSplitOptions.RemoveEmptyEntries);\n\n // 去除每行首尾的空白字符\n for (int i = 0; i < lines.Length; i++)\n {\n lines[i] = lines[i].Trim();\n }\n\n // 使用LINQ的Distinct()方法去重,并过滤掉空行\n string[] uniqueLines = lines\n .Where(line => !string.IsNullOrWhiteSpace(line))\n .Distinct(StringComparer.OrdinalIgnoreCase) // 忽略大小写进行去重\n .ToArray();\n\n // 将去重后的内容设回textBox1\n textBox1.Text = string.Join(Environment.NewLine, uniqueLines) + \"\\n\";\n\n // 可选:显示去重结果\n int removed = lines.Length - uniqueLines.Length;\n if (removed > 0)\n {\n MessageBox.Show($\"已移除 {removed} 个重复行。\", \"去重完成\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n else\n {\n MessageBox.Show(\"没有发现重复行。\", \"去重完成\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n }\n\n private async void timer1_Tick(object sender, EventArgs e)\n {\n timer1.Enabled = false;\n\n if (comboBox1.Text == \"自动选择\")\n {\n // 创建不包含\"自动选择\"的代理列表\n List proxyItems = new List();\n for (int j = 0; j < comboBox1.Items.Count; j++)\n {\n string proxyItem = comboBox1.Items[j].ToString();\n if (proxyItem != \"自动选择\")\n proxyItems.Add(proxyItem);\n }\n\n // 随机打乱列表顺序\n Random random = new Random();\n proxyItems = proxyItems.OrderBy(x => random.Next()).ToList();\n\n // 异步检测可用代理\n githubProxyURL = await DetectGitHubProxyAsync(proxyItems);\n }\n else\n {\n githubProxyURL = $\"https://{comboBox1.Text}/\";\n }\n\n string SubsCheckURLsURL = $\"{githubProxyURL}https://raw.githubusercontent.com/cmliu/cmliu/main/SubsCheck-URLs\";\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); // 设置5秒超时\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n\n // 使用异步方式检查URL可访问性\n HttpResponseMessage response = await client.GetAsync(SubsCheckURLsURL);\n if (response.IsSuccessStatusCode)\n {\n button2.Text = \"在线获取\";\n button2.Enabled = true;\n SubsCheckURLs = await response.Content.ReadAsStringAsync();\n //MessageBox.Show(SubsCheckURLs);\n }\n else\n {\n button2.Text = \"获取失败\";\n button2.Enabled = false;\n }\n }\n }\n catch (Exception ex)\n {\n Console.WriteLine($\"Error: {ex.Message}\");\n // 网络错误或其他异常情况\n button2.Text = \"获取失败\";\n button2.Enabled = false;\n }\n }\n\n // 创建专用方法用于异步检测GitHub代理\n private async Task DetectGitHubProxyAsync(List proxyItems)\n {\n string detectedProxyURL = \"\";\n\n // 遍历随机排序后的代理列表\n foreach (string proxyItem in proxyItems)\n {\n string checkUrl = $\"https://{proxyItem}/https://raw.githubusercontent.com/cmliu/SubsCheck-Win-GUI/master/packages.config\";\n\n try\n {\n using (HttpClient client = new HttpClient())\n {\n client.Timeout = TimeSpan.FromSeconds(5); // 设置5秒超时\n // 添加User-Agent头,避免被拒绝访问\n client.DefaultRequestHeaders.UserAgent.ParseAdd(\"Mozilla/5.0 (Windows NT 10.0; Win32; x86) AppleWebKit/537.36 (KHTML, like Gecko) cmliu/SubsCheck-Win-GUI\");\n\n // 使用异步方式\n HttpResponseMessage response = await client.GetAsync(checkUrl);\n if (response.IsSuccessStatusCode)\n {\n // 找到可用代理\n detectedProxyURL = $\"https://{proxyItem}/\";\n break;\n }\n }\n }\n catch (Exception ex)\n {\n // 记录错误但继续尝试下一个\n Console.WriteLine($\"Error: {ex.Message}\");\n }\n }\n return detectedProxyURL;\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n // 检查是否已成功获取在线内容\n if (string.IsNullOrEmpty(SubsCheckURLs))\n {\n MessageBox.Show(\"未能获取在线内容,请重试。\", \"获取失败\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n return;\n }\n\n // 显示带有\"覆盖\"和\"追加\"选项的对话框\n DialogResult result = MessageBox.Show(\n \"请选择如何处理获取到的内容:\\n\\n\" +\n \"- 点击【是】将覆盖当前内容\\n\" +\n \"- 点击【否】将追加到当前内容后面\\n\" +\n \"- 点击【取消】不做任何操作\",\n \"操作选择\",\n MessageBoxButtons.YesNoCancel,\n MessageBoxIcon.Question);\n\n // 根据用户选择执行对应操作\n if (result == DialogResult.Yes)\n {\n // 覆盖操作\n // 确保所有换行符格式一致 (将单独的\\n或\\r替换为Windows风格的\\r\\n)\n string normalizedText = NormalizeLineEndings(SubsCheckURLs);\n textBox1.Text = normalizedText;\n MessageBox.Show(\"已用在线内容覆盖原有内容。\", \"感谢大自然的馈赠\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n else if (result == DialogResult.No)\n {\n // 追加操作\n // 确保原有内容末尾有换行符\n if (!textBox1.Text.EndsWith(\"\\r\\n\") && !textBox1.Text.EndsWith(\"\\n\"))\n {\n textBox1.Text += Environment.NewLine;\n }\n\n // 追加新内容,确保换行符格式一致\n textBox1.Text += NormalizeLineEndings(SubsCheckURLs);\n MessageBox.Show(\"已将在线内容追加到原有内容后。\", \"感谢大自然的馈赠\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n\n // 如果用户选择\"取消\",不执行任何操作\n }\n\n // 标准化文本中的换行符为Windows风格 (\\r\\n)\n private string NormalizeLineEndings(string text)\n {\n if (string.IsNullOrEmpty(text))\n return string.Empty;\n\n // 先将所有类型的换行符替换为\\n\n text = text.Replace(\"\\r\\n\", \"\\n\").Replace(\"\\r\", \"\\n\");\n // 然后将\\n替换为\\r\\n\n text = text.Replace(\"\\n\", Environment.NewLine);\n\n return text;\n }\n\n }\n}\n"], ["/SubsCheck-Win-GUI/MoreYAML.cs", "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Data;\nusing System.Diagnostics;\nusing System.Drawing;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing System.Windows.Forms;\n\nnamespace subs_check.win.gui\n{\n public partial class MoreYAML : Form\n {\n string 初始化;\n public MoreYAML()\n {\n InitializeComponent();\n\n \n // 移除文本框的等待光标\n textBox1.UseWaitCursor = false;\n 初始化 = textBox1.Text;\n\n // 设置 groupBox1 的 Anchor 属性,使其跟随窗体四边缩放\n groupBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;\n\n // 设置文本框跟随 groupBox1 缩放\n textBox1.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;\n\n // 设置 linkLabel1 固定在右上角\n linkLabel1.Anchor = AnchorStyles.Top | AnchorStyles.Right;\n\n // 设置按钮固定在底部\n button1.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;\n button3.Anchor = AnchorStyles.Bottom | AnchorStyles.Left;\n button2.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;\n \n // 检查并加载配置文件\n LoadMoreYamlConfig();\n }\n\n /// \n /// 检查并加载 more.yaml 配置文件\n /// \n private void LoadMoreYamlConfig()\n {\n try\n {\n // 获取当前程序的执行路径\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n // 指定config目录路径\n string configFolderPath = System.IO.Path.Combine(executablePath, \"config\");\n // 指定more.yaml文件的完整路径\n string moreYamlFilePath = System.IO.Path.Combine(configFolderPath, \"more.yaml\");\n\n // 检查文件是否存在\n if (System.IO.File.Exists(moreYamlFilePath))\n {\n // 读取文件内容并赋值给textBox1\n string yamlContent = System.IO.File.ReadAllText(moreYamlFilePath, Encoding.UTF8);\n textBox1.Text = yamlContent;\n }\n }\n catch (Exception ex)\n {\n // 读取文件时出错,可以选择是否显示错误信息\n MessageBox.Show($\"读取配置文件时发生错误:{ex.Message}\", \"提示\",\n MessageBoxButtons.OK, MessageBoxIcon.Information);\n }\n }\n\n private void button2_Click(object sender, EventArgs e)\n {\n this.Close();\n }\n\n private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/beck-8/subs-check/blob/master/config/config.example.yaml\");\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n try\n {\n // 验证textbox1的内容是否符合YAML格式\n if (!IsValidYaml(textBox1.Text))\n {\n MessageBox.Show(\"输入的内容不符合YAML格式,请检查后重试!\", \"格式错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Warning);\n return;\n }\n\n // 获取当前程序的执行路径\n string executablePath = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath);\n // 指定config目录路径\n string configFolderPath = System.IO.Path.Combine(executablePath, \"config\");\n // 指定more.yaml文件的完整路径\n string moreYamlFilePath = System.IO.Path.Combine(configFolderPath, \"more.yaml\");\n\n // 确保config目录存在\n if (!System.IO.Directory.Exists(configFolderPath))\n {\n System.IO.Directory.CreateDirectory(configFolderPath);\n }\n\n // 将textBox1的内容写入more.yaml文件\n System.IO.File.WriteAllText(moreYamlFilePath, textBox1.Text, Encoding.UTF8);\n\n // 设置对话框结果为OK并关闭窗口\n this.DialogResult = DialogResult.OK;\n this.Close();\n }\n catch (Exception ex)\n {\n MessageBox.Show($\"保存配置文件时发生错误:{ex.Message}\", \"错误\",\n MessageBoxButtons.OK, MessageBoxIcon.Error);\n }\n }\n\n /// \n /// 验证字符串是否为有效的YAML格式\n /// \n /// 要验证的YAML字符串\n /// 如果是有效的YAML格式,返回true;否则返回false\n private bool IsValidYaml(string yamlContent)\n {\n if (string.IsNullOrWhiteSpace(yamlContent))\n return true; // 空内容被视为有效(可以根据需要更改)\n\n try\n {\n // 使用YamlDotNet尝试解析YAML内容\n var deserializer = new YamlDotNet.Serialization.Deserializer();\n deserializer.Deserialize(yamlContent);\n return true;\n }\n catch (YamlDotNet.Core.YamlException)\n {\n // 捕获YAML解析异常,表示格式无效\n return false;\n }\n catch (Exception)\n {\n // 其他异常也视为格式无效\n return false;\n }\n }\n\n private void button3_Click(object sender, EventArgs e)\n {\n textBox1.Text = 初始化;\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/about.cs", "using System;\nusing System.Windows.Forms;\nusing System.Diagnostics;\n\nnamespace subs_check.win.gui\n{\n public partial class about : Form\n {\n // 添加两个公共属性来接收版本号\n public string GuiVersion { set { label2.Text = value; } }\n public string CoreVersion { set { label3.Text = value; } }\n\n public about()\n {\n InitializeComponent();\n }\n\n private void button1_Click(object sender, EventArgs e)\n {\n this.Close();\n }\n\n private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/beck-8/subs-check\");\n }\n\n private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://t.me/CMLiussss\");\n }\n\n private void linkLabel4_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://url.cmliussss.com/SCWinGUI\");\n }\n\n private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/cmliu/SubsCheck-Win-GUI\");\n }\n\n private void linkLabel5_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/beck-8/subs-check\");\n }\n\n private void linkLabel6_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/bestruirui/BestSub\");\n }\n\n private void linkLabel8_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)\n {\n Process.Start(\"https://github.com/sub-store-org/Sub-Store\");\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/Properties/Resources.Designer.cs", "//------------------------------------------------------------------------------\n// \n// 此代码由工具生成。\n// 运行时版本:4.0.30319.42000\n//\n// 对此文件的更改可能会导致不正确的行为,并且如果\n// 重新生成代码,这些更改将会丢失。\n// \n//------------------------------------------------------------------------------\n\nnamespace subs_check.win.gui.Properties {\n using System;\n \n \n /// \n /// 一个强类型的资源类,用于查找本地化的字符串等。\n /// \n // 此类是由 StronglyTypedResourceBuilder\n // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。\n // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen\n // (以 /str 作为命令选项),或重新生成 VS 项目。\n [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Resources.Tools.StronglyTypedResourceBuilder\", \"17.0.0.0\")]\n [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\n internal class Resources {\n \n private static global::System.Resources.ResourceManager resourceMan;\n \n private static global::System.Globalization.CultureInfo resourceCulture;\n \n [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\n internal Resources() {\n }\n \n /// \n /// 返回此类使用的缓存的 ResourceManager 实例。\n /// \n [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n internal static global::System.Resources.ResourceManager ResourceManager {\n get {\n if (object.ReferenceEquals(resourceMan, null)) {\n global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(\"subs_check.win.gui.Properties.Resources\", typeof(Resources).Assembly);\n resourceMan = temp;\n }\n return resourceMan;\n }\n }\n \n /// \n /// 重写当前线程的 CurrentUICulture 属性,对\n /// 使用此强类型资源类的所有资源查找执行重写。\n /// \n [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n internal static global::System.Globalization.CultureInfo Culture {\n get {\n return resourceCulture;\n }\n set {\n resourceCulture = value;\n }\n }\n \n /// \n /// 查找 System.Byte[] 类型的本地化资源。\n /// \n internal static byte[] going {\n get {\n object obj = ResourceManager.GetObject(\"going\", resourceCulture);\n return ((byte[])(obj));\n }\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/Program.cs", "using System;\nusing System.Threading;\nusing System.Windows.Forms;\n\nnamespace subs_check.win.gui\n{\n static class Program\n {\n // 定义一个全局唯一的标识符,使用项目名称作为互斥体的名称\n private static string appMutexName = \"cmliu/SubsCheck-Win-GUI\";\n private static Mutex mutex;\n\n /// \n /// 应用程序的主入口点。\n /// \n [STAThread]\n static void Main()\n {\n // 尝试创建一个命名互斥体,如果已存在,则获取它\n bool createdNew;\n mutex = new Mutex(true, appMutexName, out createdNew);\n\n if (!createdNew)\n {\n // 如果互斥体已存在(即程序已在运行),则终止当前实例\n MessageBox.Show(\"应用程序已经在运行中。\", \"提示\", MessageBoxButtons.OK, MessageBoxIcon.Information);\n return;\n }\n\n try\n {\n Application.EnableVisualStyles();\n Application.SetCompatibleTextRenderingDefault(false);\n Application.Run(new Form1());\n }\n finally\n {\n // 确保释放互斥体\n mutex.ReleaseMutex();\n }\n }\n }\n}\n"], ["/SubsCheck-Win-GUI/Properties/Settings.Designer.cs", "//------------------------------------------------------------------------------\n// \n// 此代码由工具生成。\n// 运行时版本:4.0.30319.42000\n//\n// 对此文件的更改可能会导致不正确的行为,并且如果\n// 重新生成代码,这些更改将会丢失。\n// \n//------------------------------------------------------------------------------\n\nnamespace subs_check.win.gui.Properties {\n \n \n [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\n [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator\", \"17.13.0.0\")]\n internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {\n \n private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));\n \n public static Settings Default {\n get {\n return defaultInstance;\n }\n }\n }\n}\n"]], "task_instance_info": {"created_time": "2025-08-20 18:31:17", "created_task_model": "DeepSeek-R1", "class_skeleton": "partial\nclass\nCheckUpdates\n{\nprivate System.ComponentModel.IContainer components = null;\nprotected override void Dispose (bool disposing) {}\nprivate void InitializeComponent () {}\nprivate System.Windows.Forms.GroupBox groupBox1;\nprivate System.Windows.Forms.Label label4;\nprivate System.Windows.Forms.Label label3;\nprivate System.Windows.Forms.Button button1;\nprivate System.Windows.Forms.Label label2;\nprivate System.Windows.Forms.Label label1;\nprivate System.Windows.Forms.GroupBox groupBox2;\nprivate System.Windows.Forms.Label label5;\nprivate System.Windows.Forms.Label label6;\nprivate System.Windows.Forms.Button button2;\nprivate System.Windows.Forms.Label label7;\nprivate System.Windows.Forms.Label label8;\nprivate System.Windows.Forms.Timer timer1;\nprivate System.Windows.Forms.ComboBox comboBox1;\n}", "code_description": "This code segment functions to: Define and configure graphical interface elements for displaying software version information and update controls across multiple application components within a window layout."}, "inference_content": {"inference_model": "DeepSeek-R1", "inference_result": "```c_sharp\n[TASK_BEGIN]\npartial class CheckUpdates\n{\n private System.ComponentModel.IContainer components = null;\n \n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n\n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.label4 = new System.Windows.Forms.Label();\n this.label3 = new System.Windows.Forms.Label();\n this.button1 = new System.Windows.Forms.Button();\n this.label2 = new System.Windows.Forms.Label();\n this.label1 = new System.Windows.Forms.Label();\n this.groupBox2 = new System.Windows.Forms.GroupBox();\n this.label5 = new System.Windows.Forms.Label();\n this.label6 = new System.Windows.Forms.Label();\n this.button2 = new System.Windows.Forms.Button();\n this.label7 = new System.Windows.Forms.Label();\n this.label8 = new System.Windows.Forms.Label();\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n \n // groupBox1\n this.groupBox1.SuspendLayout();\n this.groupBox1.Location = new System.Drawing.Point(12, 12);\n this.groupBox1.Size = new System.Drawing.Size(300, 150);\n this.groupBox1.Text = \"GroupBox1\";\n this.groupBox1.Controls.Add(this.label1);\n this.groupBox1.Controls.Add(this.label2);\n this.groupBox1.Controls.Add(this.button1);\n this.groupBox1.Controls.Add(this.label3);\n this.groupBox1.Controls.Add(this.label4);\n \n // label1\n this.label1.AutoSize = true;\n this.label1.Location = new System.Drawing.Point(6, 20);\n this.label1.Text = \"Label1\";\n \n // label2\n this.label2.AutoSize = true;\n this.label2.Location = new System.Drawing.Point(6, 40);\n this.label2.Text = \"Label2\";\n \n // button1\n this.button1.Location = new System.Drawing.Point(6, 100);\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.Text = \"Button1\";\n \n // label3\n this.label3.AutoSize = true;\n this.label3.Location = new System.Drawing.Point(6, 60);\n this.label3.Text = \"Label3\";\n \n // label4\n this.label4.AutoSize = true;\n this.label4.Location = new System.Drawing.Point(6, 80);\n this.label4.Text = \"Label4\";\n \n // groupBox2\n this.groupBox2.SuspendLayout();\n this.groupBox2.Location = new System.Drawing.Point(12, 170);\n this.groupBox2.Size = new System.Drawing.Size(300, 150);\n this.groupBox2.Text = \"GroupBox2\";\n this.groupBox2.Controls.Add(this.label5);\n this.groupBox2.Controls.Add(this.label6);\n this.groupBox2.Controls.Add(this.button2);\n this.groupBox2.Controls.Add(this.label7);\n this.groupBox2.Controls.Add(this.label8);\n \n // label5\n this.label5.AutoSize = true;\n this.label5.Location = new System.Drawing.Point(6, 20);\n this.label5.Text = \"Label5\";\n \n // label6\n this.label6.AutoSize = true;\n this.label6.Location = new System.Drawing.Point(6, 40);\n this.label6.Text = \"Label6\";\n \n // button2\n this.button2.Location = new System.Drawing.Point(6, 100);\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.Text = \"Button2\";\n \n // label7\n this.label7.AutoSize = true;\n this.label7.Location = new System.Drawing.Point(6, 60);\n this.label7.Text = \"Label7\";\n \n // label8\n this.label8.AutoSize = true;\n this.label8.Location = new System.Drawing.Point(6, 80);\n this.label8.Text = \"Label8\";\n \n // comboBox1\n this.comboBox1.Location = new System.Drawing.Point(12, 330);\n this.comboBox1.Size = new System.Drawing.Size(300, 21);\n \n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.groupBox2.ResumeLayout(false);\n this.groupBox2.PerformLayout();\n this.ResumeLayout(false);\n }\n}\n[TASK_END]\n```", "inference_time": "2025-08-20 18-32-24"}, "editdistance_info": {"edit_distance": 37.1546, "calculate_time": "2025-08-20 18:32:24", "true_code_clean": "partial class CheckUpdates\n {\n private System.ComponentModel.IContainer components = null;\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n #region Windows Form Designer generated code\n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.label4 = new System.Windows.Forms.Label();\n this.label3 = new System.Windows.Forms.Label();\n this.button1 = new System.Windows.Forms.Button();\n this.label2 = new System.Windows.Forms.Label();\n this.label1 = new System.Windows.Forms.Label();\n this.groupBox2 = new System.Windows.Forms.GroupBox();\n this.label5 = new System.Windows.Forms.Label();\n this.label6 = new System.Windows.Forms.Label();\n this.button2 = new System.Windows.Forms.Button();\n this.label7 = new System.Windows.Forms.Label();\n this.label8 = new System.Windows.Forms.Label();\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.groupBox1.SuspendLayout();\n this.groupBox2.SuspendLayout();\n this.SuspendLayout();\n this.groupBox1.Controls.Add(this.label4);\n this.groupBox1.Controls.Add(this.label3);\n this.groupBox1.Controls.Add(this.button1);\n this.groupBox1.Controls.Add(this.label2);\n this.groupBox1.Controls.Add(this.label1);\n this.groupBox1.Location = new System.Drawing.Point(12, 12);\n this.groupBox1.Name = \"groupBox1\";\n this.groupBox1.Size = new System.Drawing.Size(144, 89);\n this.groupBox1.TabIndex = 0;\n this.groupBox1.TabStop = false;\n this.groupBox1.Text = \"SubsCheck Win GUI\";\n this.label4.AutoSize = true;\n this.label4.Location = new System.Drawing.Point(77, 37);\n this.label4.Name = \"label4\";\n this.label4.Size = new System.Drawing.Size(53, 12);\n this.label4.TabIndex = 4;\n this.label4.Text = \"v0.0.0.0\";\n this.label3.AutoSize = true;\n this.label3.Location = new System.Drawing.Point(77, 17);\n this.label3.Name = \"label3\";\n this.label3.Size = new System.Drawing.Size(53, 12);\n this.label3.TabIndex = 3;\n this.label3.Text = \"v0.0.0.0\";\n this.button1.Enabled = false;\n this.button1.Location = new System.Drawing.Point(8, 57);\n this.button1.Name = \"button1\";\n this.button1.Size = new System.Drawing.Size(122, 23);\n this.button1.TabIndex = 2;\n this.button1.Text = \"正在获取版本\";\n this.button1.UseVisualStyleBackColor = true;\n this.button1.Click += new System.EventHandler(this.button1_Click);\n this.label2.AutoSize = true;\n this.label2.Location = new System.Drawing.Point(10, 37);\n this.label2.Name = \"label2\";\n this.label2.Size = new System.Drawing.Size(65, 12);\n this.label2.TabIndex = 1;\n this.label2.Text = \"当前版本:\";\n this.label1.AutoSize = true;\n this.label1.Location = new System.Drawing.Point(10, 17);\n this.label1.Name = \"label1\";\n this.label1.Size = new System.Drawing.Size(65, 12);\n this.label1.TabIndex = 0;\n this.label1.Text = \"最新版本:\";\n this.groupBox2.Controls.Add(this.label5);\n this.groupBox2.Controls.Add(this.label6);\n this.groupBox2.Controls.Add(this.button2);\n this.groupBox2.Controls.Add(this.label7);\n this.groupBox2.Controls.Add(this.label8);\n this.groupBox2.Location = new System.Drawing.Point(162, 12);\n this.groupBox2.Name = \"groupBox2\";\n this.groupBox2.Size = new System.Drawing.Size(144, 89);\n this.groupBox2.TabIndex = 5;\n this.groupBox2.TabStop = false;\n this.groupBox2.Text = \"Subs-Check 内核\";\n this.label5.AutoSize = true;\n this.label5.Location = new System.Drawing.Point(77, 37);\n this.label5.Name = \"label5\";\n this.label5.Size = new System.Drawing.Size(53, 12);\n this.label5.TabIndex = 4;\n this.label5.Text = \"v0.0.0.0\";\n this.label6.AutoSize = true;\n this.label6.Location = new System.Drawing.Point(77, 17);\n this.label6.Name = \"label6\";\n this.label6.Size = new System.Drawing.Size(53, 12);\n this.label6.TabIndex = 3;\n this.label6.Text = \"正在获取\";\n this.button2.Enabled = false;\n this.button2.Location = new System.Drawing.Point(8, 57);\n this.button2.Name = \"button2\";\n this.button2.Size = new System.Drawing.Size(122, 23);\n this.button2.TabIndex = 2;\n this.button2.Text = \"正在获取版本\";\n this.button2.UseVisualStyleBackColor = true;\n this.button2.Click += new System.EventHandler(this.button2_Click);\n this.label7.AutoSize = true;\n this.label7.Location = new System.Drawing.Point(10, 37);\n this.label7.Name = \"label7\";\n this.label7.Size = new System.Drawing.Size(65, 12);\n this.label7.TabIndex = 1;\n this.label7.Text = \"当前版本:\";\n this.label8.AutoSize = true;\n this.label8.Location = new System.Drawing.Point(10, 17);\n this.label8.Name = \"label8\";\n this.label8.Size = new System.Drawing.Size(65, 12);\n this.label8.TabIndex = 0;\n this.label8.Text = \"最新版本:\";\n this.timer1.Tick += new System.EventHandler(this.timer1_Tick);\n this.comboBox1.FormattingEnabled = true;\n this.comboBox1.Location = new System.Drawing.Point(12, 107);\n this.comboBox1.Name = \"comboBox1\";\n this.comboBox1.Size = new System.Drawing.Size(294, 20);\n this.comboBox1.TabIndex = 23;\n this.comboBox1.Visible = false;\n this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);\n this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n this.AutoSize = true;\n this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;\n this.ClientSize = new System.Drawing.Size(319, 138);\n this.Controls.Add(this.comboBox1);\n this.Controls.Add(this.groupBox2);\n this.Controls.Add(this.groupBox1);\n this.MaximizeBox = false;\n this.MinimizeBox = false;\n this.Name = \"CheckUpdates\";\n this.ShowIcon = false;\n this.ShowInTaskbar = false;\n this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n this.Text = \"检查更新\";\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.groupBox2.ResumeLayout(false);\n this.groupBox2.PerformLayout();\n this.ResumeLayout(false);\n }\n #endregion\n private System.Windows.Forms.GroupBox groupBox1;\n private System.Windows.Forms.Label label4;\n private System.Windows.Forms.Label label3;\n private System.Windows.Forms.Button button1;\n private System.Windows.Forms.Label label2;\n private System.Windows.Forms.Label label1;\n private System.Windows.Forms.GroupBox groupBox2;\n private System.Windows.Forms.Label label5;\n private System.Windows.Forms.Label label6;\n private System.Windows.Forms.Button button2;\n private System.Windows.Forms.Label label7;\n private System.Windows.Forms.Label label8;\n private System.Windows.Forms.Timer timer1;\n private System.Windows.Forms.ComboBox comboBox1;\n }", "predict_code_clean": "partial class CheckUpdates\n{\n private System.ComponentModel.IContainer components = null;\n protected override void Dispose(bool disposing)\n {\n if (disposing && (components != null))\n {\n components.Dispose();\n }\n base.Dispose(disposing);\n }\n private void InitializeComponent()\n {\n this.components = new System.ComponentModel.Container();\n this.groupBox1 = new System.Windows.Forms.GroupBox();\n this.label4 = new System.Windows.Forms.Label();\n this.label3 = new System.Windows.Forms.Label();\n this.button1 = new System.Windows.Forms.Button();\n this.label2 = new System.Windows.Forms.Label();\n this.label1 = new System.Windows.Forms.Label();\n this.groupBox2 = new System.Windows.Forms.GroupBox();\n this.label5 = new System.Windows.Forms.Label();\n this.label6 = new System.Windows.Forms.Label();\n this.button2 = new System.Windows.Forms.Button();\n this.label7 = new System.Windows.Forms.Label();\n this.label8 = new System.Windows.Forms.Label();\n this.timer1 = new System.Windows.Forms.Timer(this.components);\n this.comboBox1 = new System.Windows.Forms.ComboBox();\n this.groupBox1.SuspendLayout();\n this.groupBox1.Location = new System.Drawing.Point(12, 12);\n this.groupBox1.Size = new System.Drawing.Size(300, 150);\n this.groupBox1.Text = \"GroupBox1\";\n this.groupBox1.Controls.Add(this.label1);\n this.groupBox1.Controls.Add(this.label2);\n this.groupBox1.Controls.Add(this.button1);\n this.groupBox1.Controls.Add(this.label3);\n this.groupBox1.Controls.Add(this.label4);\n this.label1.AutoSize = true;\n this.label1.Location = new System.Drawing.Point(6, 20);\n this.label1.Text = \"Label1\";\n this.label2.AutoSize = true;\n this.label2.Location = new System.Drawing.Point(6, 40);\n this.label2.Text = \"Label2\";\n this.button1.Location = new System.Drawing.Point(6, 100);\n this.button1.Size = new System.Drawing.Size(75, 23);\n this.button1.Text = \"Button1\";\n this.label3.AutoSize = true;\n this.label3.Location = new System.Drawing.Point(6, 60);\n this.label3.Text = \"Label3\";\n this.label4.AutoSize = true;\n this.label4.Location = new System.Drawing.Point(6, 80);\n this.label4.Text = \"Label4\";\n this.groupBox2.SuspendLayout();\n this.groupBox2.Location = new System.Drawing.Point(12, 170);\n this.groupBox2.Size = new System.Drawing.Size(300, 150);\n this.groupBox2.Text = \"GroupBox2\";\n this.groupBox2.Controls.Add(this.label5);\n this.groupBox2.Controls.Add(this.label6);\n this.groupBox2.Controls.Add(this.button2);\n this.groupBox2.Controls.Add(this.label7);\n this.groupBox2.Controls.Add(this.label8);\n this.label5.AutoSize = true;\n this.label5.Location = new System.Drawing.Point(6, 20);\n this.label5.Text = \"Label5\";\n this.label6.AutoSize = true;\n this.label6.Location = new System.Drawing.Point(6, 40);\n this.label6.Text = \"Label6\";\n this.button2.Location = new System.Drawing.Point(6, 100);\n this.button2.Size = new System.Drawing.Size(75, 23);\n this.button2.Text = \"Button2\";\n this.label7.AutoSize = true;\n this.label7.Location = new System.Drawing.Point(6, 60);\n this.label7.Text = \"Label7\";\n this.label8.AutoSize = true;\n this.label8.Location = new System.Drawing.Point(6, 80);\n this.label8.Text = \"Label8\";\n this.comboBox1.Location = new System.Drawing.Point(12, 330);\n this.comboBox1.Size = new System.Drawing.Size(300, 21);\n this.groupBox1.ResumeLayout(false);\n this.groupBox1.PerformLayout();\n this.groupBox2.ResumeLayout(false);\n this.groupBox2.PerformLayout();\n this.ResumeLayout(false);\n }\n}"}}