diff --git a/AboutForm.cs b/AboutForm.cs index d199032..53e2632 100644 --- a/AboutForm.cs +++ b/AboutForm.cs @@ -50,7 +50,7 @@ namespace AppStore // 初始化并添加应用信息 infoLabel = new Label(); - infoLabel.Text = "kortapp-z\n版本: 1.0.6\n作者: zs-yg\n一个简单、开源的应用商店\nkortapp-z是完全免费\n基于.NET8和C++的软件"; + infoLabel.Text = "kortapp-z\n版本: 1.0.7\n作者: zs-yg\n一个简单、开源的应用商店\nkortapp-z是完全免费\n基于.NET8和C/C++的软件"; infoLabel.Font = new Font("Microsoft YaHei", 12); infoLabel.AutoSize = false; infoLabel.Width = 300; diff --git a/MainForm.cs b/MainForm.cs index 3fc3762..ff2fb9d 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -267,8 +267,13 @@ namespace AppStore var flowPanel = new FlowLayoutPanel(); flowPanel.Dock = DockStyle.Fill; flowPanel.AutoScroll = true; - flowPanel.WrapContents = false; + flowPanel.WrapContents = true; flowPanel.FlowDirection = FlowDirection.LeftToRight; + flowPanel.Padding = new Padding(15, 50, 15, 15); + flowPanel.Margin = new Padding(0); + flowPanel.AutoSize = true; + flowPanel.AutoSizeMode = AutoSizeMode.GrowAndShrink; + flowPanel.AutoScrollMinSize = new Size(0, 3350); contentPanel.Controls.Add(flowPanel); // 系统清理卡片 @@ -441,6 +446,44 @@ namespace AppStore }; flowPanel.Controls.Add(systemInfoCard); + // 视频压缩工具卡片 + var videoCompressorCard = new ToolCard(); + videoCompressorCard.ToolName = "视频压缩工具"; + + try + { + string iconPath = Path.Combine(Application.StartupPath, "img", "resource", "png", "video_compressor.png"); + if (File.Exists(iconPath)) + { + videoCompressorCard.ToolIcon = Image.FromFile(iconPath); + } + else + { + videoCompressorCard.ToolIcon = SystemIcons.Shield.ToBitmap(); + } + } + catch + { + videoCompressorCard.ToolIcon = SystemIcons.Shield.ToBitmap(); + } + + videoCompressorCard.UpdateDisplay(); + videoCompressorCard.ToolCardClicked += (s, e) => { + try { + string toolPath = Path.Combine(Application.StartupPath, "resource", "video_compressor.exe"); + if (File.Exists(toolPath)) { + Process.Start(toolPath); + } else { + MessageBox.Show("视频压缩工具未找到,请确保已正确安装", "错误", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } catch (Exception ex) { + MessageBox.Show($"启动视频压缩工具失败: {ex.Message}", "错误", + MessageBoxButtons.OK, MessageBoxIcon.Error); + } + }; + flowPanel.Controls.Add(videoCompressorCard); + } catch (Exception ex) { diff --git a/renexe.bat b/renexe.bat new file mode 100644 index 0000000..2201459 --- /dev/null +++ b/renexe.bat @@ -0,0 +1,2 @@ +ren bin\Release\net8.0-windows\win-x86\publish\AppStore.exe kortapp.exe +ren bin\Release\net8.0-windows\win-x64\publish\AppStore.exe kortapp.exe \ No newline at end of file