字体预览工具 v1.0.0 初始版本
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace FontPreview;
|
||||
|
||||
internal static class Program
|
||||
{
|
||||
[STAThread]
|
||||
private static void Main()
|
||||
{
|
||||
try
|
||||
{
|
||||
// 被 runas 拉起的安装子进程:只做系统字体注册,不显示主界面
|
||||
string[] cmdArgs = Environment.GetCommandLineArgs();
|
||||
if (cmdArgs.Length >= 3 && string.Equals(cmdArgs[1], "/install", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
InstallRunner.Run(cmdArgs[2]);
|
||||
return;
|
||||
}
|
||||
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run((Form)(object)new MainForm());
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("启动失败,详情:\r\n\r\n" + ex.ToString(), AppInfo.AppName, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user