Files
font-preview/FontPreview/AboutDialog.cs
T

71 lines
2.1 KiB
C#
Raw Permalink 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.Reflection;
using System.Windows.Forms;
namespace FontPreview
{
/// <summary>
/// 关于对话框:显示版本、功能简介与技术说明。独立窗体,不影响主程序逻辑。
/// </summary>
public class AboutDialog : Form
{
public AboutDialog()
{
Text = "关于";
FormBorderStyle = FormBorderStyle.FixedDialog;
MaximizeBox = false;
MinimizeBox = false;
StartPosition = FormStartPosition.CenterParent;
ClientSize = new Size(460, 320);
Font = new Font("Microsoft YaHei UI", 9f);
Assembly asm = Assembly.GetExecutingAssembly();
string ver = asm.GetName().Version != null ? asm.GetName().Version.ToString() : "1.0";
Label title = new Label
{
Text = AppInfo.FullTitle,
Font = new Font("Microsoft YaHei UI", 14f, FontStyle.Bold),
Location = new Point(18, 16),
Size = new Size(420, 30)
};
TextBox body = new TextBox
{
Multiline = true,
ReadOnly = true,
ScrollBars = ScrollBars.Vertical,
Location = new Point(18, 56),
Size = new Size(424, 218),
BackColor = Color.White,
BorderStyle = BorderStyle.FixedSingle,
Text =
"免安装字体预览 / 批量管理工具\r\n\r\n" +
"主要功能:\r\n" +
"• 直接预览未安装的 TTF / OTF / TTC 字体\r\n" +
"• 卡片式批量预览,后台渲染、可随时停止\r\n" +
"• 绿色快捷方式安装 / 注册表安装双模式\r\n" +
"• 批量移动、批量重命名、标签与分类管理\r\n" +
"• 支持局域网 / NAS 网络共享盘字体\r\n" +
"• 导出系统字体、自定义字色底色与字号\r\n\r\n" +
"技术:.NET WinForms,PrivateFontCollection 免加载预览,完全离线运行。\r\n\r\n" +
"提示:右键“预览文字”框可一键填入中文样例。"
};
Button ok = new Button
{
Text = "确定",
DialogResult = DialogResult.OK,
Location = new Point(360, 284),
Size = new Size(82, 28)
};
Controls.Add(title);
Controls.Add(body);
Controls.Add(ok);
AcceptButton = ok;
}
}
}