1. 增加独立的TXT输出路径选择功能 2. 全面美化界面设计: - 使用现代化扁平设计风格 - 添加emoji图标增强视觉效果 - 统一色彩方案(蓝色主题) - 改进字体和布局 - 增大窗口尺寸(700x550) 3. 优化日志显示: - 添加时间戳 - 支持彩色日志(绿色成功、红色错误、蓝色信息) - 使用Consolas字体提升可读性 4. 改进用户体验: - 按钮文案更加友好 - 更清晰的路径选择描述 - 增强的视觉反馈 界面现在更加美观专业,用户体验大幅提升! 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
218 lines
8.8 KiB
C#
218 lines
8.8 KiB
C#
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, 550);
|
||
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();
|
||
|
||
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 TextBox();
|
||
|
||
// 设置源文件夹组
|
||
grpSourceFolder.Text = "📁 PDF文件夹路径";
|
||
grpSourceFolder.Location = new Point(15, 15);
|
||
grpSourceFolder.Size = new Size(670, 80);
|
||
grpSourceFolder.TabStop = false;
|
||
grpSourceFolder.BackColor = Color.White;
|
||
grpSourceFolder.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
|
||
|
||
lblSourcePath.Text = "选择包含PDF文件夹的路径:";
|
||
lblSourcePath.Location = new Point(15, 20);
|
||
lblSourcePath.Size = new Size(200, 23);
|
||
lblSourcePath.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
|
||
|
||
txtSourcePath.Location = new Point(15, 45);
|
||
txtSourcePath.Size = new Size(540, 25);
|
||
txtSourcePath.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
|
||
txtSourcePath.BorderStyle = BorderStyle.FixedSingle;
|
||
|
||
btnBrowseSource.Text = "浏览";
|
||
btnBrowseSource.Location = new Point(560, 44);
|
||
btnBrowseSource.Size = new Size(80, 27);
|
||
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);
|
||
|
||
// 设置输出文件夹组
|
||
grpOutputFolder.Text = "📄 TXT输出路径";
|
||
grpOutputFolder.Location = new Point(15, 105);
|
||
grpOutputFolder.Size = new Size(670, 80);
|
||
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(200, 23);
|
||
lblOutputPath.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
|
||
|
||
txtOutputPath.Location = new Point(15, 45);
|
||
txtOutputPath.Size = new Size(540, 25);
|
||
txtOutputPath.Font = new Font("Microsoft YaHei", 9F, FontStyle.Regular);
|
||
txtOutputPath.BorderStyle = BorderStyle.FixedSingle;
|
||
|
||
btnBrowseOutput.Text = "浏览";
|
||
btnBrowseOutput.Location = new Point(560, 44);
|
||
btnBrowseOutput.Size = new Size(80, 27);
|
||
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, 195);
|
||
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, 255);
|
||
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 = ScrollBars.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(grpOutputFolder);
|
||
Controls.Add(pnlButtons);
|
||
Controls.Add(grpProgress);
|
||
}
|
||
|
||
#endregion
|
||
|
||
private GroupBox grpSourceFolder;
|
||
private Label lblSourcePath;
|
||
private TextBox txtSourcePath;
|
||
private Button btnBrowseSource;
|
||
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 TextBox txtLog;
|
||
}
|
||
}
|