mirror of
https://github.com/zs-yg/kortapp-z.git
synced 2025-12-06 08:00:44 +08:00
Add files via upload
This commit is contained in:
17
AppCard.cs
17
AppCard.cs
@@ -15,6 +15,7 @@ namespace AppStore
|
|||||||
private Label nameLabel;
|
private Label nameLabel;
|
||||||
private Panel namePanel;
|
private Panel namePanel;
|
||||||
private Button downloadBtn;
|
private Button downloadBtn;
|
||||||
|
private ToolTip? toolTip;
|
||||||
private Color borderColor = SystemColors.ControlDark;
|
private Color borderColor = SystemColors.ControlDark;
|
||||||
private static readonly ConcurrentDictionary<string, System.Drawing.Drawing2D.GraphicsPath> PathCache =
|
private static readonly ConcurrentDictionary<string, System.Drawing.Drawing2D.GraphicsPath> PathCache =
|
||||||
new ConcurrentDictionary<string, System.Drawing.Drawing2D.GraphicsPath>();
|
new ConcurrentDictionary<string, System.Drawing.Drawing2D.GraphicsPath>();
|
||||||
@@ -22,6 +23,7 @@ namespace AppStore
|
|||||||
public string AppName { get; set; } = string.Empty;
|
public string AppName { get; set; } = string.Empty;
|
||||||
public Image AppIcon { get; set; } = SystemIcons.Application.ToBitmap();
|
public Image AppIcon { get; set; } = SystemIcons.Application.ToBitmap();
|
||||||
public string DownloadUrl { get; set; } = string.Empty;
|
public string DownloadUrl { get; set; } = string.Empty;
|
||||||
|
public string Description { get; set; } = string.Empty;
|
||||||
public bool ShowDownloadButton { get; set; } = true;
|
public bool ShowDownloadButton { get; set; } = true;
|
||||||
|
|
||||||
public AppCard()
|
public AppCard()
|
||||||
@@ -126,6 +128,13 @@ namespace AppStore
|
|||||||
this.Controls.Add(namePanel);
|
this.Controls.Add(namePanel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 初始化ToolTip控件
|
||||||
|
toolTip = new ToolTip();
|
||||||
|
toolTip.AutoPopDelay = 5000;
|
||||||
|
toolTip.InitialDelay = 500;
|
||||||
|
toolTip.ReshowDelay = 500;
|
||||||
|
toolTip.ShowAlways = true;
|
||||||
|
|
||||||
// 下载按钮 - 添加null检查
|
// 下载按钮 - 添加null检查
|
||||||
if (downloadBtn != null)
|
if (downloadBtn != null)
|
||||||
{
|
{
|
||||||
@@ -144,6 +153,10 @@ namespace AppStore
|
|||||||
if (downloadBtn != null)
|
if (downloadBtn != null)
|
||||||
{
|
{
|
||||||
downloadBtn.BackColor = Color.FromArgb(0, 150, 255);
|
downloadBtn.BackColor = Color.FromArgb(0, 150, 255);
|
||||||
|
if (!string.IsNullOrEmpty(Description))
|
||||||
|
{
|
||||||
|
toolTip.SetToolTip(downloadBtn, Description);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -373,7 +386,7 @@ namespace AppStore
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
var safePath = path ?? CalculatePathFallback(Width, Height, 10);
|
var safePath = path ?? CalculatePathFallback(Width, Height, 10);
|
||||||
// 更严格的null检查,包括路径和控件状态
|
// 更严格的null检查,包括路径和控件状态
|
||||||
if (safePath != null &&
|
if (safePath != null &&
|
||||||
safePath.PointCount > 0 &&
|
safePath.PointCount > 0 &&
|
||||||
this.IsHandleCreated &&
|
this.IsHandleCreated &&
|
||||||
@@ -450,7 +463,7 @@ namespace AppStore
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 更严格的null检查
|
// 更严格的null检查
|
||||||
// 更严格的null检查,包括DownloadManager.Instance和其方法
|
// 更严格的null检查,包括DownloadManager.Instance和其方法
|
||||||
// 全面的null和状态检查
|
// 全面的null和状态检查
|
||||||
var downloadManager = DownloadManager.Instance;
|
var downloadManager = DownloadManager.Instance;
|
||||||
if (sender == null || e == null ||
|
if (sender == null || e == null ||
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ namespace AppStore
|
|||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// 忽略所有异常,使用默认值
|
// 忽略所有异常,使用默认值
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@@ -115,7 +115,7 @@ namespace AppStore
|
|||||||
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
|
||||||
"Downloads");
|
"Downloads");
|
||||||
|
|
||||||
Logger.LogError($"下载路径{downloadsDir}不可用,将使用默认路径: {defaultPath}", ex);
|
Logger.LogError($"下载路径{downloadsDir}不可用,将使用默认路径: {defaultPath}", ex);
|
||||||
downloadsDir = defaultPath;
|
downloadsDir = defaultPath;
|
||||||
Directory.CreateDirectory(downloadsDir);
|
Directory.CreateDirectory(downloadsDir);
|
||||||
}
|
}
|
||||||
|
|||||||
26
README.md
26
README.md
@@ -1,20 +1,20 @@
|
|||||||
# Kortapp-z - Windows应用商店 --主张软件开源、免费,拒绝广告
|
# Kortapp-z - Windows应用商店 --主张软件开源、免费,拒绝广告
|
||||||
|
|
||||||
小立一个flag:从不接受广告,不停更新
|
小立一个flag:从不接受广告,不停更新
|
||||||
|
|
||||||
## 项目开源行为
|
## 项目开源行为
|
||||||
|
|
||||||
1. 项目代码开源,允许任何人使用、修改、分发、商用,但必须注明原作者。
|
1. 项目代码开源,允许任何人使用、修改、分发、商用,但必须注明原作者。
|
||||||
2. 项目图标、截图等资源开源,允许任何人使用、修改、分发、商用,但必须注明原作者。
|
2. 项目图标、截图等资源开源,允许任何人使用、修改、分发、商用,但必须注明原作者。
|
||||||
3. 项目的任何衍生品(包括但不限于网站、APP、插件等)必须遵循以上开源协议。
|
3. 项目的任何衍生品(包括但不限于网站、APP、插件等)必须遵循以上开源协议。
|
||||||
4. 项目不接受任何形式的广告,不得在任何地方投放广告。
|
4. 项目不接受任何形式的广告,不得在任何地方投放广告。
|
||||||
5. 项目不接受任何形式的捐赠、赞助
|
5. 项目不接受任何形式的捐赠、赞助
|
||||||
6. 项目可以进行PR,欢迎任何形式的PR,不提交issue也可以
|
6. 项目可以进行PR,欢迎任何形式的PR,不提交issue也可以
|
||||||
7. 本项目可以PR一些你自己的项目,如果star数量不到1k,都会被删除
|
7. 本项目可以PR一些你自己的项目,如果star数量不到1k,都会被删除
|
||||||
|
|
||||||
## 项目简介
|
## 项目简介
|
||||||
|
|
||||||
一个简单的Windows应用商店应用,提供软件下载和管理功能。
|
一个简单的Windows应用商店应用,提供软件下载和管理功能。
|
||||||
提供软件管理、下载管理、内置工具使用等功能
|
提供软件管理、下载管理、内置工具使用等功能
|
||||||
|
|
||||||
## 功能特点
|
## 功能特点
|
||||||
@@ -44,7 +44,7 @@ dotnet publish AppStore.csproj -c Release -r win-x86 --self-contained false /p:O
|
|||||||
dotnet publish AppStore.csproj -c Release -r win-x64 --self-contained false /p:Optimize=true /p:DebugType=None
|
dotnet publish AppStore.csproj -c Release -r win-x64 --self-contained false /p:Optimize=true /p:DebugType=None
|
||||||
```
|
```
|
||||||
|
|
||||||
打包后的可执行文件将包含指定的应用程序图标,输出路径为:
|
打包后的可执行文件将包含指定的应用程序图标,输出路径为:
|
||||||
```
|
```
|
||||||
bin\Release\net8.0-windows\[platform]\publish
|
bin\Release\net8.0-windows\[platform]\publish
|
||||||
```
|
```
|
||||||
@@ -84,14 +84,12 @@ 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)
|
|
||||||
|
|
||||||
|
|
||||||
## 维护
|
## 维护
|
||||||
|
|
||||||
由于gitee我没怎么用,而且操作麻烦,gitee镜像将不会继续同步,有懂得人可以帮我搞下镜像吗,qq: 3872006562,也可以b站直接私信,我会在readme中鸣谢的,谢谢各位
|
由于gitee我没怎么用,而且操作麻烦,gitee镜像将不会继续同步,有懂得人可以帮我搞下镜像吗,qq: 3872006562,也可以b站直接私信,我会在readme中鸣谢的,谢谢各位
|
||||||
由于和Daye发生了矛盾,所以windowscleaner将永远不上架,我要自己努力
|
由于和Daye发生了矛盾,所以windowscleaner将永远不上架,我要自己努力
|
||||||
提示:由于github上传文件的限制,img/png/NET.png,请改名为.NET.png,否则程序可能出现无法预料的问题
|
提示:由于github上传文件的限制,img/png/NET.png,请改名为.NET.png,否则程序可能出现无法预料的问题
|
||||||
|
|
||||||
每一个人都可以通过PR添加属于自己的合法软件
|
每一个人都可以通过PR添加属于自己的合法软件
|
||||||
|
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ namespace AppStore
|
|||||||
var jsonData = JsonSerializer.Deserialize<JsonElement>(jsonString);
|
var jsonData = JsonSerializer.Deserialize<JsonElement>(jsonString);
|
||||||
string customPath = jsonData.GetProperty("DownloadPath").GetString() ?? "";
|
string customPath = jsonData.GetProperty("DownloadPath").GetString() ?? "";
|
||||||
|
|
||||||
// 如果自定义路径有效则显示,否则显示默认路径
|
// 如果自定义路径有效则显示,否则显示默认路径
|
||||||
txtBox.Text = !string.IsNullOrWhiteSpace(customPath) ? customPath : defaultPath;
|
txtBox.Text = !string.IsNullOrWhiteSpace(customPath) ? customPath : defaultPath;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
首先,如果希望编译程序,那么必须安装.NET8.0 SDK
|
首先,如果希望编译程序,那么必须安装.NET8.0 SDK
|
||||||
下载链接:https://dotnet.microsoft.com/zh-cn/download/dotnet/thank-you/sdk-8.0.411-windows-x64-installer
|
下载链接:https://dotnet.microsoft.com/zh-cn/download/dotnet/thank-you/sdk-8.0.411-windows-x64-installer
|
||||||
|
|
||||||
使用一下指令编译
|
使用一下指令编译
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
如果希望运行,那么必须安装.NET8.0 SDK
|
如果希望运行,那么必须安装.NET8.0 SDK
|
||||||
|
|
||||||
下载链接:https://dotnet.microsoft.com/zh-cn/download/dotnet/thank-you/sdk-8.0.411-windows-x64-installer
|
下载链接:https://dotnet.microsoft.com/zh-cn/download/dotnet/thank-you/sdk-8.0.411-windows-x64-installer
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ namespace AppStore
|
|||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
// 忽略错误,使用默认主题
|
// 忽略错误,使用默认主题
|
||||||
}
|
}
|
||||||
return ThemeMode.Light;
|
return ThemeMode.Light;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ int main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
std::cout << "日志目录不存在,无需清理" << std::endl;
|
std::cout << "日志目录不存在,无需清理" << std::endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user