From 9d4bdd102821f162f3264aa5a0ed360f5dd2ab53 Mon Sep 17 00:00:00 2001 From: ww-rm Date: Tue, 8 Apr 2025 13:51:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=87=E9=A2=98=E6=A0=8F=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SpineViewer/Program.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/SpineViewer/Program.cs b/SpineViewer/Program.cs index 907063d..b1f752b 100644 --- a/SpineViewer/Program.cs +++ b/SpineViewer/Program.cs @@ -1,5 +1,6 @@ using NLog; using System.Diagnostics; +using System.Reflection; namespace SpineViewer { @@ -25,6 +26,8 @@ namespace SpineViewer ///// //public static readonly string TempDir = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), Name)).FullName; + public static string Version => Assembly.GetExecutingAssembly().GetCustomAttribute()?.InformationalVersion; + /// /// 程序日志器 /// @@ -46,7 +49,7 @@ namespace SpineViewer try { - Application.Run(new MainForm()); + Application.Run(new MainForm() { Text = $"SpineViewer - v{Version}"}); } catch (Exception ex) {