SlideCombine/Form1.Designer.cs
yuuko b004c5ac31 增加三路径选择功能
1. 添加三个独立的路径选择:
   - 📁 PDF文件夹路径(含FreePic2Pdf_bkmk.txt文件)
   - 📄 TXT源文件路径(含元数据TXT文件)
   - 💾 最终输出路径(合并后文件的保存位置)

2. 界面调整:
   - 增大窗口高度至650px以容纳三个路径组
   - 重新设计布局,三个路径组垂直排列
   - 更新按钮和进度组位置
   - 优化控件间距和大小

3. 逻辑更新:
   - 更新FileMerger.ProcessAllFolders支持三个参数
   - 修改GetCorrespondingTxtFile使用指定的TXT源路径
   - 更新界面验证逻辑检查所有三个路径
   - 添加路径存在性验证

现在用户可以完全灵活地选择输入和输出路径,提供更好的使用体验!

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 16:14:05 +08:00

260 lines
11 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Drawing;
using System.Windows.Forms;
namespace SlideCombine
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
// 主窗体设置
AutoScaleMode = AutoScaleMode.Font;
ClientSize = new Size(700, 650);
Text = "PDF书签合并工具 v1.0";
StartPosition = FormStartPosition.CenterScreen;
BackColor = Color.FromArgb(240, 240, 240);
// 创建控件
grpSourceFolder = new GroupBox();
lblSourcePath = new Label();
txtSourcePath = new TextBox();
btnBrowseSource = new Button();
grpTextFolder = new GroupBox();
lblTextPath = new Label();
txtTextPath = new TextBox();
btnBrowseText = new Button();
grpOutputFolder = new GroupBox();
lblOutputPath = new Label();
txtOutputPath = new TextBox();
btnBrowseOutput = new Button();
pnlButtons = new Panel();
btnMerge = new Button();
btnClear = new Button();
btnExit = new Button();
grpProgress = new GroupBox();
progressBar = new ProgressBar();
txtLog = new RichTextBox();
// 设置PDF文件夹组
grpSourceFolder.Text = "📁 PDF文件夹路径";
grpSourceFolder.Location = new Point(15, 15);
grpSourceFolder.Size = new Size(670, 70);
grpSourceFolder.TabStop = false;
grpSourceFolder.BackColor = Color.White;
grpSourceFolder.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
lblSourcePath.Text = "选择包含PDF文件夹的路径含FreePic2Pdf_bkmk.txt文件";
lblSourcePath.Location = new Point(15, 20);
lblSourcePath.Size = new Size(350, 20);
lblSourcePath.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
txtSourcePath.Location = new Point(15, 40);
txtSourcePath.Size = new Size(540, 22);
txtSourcePath.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
txtSourcePath.BorderStyle = BorderStyle.FixedSingle;
btnBrowseSource.Text = "浏览";
btnBrowseSource.Location = new Point(560, 39);
btnBrowseSource.Size = new Size(80, 24);
btnBrowseSource.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
btnBrowseSource.BackColor = Color.FromArgb(66, 139, 202);
btnBrowseSource.ForeColor = Color.White;
btnBrowseSource.FlatStyle = FlatStyle.Flat;
btnBrowseSource.FlatAppearance.BorderSize = 0;
btnBrowseSource.Click += new EventHandler(btnBrowseSource_Click);
grpSourceFolder.Controls.Add(lblSourcePath);
grpSourceFolder.Controls.Add(txtSourcePath);
grpSourceFolder.Controls.Add(btnBrowseSource);
// 设置TXT文件夹组
grpTextFolder.Text = "📄 TXT源文件路径";
grpTextFolder.Location = new Point(15, 90);
grpTextFolder.Size = new Size(670, 70);
grpTextFolder.TabStop = false;
grpTextFolder.BackColor = Color.White;
grpTextFolder.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
lblTextPath.Text = "选择包含元数据TXT文件的路径";
lblTextPath.Location = new Point(15, 20);
lblTextPath.Size = new Size(350, 20);
lblTextPath.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
txtTextPath.Location = new Point(15, 40);
txtTextPath.Size = new Size(540, 22);
txtTextPath.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
txtTextPath.BorderStyle = BorderStyle.FixedSingle;
btnBrowseText.Text = "浏览";
btnBrowseText.Location = new Point(560, 39);
btnBrowseText.Size = new Size(80, 24);
btnBrowseText.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
btnBrowseText.BackColor = Color.FromArgb(66, 139, 202);
btnBrowseText.ForeColor = Color.White;
btnBrowseText.FlatStyle = FlatStyle.Flat;
btnBrowseText.FlatAppearance.BorderSize = 0;
btnBrowseText.Click += new EventHandler(btnBrowseText_Click);
grpTextFolder.Controls.Add(lblTextPath);
grpTextFolder.Controls.Add(txtTextPath);
grpTextFolder.Controls.Add(btnBrowseText);
// 设置输出文件夹组
grpOutputFolder.Text = "💾 最终输出路径";
grpOutputFolder.Location = new Point(15, 165);
grpOutputFolder.Size = new Size(670, 70);
grpOutputFolder.TabStop = false;
grpOutputFolder.BackColor = Color.White;
grpOutputFolder.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
lblOutputPath.Text = "选择合并后TXT文件的输出路径";
lblOutputPath.Location = new Point(15, 20);
lblOutputPath.Size = new Size(350, 20);
lblOutputPath.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
txtOutputPath.Location = new Point(15, 40);
txtOutputPath.Size = new Size(540, 22);
txtOutputPath.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
txtOutputPath.BorderStyle = BorderStyle.FixedSingle;
btnBrowseOutput.Text = "浏览";
btnBrowseOutput.Location = new Point(560, 39);
btnBrowseOutput.Size = new Size(80, 24);
btnBrowseOutput.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
btnBrowseOutput.BackColor = Color.FromArgb(66, 139, 202);
btnBrowseOutput.ForeColor = Color.White;
btnBrowseOutput.FlatStyle = FlatStyle.Flat;
btnBrowseOutput.FlatAppearance.BorderSize = 0;
btnBrowseOutput.Click += new EventHandler(btnBrowseOutput_Click);
grpOutputFolder.Controls.Add(lblOutputPath);
grpOutputFolder.Controls.Add(txtOutputPath);
grpOutputFolder.Controls.Add(btnBrowseOutput);
// 设置按钮面板
pnlButtons.Location = new Point(15, 240);
pnlButtons.Size = new Size(670, 50);
pnlButtons.BackColor = Color.Transparent;
btnMerge.Text = "🚀 开始合并";
btnMerge.Location = new Point(15, 10);
btnMerge.Size = new Size(120, 30);
btnMerge.Font = new Font("Microsoft YaHei", 10F, FontStyle.Bold);
btnMerge.BackColor = Color.FromArgb(92, 184, 92);
btnMerge.ForeColor = Color.White;
btnMerge.FlatStyle = FlatStyle.Flat;
btnMerge.FlatAppearance.BorderSize = 0;
btnMerge.Click += new EventHandler(btnMerge_Click);
btnClear.Text = "🔄 清空";
btnClear.Location = new Point(145, 10);
btnClear.Size = new Size(100, 30);
btnClear.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
btnClear.BackColor = Color.FromArgb(240, 173, 78);
btnClear.ForeColor = Color.White;
btnClear.FlatStyle = FlatStyle.Flat;
btnClear.FlatAppearance.BorderSize = 0;
btnClear.Click += new EventHandler(btnClear_Click);
btnExit.Text = "❌ 退出";
btnExit.Location = new Point(255, 10);
btnExit.Size = new Size(100, 30);
btnExit.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
btnExit.BackColor = Color.FromArgb(217, 83, 79);
btnExit.ForeColor = Color.White;
btnExit.FlatStyle = FlatStyle.Flat;
btnExit.FlatAppearance.BorderSize = 0;
btnExit.Click += new EventHandler(btnExit_Click);
pnlButtons.Controls.Add(btnMerge);
pnlButtons.Controls.Add(btnClear);
pnlButtons.Controls.Add(btnExit);
// 设置进度组
grpProgress.Text = "📊 处理进度";
grpProgress.Location = new Point(15, 295);
grpProgress.Size = new Size(670, 280);
grpProgress.TabStop = false;
grpProgress.BackColor = Color.White;
grpProgress.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
progressBar.Location = new Point(15, 25);
progressBar.Size = new Size(640, 25);
progressBar.Style = ProgressBarStyle.Continuous;
progressBar.ForeColor = Color.FromArgb(66, 139, 202);
txtLog.Location = new Point(15, 60);
txtLog.Size = new Size(640, 200);
txtLog.Multiline = true;
txtLog.ScrollBars = RichTextBoxScrollBars.Vertical;
txtLog.ReadOnly = true;
txtLog.Font = new Font("Consolas", 9F, FontStyle.Regular);
txtLog.BackColor = Color.FromArgb(248, 248, 248);
txtLog.BorderStyle = BorderStyle.FixedSingle;
grpProgress.Controls.Add(progressBar);
grpProgress.Controls.Add(txtLog);
// 添加所有控件到窗体
Controls.Add(grpSourceFolder);
Controls.Add(grpTextFolder);
Controls.Add(grpOutputFolder);
Controls.Add(pnlButtons);
Controls.Add(grpProgress);
}
#endregion
private GroupBox grpSourceFolder;
private Label lblSourcePath;
private TextBox txtSourcePath;
private Button btnBrowseSource;
private GroupBox grpTextFolder;
private Label lblTextPath;
private TextBox txtTextPath;
private Button btnBrowseText;
private GroupBox grpOutputFolder;
private Label lblOutputPath;
private TextBox txtOutputPath;
private Button btnBrowseOutput;
private Panel pnlButtons;
private Button btnMerge;
private Button btnClear;
private Button btnExit;
private GroupBox grpProgress;
private ProgressBar progressBar;
private RichTextBox txtLog;
}
}