From b18d1893f5fe4861a88ffcd24aef9012c1628162 Mon Sep 17 00:00:00 2001 From: yuuko Date: Mon, 24 Nov 2025 16:27:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=89=80=E6=9C=89=E7=B2=98?= =?UTF-8?q?=E8=B4=B4=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 删除三个路径组中的粘贴按钮: - btnPasteSource_Click - btnPasteText_Click - btnPasteOutput_Click 2. 调整布局: - 扩展文本框宽度以适应删除粘贴按钮后的空间 - 重新定位浏览按钮到最右侧 3. 简化界面: - 只保留浏览按钮,界面更简洁 - 用户仍可以在文本框中直接输入路径 - 现代化的文件管理器界面已足够强大 现在界面更加简洁,用户体验更好! 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- Form1.Designer.cs | 48 ++++++-------------------------------------- Form1.cs | 51 ----------------------------------------------- 2 files changed, 6 insertions(+), 93 deletions(-) diff --git a/Form1.Designer.cs b/Form1.Designer.cs index 24566b7..bdeab17 100644 --- a/Form1.Designer.cs +++ b/Form1.Designer.cs @@ -80,12 +80,12 @@ namespace SlideCombine lblSourcePath.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular); txtSourcePath.Location = new Point(15, 40); - txtSourcePath.Size = new Size(480, 22); + txtSourcePath.Size = new Size(580, 22); txtSourcePath.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular); txtSourcePath.BorderStyle = BorderStyle.FixedSingle; btnBrowseSource.Text = "浏览"; - btnBrowseSource.Location = new Point(500, 39); + btnBrowseSource.Location = new Point(600, 39); btnBrowseSource.Size = new Size(60, 24); btnBrowseSource.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular); btnBrowseSource.BackColor = Color.FromArgb(66, 139, 202); @@ -94,21 +94,9 @@ namespace SlideCombine btnBrowseSource.FlatAppearance.BorderSize = 0; btnBrowseSource.Click += new EventHandler(btnBrowseSource_Click); - var btnPasteSource = new Button(); - btnPasteSource.Text = "粘贴"; - btnPasteSource.Location = new Point(565, 39); - btnPasteSource.Size = new Size(60, 24); - btnPasteSource.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular); - btnPasteSource.BackColor = Color.FromArgb(92, 184, 92); - btnPasteSource.ForeColor = Color.White; - btnPasteSource.FlatStyle = FlatStyle.Flat; - btnPasteSource.FlatAppearance.BorderSize = 0; - btnPasteSource.Click += new EventHandler(btnPasteSource_Click); - grpSourceFolder.Controls.Add(lblSourcePath); grpSourceFolder.Controls.Add(txtSourcePath); grpSourceFolder.Controls.Add(btnBrowseSource); - grpSourceFolder.Controls.Add(btnPasteSource); // 设置TXT文件夹组 grpTextFolder.Text = "📄 TXT源文件路径"; @@ -124,12 +112,12 @@ namespace SlideCombine lblTextPath.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular); txtTextPath.Location = new Point(15, 40); - txtTextPath.Size = new Size(480, 22); + txtTextPath.Size = new Size(580, 22); txtTextPath.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular); txtTextPath.BorderStyle = BorderStyle.FixedSingle; btnBrowseText.Text = "浏览"; - btnBrowseText.Location = new Point(500, 39); + btnBrowseText.Location = new Point(600, 39); btnBrowseText.Size = new Size(60, 24); btnBrowseText.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular); btnBrowseText.BackColor = Color.FromArgb(66, 139, 202); @@ -138,21 +126,9 @@ namespace SlideCombine btnBrowseText.FlatAppearance.BorderSize = 0; btnBrowseText.Click += new EventHandler(btnBrowseText_Click); - var btnPasteText = new Button(); - btnPasteText.Text = "粘贴"; - btnPasteText.Location = new Point(565, 39); - btnPasteText.Size = new Size(60, 24); - btnPasteText.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular); - btnPasteText.BackColor = Color.FromArgb(92, 184, 92); - btnPasteText.ForeColor = Color.White; - btnPasteText.FlatStyle = FlatStyle.Flat; - btnPasteText.FlatAppearance.BorderSize = 0; - btnPasteText.Click += new EventHandler(btnPasteText_Click); - grpTextFolder.Controls.Add(lblTextPath); grpTextFolder.Controls.Add(txtTextPath); grpTextFolder.Controls.Add(btnBrowseText); - grpTextFolder.Controls.Add(btnPasteText); // 设置输出文件夹组 grpOutputFolder.Text = "💾 最终输出路径"; @@ -168,12 +144,12 @@ namespace SlideCombine lblOutputPath.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular); txtOutputPath.Location = new Point(15, 40); - txtOutputPath.Size = new Size(480, 22); + txtOutputPath.Size = new Size(580, 22); txtOutputPath.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular); txtOutputPath.BorderStyle = BorderStyle.FixedSingle; btnBrowseOutput.Text = "浏览"; - btnBrowseOutput.Location = new Point(500, 39); + btnBrowseOutput.Location = new Point(600, 39); btnBrowseOutput.Size = new Size(60, 24); btnBrowseOutput.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular); btnBrowseOutput.BackColor = Color.FromArgb(66, 139, 202); @@ -182,21 +158,9 @@ namespace SlideCombine btnBrowseOutput.FlatAppearance.BorderSize = 0; btnBrowseOutput.Click += new EventHandler(btnBrowseOutput_Click); - var btnPasteOutput = new Button(); - btnPasteOutput.Text = "粘贴"; - btnPasteOutput.Location = new Point(565, 39); - btnPasteOutput.Size = new Size(60, 24); - btnPasteOutput.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular); - btnPasteOutput.BackColor = Color.FromArgb(92, 184, 92); - btnPasteOutput.ForeColor = Color.White; - btnPasteOutput.FlatStyle = FlatStyle.Flat; - btnPasteOutput.FlatAppearance.BorderSize = 0; - btnPasteOutput.Click += new EventHandler(btnPasteOutput_Click); - grpOutputFolder.Controls.Add(lblOutputPath); grpOutputFolder.Controls.Add(txtOutputPath); grpOutputFolder.Controls.Add(btnBrowseOutput); - grpOutputFolder.Controls.Add(btnPasteOutput); // 设置按钮面板 pnlButtons.Location = new Point(15, 240); diff --git a/Form1.cs b/Form1.cs index fed2319..d45a9ee 100644 --- a/Form1.cs +++ b/Form1.cs @@ -59,57 +59,6 @@ namespace SlideCombine } } - private void btnPasteSource_Click(object sender, EventArgs e) - { - if (Clipboard.ContainsText()) - { - var pastedPath = Clipboard.GetText().Trim(); - if (!string.IsNullOrEmpty(pastedPath)) - { - txtSourcePath.Text = pastedPath; - LogInfo($"已粘贴PDF路径: {pastedPath}"); - } - } - else - { - MessageBox.Show("剪贴板中没有文本内容", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - } - - private void btnPasteText_Click(object sender, EventArgs e) - { - if (Clipboard.ContainsText()) - { - var pastedPath = Clipboard.GetText().Trim(); - if (!string.IsNullOrEmpty(pastedPath)) - { - txtTextPath.Text = pastedPath; - LogInfo($"已粘贴TXT源路径: {pastedPath}"); - } - } - else - { - MessageBox.Show("剪贴板中没有文本内容", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - } - - private void btnPasteOutput_Click(object sender, EventArgs e) - { - if (Clipboard.ContainsText()) - { - var pastedPath = Clipboard.GetText().Trim(); - if (!string.IsNullOrEmpty(pastedPath)) - { - txtOutputPath.Text = pastedPath; - LogInfo($"已粘贴输出路径: {pastedPath}"); - } - } - else - { - MessageBox.Show("剪贴板中没有文本内容", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); - } - } - private void btnClear_Click(object sender, EventArgs e) { txtSourcePath.Clear();