From d85d2d67ea4ce9b7b86f2afe57d1411580eafac5 Mon Sep 17 00:00:00 2001 From: zsyg <3872006562@qq.com> Date: Wed, 18 Jun 2025 20:33:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=B3=E4=BA=8E=E7=95=8C?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AboutForm.cs | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++ MainForm.cs | 44 +++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 AboutForm.cs diff --git a/AboutForm.cs b/AboutForm.cs new file mode 100644 index 0000000..b6aff33 --- /dev/null +++ b/AboutForm.cs @@ -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); + } + } +} diff --git a/MainForm.cs b/MainForm.cs index bd07187..0c38305 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -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();