Compare commits

...

3 Commits

Author SHA1 Message Date
zsyg
d85d2d67ea 添加关于界面 2025-06-18 20:33:12 +08:00
zsyg
532006297a Add files via upload 2025-06-18 20:32:45 +08:00
zsyg
8ccf566d88 修复资源文件链接问题 2025-06-18 20:31:45 +08:00
8 changed files with 110 additions and 0 deletions

66
AboutForm.cs Normal file
View File

@@ -0,0 +1,66 @@
using System;
using System.Drawing;
using System.Windows.Forms;
namespace AppStore
{
public class AboutForm : Form
{
public AboutForm()
{
InitializeComponent();
}
private void InitializeComponent()
{
this.Text = "关于 kortapp-z";
this.Size = new Size(500, 400);
this.StartPosition = FormStartPosition.CenterScreen;
this.FormBorderStyle = FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
// 添加应用图标
PictureBox logo = new PictureBox();
try
{
logo.Image = Image.FromFile("img/png/kortapp-z.png");
logo.SizeMode = PictureBoxSizeMode.Zoom;
logo.Width = 200;
logo.Height = 200;
logo.Location = new Point((this.Width - logo.Width) / 2, 30);
this.Controls.Add(logo);
}
catch (Exception ex)
{
MessageBox.Show($"无法加载应用图标: {ex.Message}");
}
// 添加应用信息
Label infoLabel = new Label();
infoLabel.Text = "kortapp-z\n版本: 0.9.5\n一个简单、开源的应用商店\nkortapp-z是完全免费的基于.NET8和C++的软件";
infoLabel.Font = new Font("Microsoft YaHei", 12);
infoLabel.AutoSize = false;
infoLabel.Width = this.ClientSize.Width - 40;
infoLabel.Height = 100;
infoLabel.TextAlign = ContentAlignment.MiddleCenter;
infoLabel.Location = new Point(
20,
logo.Bottom + 20
);
this.Controls.Add(infoLabel);
// 添加关闭按钮
Button closeButton = new Button();
closeButton.Text = "关闭";
closeButton.Width = 100;
closeButton.Height = 40;
closeButton.Location = new Point(
(this.Width - closeButton.Width) / 2,
infoLabel.Bottom + 30
);
closeButton.Click += (s, e) => this.Close();
this.Controls.Add(closeButton);
}
}
}

View File

@@ -17,6 +17,8 @@ namespace AppStore
private Button btnDownloads = null!;
// 设置按钮
private Button btnSettings = null!;
// 关于按钮
private Button btnAbout = null!;
// 内容显示面板
private Panel contentPanel = null!;
@@ -95,6 +97,18 @@ namespace AppStore
};
buttonPanel.Controls.Add(btnSettings);
// 关于按钮
btnAbout = new Button();
btnAbout.Text = "关于";
btnAbout.Location = new Point(450, 0);
styleButton(btnAbout);
btnAbout.Click += (s, e) => {
Logger.Log("用户点击了'关于'按钮");
var aboutForm = new AboutForm();
aboutForm.ShowDialog();
};
buttonPanel.Controls.Add(btnAbout);
// 现代化内容区域
contentPanel = new Panel();
contentPanel.Dock = DockStyle.Fill;
@@ -596,6 +610,36 @@ namespace AppStore
"glance",
"https://ghproxy.net/https://github.com/glanceapp/glance/releases/download/v0.8.4/glance-windows-amd64.zip",
"img/png/glance.png"));
flowPanel.Controls.Add(CreateAppCard(
"openark",
"https://ghproxy.net/https://github.com/BlackINT3/OpenArk/releases/download/v1.3.8/OpenArk64.exe",
"img/png/openark.png"));
flowPanel.Controls.Add(CreateAppCard(
"SSM",
"https://ghproxy.net/https://github.com/AlexanderPro/SmartSystemMenu/releases/download/v2.31.0/SmartSystemMenu_v2.31.0.zip",
"img/png/SSM.png"));
flowPanel.Controls.Add(CreateAppCard(
"Ditto",
"https://ghproxy.net/https://github.com/sabrogden/Ditto/releases/download/3.24.246.0/DittoSetup_64bit_3_24_246_0.exe",
"img/png/Ditto.png"));
flowPanel.Controls.Add(CreateAppCard(
"XDM",
"https://github.com/subhra74/xdm/releases/download/7.2.11/xdm-setup.msi",
"img/png/XDM.png"));
flowPanel.Controls.Add(CreateAppCard(
"FDM",
"https://files2.freedownloadmanager.org/6/latest/fdm_x64_setup.exe",
"img/png/FDM.png"));
flowPanel.Controls.Add(CreateAppCard(
"ABDM",
"https://ghproxy.net/https://github.com/amir1376/ab-download-manager/releases/download/v1.6.4/ABDownloadManager_1.6.4_windows_x64.exe",
"img/png/ABDM.png"));
}
private FlowLayoutPanel downloadsFlowPanel = new FlowLayoutPanel();

BIN
img/png/ABDM.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
img/png/FDM.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 895 B

BIN
img/png/XDM.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.