mirror of
https://github.com/zs-yg/kortapp-z.git
synced 2025-12-06 16:10:42 +08:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a777991b8c | ||
|
|
e2c6c52b32 | ||
|
|
33089c39b6 | ||
|
|
45805178cc | ||
|
|
08a11f025a | ||
|
|
5bb3886bc5 | ||
|
|
ce5f964776 | ||
|
|
f52c7908d7 | ||
|
|
abcbf06493 | ||
|
|
f56bcb3627 | ||
|
|
f789c7904a | ||
|
|
e04709637c | ||
|
|
e39f976607 | ||
|
|
0d9ec0ad44 | ||
|
|
122ada92d9 | ||
|
|
d571729c89 | ||
|
|
351e1e97c3 |
@@ -57,7 +57,7 @@ namespace AppStore
|
||||
|
||||
// 初始化并添加应用信息
|
||||
infoLabel = new Label();
|
||||
infoLabel.Text = "kortapp-z\n版本: 1.1.9\n作者: zs-yg\n一个简单、开源的应用商店\nkortapp-z是完全免费\n基于.NET8和C/C++的软件";
|
||||
infoLabel.Text = "kortapp-z\n版本: 1.2.4\n作者: zs-yg\n一个简单、开源的应用商店\nkortapp-z是完全免费\n基于.NET8和C/C++的软件";
|
||||
infoLabel.Font = new Font("Microsoft YaHei", 12);
|
||||
infoLabel.AutoSize = false;
|
||||
infoLabel.Width = 300;
|
||||
|
||||
28
AppCard.cs
28
AppCard.cs
@@ -54,9 +54,23 @@ namespace AppStore
|
||||
this.Padding = new Padding(10);
|
||||
|
||||
// 异步初始化卡片路径和边框
|
||||
// 预加载边框路径
|
||||
Task.Run(() => {
|
||||
InitializeCardPath();
|
||||
InitializeBorder();
|
||||
|
||||
// 确保在主线程注册事件
|
||||
this.Invoke((MethodInvoker)(() => {
|
||||
this.Paint += (sender, e) => {
|
||||
if (BorderCache.IsEmpty)
|
||||
{
|
||||
Task.Run(() => {
|
||||
InitializeBorder();
|
||||
this.Invoke((MethodInvoker)(() => this.Invalidate()));
|
||||
});
|
||||
}
|
||||
};
|
||||
}));
|
||||
});
|
||||
|
||||
// 应用图标 - 添加null检查
|
||||
@@ -187,8 +201,12 @@ namespace AppStore
|
||||
// 使用卡片尺寸作为缓存键
|
||||
string cacheKey = $"{Width}_{Height}_10";
|
||||
|
||||
// 检查缓存中是否已有路径
|
||||
// 双重检查锁模式确保线程安全
|
||||
if (!BorderCache.TryGetValue(cacheKey, out var borderPath))
|
||||
{
|
||||
lock (BorderCache)
|
||||
{
|
||||
if (!BorderCache.TryGetValue(cacheKey, out borderPath))
|
||||
{
|
||||
// 创建临时文件存储路径数据
|
||||
string tempFile = Path.GetTempFileName();
|
||||
@@ -237,12 +255,20 @@ namespace AppStore
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 边框和阴影效果
|
||||
protected override void OnPaint(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaint(e);
|
||||
|
||||
// 确保边框已初始化
|
||||
if (BorderCache.IsEmpty)
|
||||
{
|
||||
InitializeBorder();
|
||||
}
|
||||
|
||||
// 绘制背景
|
||||
using (var brush = new SolidBrush(this.BackColor)) {
|
||||
e.Graphics.FillRectangle(brush, this.ClientRectangle);
|
||||
|
||||
36
MainForm.cs
36
MainForm.cs
@@ -248,6 +248,7 @@ namespace AppStore
|
||||
contentPanel.Dock = DockStyle.Fill;
|
||||
contentPanel.BackColor = ThemeManager.BackgroundColor;
|
||||
contentPanel.Padding = new Padding(20);
|
||||
contentPanel.AutoScroll = true;
|
||||
this.Controls.Add(contentPanel);
|
||||
|
||||
// 添加分隔线
|
||||
@@ -635,11 +636,11 @@ namespace AppStore
|
||||
flowPanel.Dock = DockStyle.Fill;
|
||||
flowPanel.AutoScroll = true;
|
||||
flowPanel.Padding = new Padding(15, 15, 15, 15);
|
||||
flowPanel.WrapContents = true;
|
||||
flowPanel.WrapContents = false;
|
||||
flowPanel.Margin = new Padding(0);
|
||||
flowPanel.AutoSize = true;
|
||||
flowPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
flowPanel.AutoScrollMinSize = new Size(0, 3350);
|
||||
flowPanel.AutoScrollMinSize = new Size(0, 5000);
|
||||
|
||||
// 创建搜索框
|
||||
TextBox searchBox = new TextBox();
|
||||
@@ -667,11 +668,11 @@ namespace AppStore
|
||||
flowPanel.Dock = DockStyle.Fill;
|
||||
flowPanel.AutoScroll = true;
|
||||
flowPanel.Padding = new Padding(15, 60, 15, 15);
|
||||
flowPanel.WrapContents = true;
|
||||
flowPanel.WrapContents = false;
|
||||
flowPanel.Margin = new Padding(0);
|
||||
flowPanel.AutoSize = true;
|
||||
flowPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
flowPanel.AutoScrollMinSize = new Size(0, 3350);
|
||||
flowPanel.AutoScrollMinSize = new Size(0, 5000);
|
||||
contentPanel.Controls.Add(flowPanel);
|
||||
|
||||
// 添加窗体关闭事件处理
|
||||
@@ -709,7 +710,7 @@ namespace AppStore
|
||||
flowPanel.Margin = new Padding(0);
|
||||
flowPanel.AutoSize = true;
|
||||
flowPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink;
|
||||
flowPanel.AutoScrollMinSize = new Size(0, 3350);
|
||||
flowPanel.AutoScrollMinSize = new Size(0, 3800);//大概一行250像素
|
||||
contentPanel.Controls.Add(flowPanel);
|
||||
|
||||
// 添加所有应用卡片并恢复位置
|
||||
@@ -785,6 +786,11 @@ namespace AppStore
|
||||
"https://ghproxy.net/https://github.com/msys2/msys2-installer/releases/download/2025-02-21/msys2-x86_64-20250221.exe",
|
||||
"img/png/MSYS2.png"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"OpenJDK by Azul JDKs",
|
||||
"https://cdn.azul.com/zulu/bin/zulu21.42.19-ca-jdk21.0.7-win_x64.msi",
|
||||
"img/png/Azul_JDKs.png"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
".NET SDK 8.0",
|
||||
"https://dotnet.microsoft.com/zh-cn/download/dotnet/thank-you/sdk-8.0.411-windows-x64-installer",
|
||||
@@ -820,6 +826,16 @@ namespace AppStore
|
||||
"https://ghproxy.net/https://github.com/game1024/OpenSpeedy/releases/download/v1.7.1/OpenSpeedy-v1.7.1.zip",
|
||||
"img/png/openspeedy.png"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"Final2x",
|
||||
"https://ghproxy.net/https://github.com/Tohrusky/Final2x/releases/download/2024-12-14/Final2x-windows-x64-setup.exe",
|
||||
"img/png/Final2x.png"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"Pixpin",
|
||||
"https://download.pixpin.cn/PixPin_2.0.0.3.exe",
|
||||
"img/png/pixpin.png"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"QuickLook",
|
||||
"https://ghproxy.net/https://github.com/QL-Win/QuickLook/releases/download/4.0.2/QuickLook-4.0.2.exe",
|
||||
@@ -1031,6 +1047,11 @@ namespace AppStore
|
||||
"https://ghproxy.cn/https://github.com/reactos/reactos/releases/download/0.4.15-release/ReactOS-0.4.15-release-1-gdbb43bbaeb2-x86-iso.zip",
|
||||
"img/png/ReactOS.png"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"Ubuntu桌面发行版",
|
||||
"https://releases.ubuntu.com/24.04/ubuntu-24.04.2-desktop-amd64.iso",
|
||||
"img/png/Ubuntu.png"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"typescript",
|
||||
"https://ghproxy.net/https://github.com/microsoft/TypeScript/releases/download/v5.8.3/typescript-5.8.3.tgz",
|
||||
@@ -1041,6 +1062,11 @@ namespace AppStore
|
||||
"https://mirror.nju.edu.cn/gimp/gimp/v3.0/windows/gimp-3.0.4-setup.exe",
|
||||
"img/jpg/Gimp.jpg"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"ClamAV",
|
||||
"https://www.clamav.net/downloads/production/clamav-1.4.3.win.x64.msi",
|
||||
"img/png/ClamAV.png"));
|
||||
|
||||
flowPanel.Controls.Add(CreateAppCard(
|
||||
"Shotcut",
|
||||
"https://sourceforge.net/projects/shotcut/files/v25.05.11/shotcut-win64-250511.exe/download",
|
||||
|
||||
@@ -76,6 +76,10 @@ namespace AppStore
|
||||
private static readonly Color DarkText = Color.FromArgb(240, 240, 240);
|
||||
private static readonly Color DarkButtonHover = Color.FromArgb(60, 60, 60);
|
||||
private static readonly Color DarkButtonActive = Color.FromArgb(70, 70, 70);
|
||||
private static readonly Color DarkBorder = Color.FromArgb(80, 80, 80);
|
||||
|
||||
// 浅色主题边框颜色
|
||||
private static readonly Color LightBorder = Color.FromArgb(180, 180, 180);
|
||||
|
||||
public static event Action<ThemeMode> ThemeChanged = delegate {};
|
||||
|
||||
@@ -108,6 +112,9 @@ namespace AppStore
|
||||
public static Color ButtonActiveColor =>
|
||||
_currentTheme == ThemeMode.Light ? LightButtonActive : DarkButtonActive;
|
||||
|
||||
public static Color BorderColor =>
|
||||
_currentTheme == ThemeMode.Light ? LightBorder : DarkBorder;
|
||||
|
||||
public static void ApplyTheme(Control control)
|
||||
{
|
||||
ApplyThemeToControl(control);
|
||||
|
||||
@@ -17,21 +17,7 @@
|
||||
<h2>核心功能</h2>
|
||||
|
||||
<article class="feature">
|
||||
<h3>应用程序管理</h3>
|
||||
<p>批量安装、卸载(目前没有)和更新应用程序(目前没有),管理启动项(目前没有)。</p>
|
||||
<p>优势:集中管理所有应用,节省时间,避免系统臃肿。</p>
|
||||
</article>
|
||||
|
||||
<article class="feature">
|
||||
<h3>资源监控(之后可能在内置工具里有)</h3>
|
||||
<p>实时监控CPU、内存、磁盘和网络使用情况。</p>
|
||||
<p>优势:直观的图表展示,及时发现资源瓶颈。</p>
|
||||
</article>
|
||||
|
||||
<article class="feature">
|
||||
<h3>文件管理(之后可能在内置工具里有)</h3>
|
||||
<p>高级文件搜索、批量重命名和快速文件分类。</p>
|
||||
<p>优势:提升文件管理效率,支持正则表达式搜索。</p>
|
||||
<h3>目前没有什么东西,别看了,害羞(✿◡‿◡)
|
||||
</article>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
BIN
img/png/Azul_JDKs.png
Normal file
BIN
img/png/Azul_JDKs.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.3 KiB |
BIN
img/png/ClamAV.png
Normal file
BIN
img/png/ClamAV.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 36 KiB |
BIN
img/png/Final2x.png
Normal file
BIN
img/png/Final2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.6 KiB |
BIN
img/png/Ubuntu.png
Normal file
BIN
img/png/Ubuntu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 853 B |
BIN
img/png/pixpin.png
Normal file
BIN
img/png/pixpin.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 239 KiB |
@@ -2,7 +2,7 @@
|
||||
; 有关创建 Inno Setup 脚本文件的详细信息,请参阅帮助文档!
|
||||
|
||||
#define MyAppName "kortapp-z"
|
||||
#define MyAppVersion "1.1.9"
|
||||
#define MyAppVersion "1.2.4"
|
||||
#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.1.9"
|
||||
#define MyAppVersion "1.2.4"
|
||||
#define MyAppPublisher "zsyg"
|
||||
#define MyAppURL "https://github.com/zs-yg/kortapp-z"
|
||||
#define MyAppExeName "kortapp-z.exe"
|
||||
|
||||
20
logger.cs
20
logger.cs
@@ -75,5 +75,25 @@ namespace AppStore
|
||||
}
|
||||
Log(warningMessage);
|
||||
}
|
||||
|
||||
public static void LogDebug(string message, Exception? ex = null)
|
||||
{
|
||||
string debugMessage = $"DEBUG: {message}";
|
||||
if (ex != null)
|
||||
{
|
||||
debugMessage += $"\nException: {ex}\nStackTrace: {ex.StackTrace}";
|
||||
}
|
||||
Log(debugMessage);
|
||||
}
|
||||
|
||||
public static void LogTip(string message, Exception? ex = null)
|
||||
{
|
||||
string tipMessage = $"TIP: {message}";
|
||||
if (ex != null)
|
||||
{
|
||||
tipMessage += $"\nException: {ex}\nStackTrace: {ex.StackTrace}";
|
||||
}
|
||||
Log(tipMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user