mirror of
https://github.com/zs-yg/kortapp-z.git
synced 2025-12-07 00:20:43 +08:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
70534c06db | ||
|
|
9e11e66e03 | ||
|
|
4b8283574a | ||
|
|
de48557786 | ||
|
|
aa739e8d9e | ||
|
|
924684918c | ||
|
|
76bb4d1b50 | ||
|
|
94fafdb3ed | ||
|
|
b09175550e | ||
|
|
c3b5e3fe66 | ||
|
|
1cad6573e2 | ||
|
|
d01b7a4b5a | ||
|
|
7d393aa817 | ||
|
|
f28ec55eaf |
@@ -51,7 +51,7 @@ namespace AppStore
|
||||
|
||||
// 初始化并添加应用信息
|
||||
infoLabel = new Label();
|
||||
infoLabel.Text = "kortapp-z\n版本: 1.3.5\n作者: zs-yg\n一个简单、开源的应用商店\nkortapp-z是完全免费\n基于.NET8和C/C++的软件";
|
||||
infoLabel.Text = "kortapp-z\n版本: 1.3.7\n作者: zs-yg\n一个简单、开源的应用商店\nkortapp-z是完全免费\n基于.NET8和C/C++的软件";
|
||||
infoLabel.Font = new Font("Microsoft YaHei", 12);
|
||||
infoLabel.AutoSize = false;
|
||||
infoLabel.Width = 300;
|
||||
@@ -125,7 +125,7 @@ namespace AppStore
|
||||
}
|
||||
}
|
||||
|
||||
// 保留原AboutForm作为容器(可选)
|
||||
// 保留原AboutForm作为容器
|
||||
public class AboutForm : Form
|
||||
{
|
||||
public AboutForm()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
|
||||
@@ -14,6 +15,7 @@ namespace AppStore
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
public int Progress { get; set; }
|
||||
public string Status { get; set; } = string.Empty;
|
||||
public Process? DownloadProcess { get; set; }
|
||||
|
||||
public DownloadItem()
|
||||
{
|
||||
@@ -123,9 +125,26 @@ namespace AppStore
|
||||
|
||||
try
|
||||
{
|
||||
// 1. 先取消下载
|
||||
DownloadManager.Instance.CancelDownload(this);
|
||||
|
||||
// 2. 更新状态为已取消
|
||||
Status = "已取消";
|
||||
UpdateDisplay();
|
||||
|
||||
// 3. 延迟100ms后移除控件,确保UI更新完成
|
||||
var timer = new System.Windows.Forms.Timer { Interval = 100 };
|
||||
timer.Tick += (s, args) =>
|
||||
{
|
||||
timer.Stop();
|
||||
timer.Dispose();
|
||||
if (this.Parent != null)
|
||||
{
|
||||
this.Parent.Controls.Remove(this);
|
||||
this.Dispose();
|
||||
}
|
||||
};
|
||||
timer.Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,6 @@ namespace AppStore
|
||||
private static DownloadManager instance = null!;
|
||||
public static DownloadManager Instance => instance ??= new DownloadManager();
|
||||
|
||||
private Process? currentProcess;
|
||||
public List<DownloadItem> DownloadItems { get; } = new List<DownloadItem>();
|
||||
|
||||
public event Action<DownloadItem> DownloadAdded = delegate { };
|
||||
@@ -78,6 +77,8 @@ namespace AppStore
|
||||
Status = "准备下载"
|
||||
};
|
||||
|
||||
// 创建进程并关联到下载项
|
||||
downloadItem.DownloadProcess = new Process();
|
||||
DownloadItems.Add(downloadItem);
|
||||
DownloadAdded?.Invoke(downloadItem);
|
||||
|
||||
@@ -137,18 +138,15 @@ namespace AppStore
|
||||
var arguments = $"--out=\"{originalFileName}\" --dir=\"{downloadsDir}\" --split=16 --max-connection-per-server=16 {url}";
|
||||
|
||||
|
||||
currentProcess = new Process
|
||||
downloadItem.DownloadProcess.StartInfo = new ProcessStartInfo
|
||||
{
|
||||
StartInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = aria2cPath,
|
||||
Arguments = arguments,
|
||||
WorkingDirectory = AppDomain.CurrentDomain.BaseDirectory,
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true
|
||||
}
|
||||
FileName = aria2cPath,
|
||||
Arguments = arguments,
|
||||
WorkingDirectory = AppDomain.CurrentDomain.BaseDirectory,
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true,
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true
|
||||
};
|
||||
|
||||
// 获取目标文件路径
|
||||
@@ -170,7 +168,7 @@ namespace AppStore
|
||||
}
|
||||
};
|
||||
|
||||
currentProcess.OutputDataReceived += (sender, e) =>
|
||||
downloadItem.DownloadProcess.OutputDataReceived += (sender, e) =>
|
||||
{
|
||||
if (!string.IsNullOrEmpty(e.Data))
|
||||
{
|
||||
@@ -211,7 +209,7 @@ namespace AppStore
|
||||
}
|
||||
};
|
||||
|
||||
currentProcess.ErrorDataReceived += (sender, e) =>
|
||||
downloadItem.DownloadProcess.ErrorDataReceived += (sender, e) =>
|
||||
{
|
||||
if (!string.IsNullOrEmpty(e.Data))
|
||||
{
|
||||
@@ -221,9 +219,9 @@ namespace AppStore
|
||||
}
|
||||
};
|
||||
|
||||
currentProcess.Exited += (sender, e) =>
|
||||
downloadItem.DownloadProcess.Exited += (sender, e) =>
|
||||
{
|
||||
var process = currentProcess;
|
||||
var process = downloadItem.DownloadProcess;
|
||||
if (process == null) return;
|
||||
|
||||
var result = GetProcessResult(process);
|
||||
@@ -292,10 +290,8 @@ namespace AppStore
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (process != null)
|
||||
{
|
||||
currentProcess = null;
|
||||
}
|
||||
// 清理资源
|
||||
downloadItem.DownloadProcess = null;
|
||||
}
|
||||
|
||||
// 强制更新显示
|
||||
@@ -304,13 +300,13 @@ namespace AppStore
|
||||
|
||||
|
||||
|
||||
if (!currentProcess.Start())
|
||||
if (!downloadItem.DownloadProcess.Start())
|
||||
{
|
||||
throw new Exception("进程启动失败");
|
||||
}
|
||||
|
||||
currentProcess.BeginOutputReadLine();
|
||||
currentProcess.BeginErrorReadLine();
|
||||
downloadItem.DownloadProcess.BeginOutputReadLine();
|
||||
downloadItem.DownloadProcess.BeginErrorReadLine();
|
||||
progressTimer.Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -333,7 +329,7 @@ namespace AppStore
|
||||
{
|
||||
try
|
||||
{
|
||||
var process = currentProcess;
|
||||
var process = item.DownloadProcess;
|
||||
if (process?.StartInfo == null || process.HasExited)
|
||||
{
|
||||
item.Status = "已取消";
|
||||
@@ -343,7 +339,7 @@ namespace AppStore
|
||||
|
||||
process.Kill();
|
||||
process.Dispose();
|
||||
currentProcess = null;
|
||||
item.DownloadProcess = null;
|
||||
|
||||
item.Status = "已取消";
|
||||
DownloadProgressChanged?.Invoke(item);
|
||||
|
||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 zsyg
|
||||
Copyright (c) 2025 zs-yg
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
24
MainForm.cs
24
MainForm.cs
@@ -1129,6 +1129,12 @@ namespace AppStore
|
||||
"img/png/godot.png",
|
||||
"Godot - 免费开源的由社区驱动的游戏引擎"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"luanti游戏引擎",
|
||||
"https://www.ghproxy.cn/https://github.com/luanti-org/luanti/releases/download/5.12.0/luanti-5.12.0-win64.zip",
|
||||
"img/png/Luanti.png",
|
||||
"Luanti - Luanti(以前称为 Minetest)是一个开源体素游戏创建平台,具有简单的模组和游戏创建功能"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"7-Zip",
|
||||
"https://objects.githubusercontent.com/github-production-release-asset-2e65be/466446150/1645817e-3677-4207-93ff-e62de7e147be?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20250613%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250613T035936Z&X-Amz-Expires=300&X-Amz-Signature=5e02d5fc34f45bd8308029c9fc78052007e9475ce0e32775619921cb8f3b83ea&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%3D7z2409-x64.exe&response-content-type=application%2Foctet-stream",
|
||||
@@ -1544,12 +1550,30 @@ namespace AppStore
|
||||
"img/ico/Sumatra PDF.ico",
|
||||
"Sumatra PDF - 轻量级的PDF阅读器"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"LiveRecorder",
|
||||
"https://ghproxy.net/https://github.com/auqhjjqdo/LiveRecorder/releases/download/v2.35/LiveRecorder_Windows_v2.35.zip",
|
||||
"",
|
||||
"LiveRecorder - 基于Streamlink的全自动直播录制工具"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"Freeplane",
|
||||
"https://ghproxy.net/https://github.com/zs-yg/package/releases/download/v0.5/Freeplane-Setup-1.12.11.exe.7z",
|
||||
"img/png/Freeplane.png",
|
||||
"Freeplane - 思维导图软件,帮助组织思路"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"Win11Debloat",
|
||||
"https://ghproxy.net/https://github.com/Raphire/Win11Debloat/releases/download/2025.06.12/Get.ps1",
|
||||
"img/png/powershell.png",
|
||||
"Win11Debloat - 这是一个简单易用的PowerShell脚本,可用于删除预装应用程序、禁用遥测以及执行各种其他更改,以自定义、整理和改善您的Windows体验。Win11Debloat适用于Windows 10和Windows 11。"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"keycloak",
|
||||
"https://ghproxy.net/https://github.com/keycloak/keycloak/releases/download/26.3.2/keycloak-26.3.2.zip",
|
||||
"img/png/keycloak.png",
|
||||
"keycloak - 现代应用程序和服务的开源身份和访问管理"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"Motrix",
|
||||
"https://dl.motrix.app/release/Motrix-Setup-1.8.19.exe",
|
||||
|
||||
@@ -83,7 +83,9 @@ Copyright (c) 2025 zsyg
|
||||
|
||||
## 其他网站
|
||||
|
||||
gitee镜像仓库:https://gitee.com/chr_super/kortapp-z (目前已经停止维护)
|
||||
gitee镜像仓库:https://gitee.com/chr_super/kortapp-z (目前已经停止维护,仅镜像代码)
|
||||
|
||||
sourceforge镜像仓库:https://sourceforge.net/projects/kortapp-z/ (提供releases镜像)
|
||||
|
||||
## 维护
|
||||
|
||||
|
||||
BIN
img/png/Luanti.png
Normal file
BIN
img/png/Luanti.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
img/png/keycloak.png
Normal file
BIN
img/png/keycloak.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.6 KiB |
@@ -2,7 +2,7 @@
|
||||
; 有关创建 Inno Setup 脚本文件的详细信息,请参阅帮助文档!
|
||||
|
||||
#define MyAppName "kortapp-z"
|
||||
#define MyAppVersion "1.3.5"
|
||||
#define MyAppVersion "1.3.7"
|
||||
#define MyAppPublisher "zsyg"
|
||||
#define MyAppURL "https://github.com/zs-yg/kortapp-z"
|
||||
#define MyAppExeName "kortapp-z.exe"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
; 有关创建 Inno Setup 脚本文件的详细信息,请参阅帮助文档!
|
||||
|
||||
#define MyAppName "kortapp-z"
|
||||
#define MyAppVersion "1.3.5"
|
||||
#define MyAppVersion "1.3.7"
|
||||
#define MyAppPublisher "zsyg"
|
||||
#define MyAppURL "https://github.com/zs-yg/kortapp-z"
|
||||
#define MyAppExeName "kortapp-z.exe"
|
||||
|
||||
Reference in New Issue
Block a user