diff --git a/src/STPViewer/MainWindow.xaml b/src/STPViewer/MainWindow.xaml index 51b3809..9ffc036 100644 --- a/src/STPViewer/MainWindow.xaml +++ b/src/STPViewer/MainWindow.xaml @@ -4,7 +4,7 @@ xmlns:h="http://helix-toolkit.org/wpf" xmlns:conv="clr-namespace:STPViewer.Converters" xmlns:vm="clr-namespace:STPViewer.ViewModels" - Title="STPViewer V0.3.1 — STP/STEP 3D 檢視器" + Title="STPViewer — STP/STEP 3D 檢視器" Height="820" Width="1320" WindowStartupLocation="CenterScreen" AllowDrop="True" Drop="Window_Drop" DragOver="Window_DragOver"> diff --git a/src/STPViewer/MainWindow.xaml.cs b/src/STPViewer/MainWindow.xaml.cs index af5e1da..ae92dcd 100644 --- a/src/STPViewer/MainWindow.xaml.cs +++ b/src/STPViewer/MainWindow.xaml.cs @@ -1,4 +1,5 @@ using System.Linq; +using System.Reflection; using System.Windows; using System.Windows.Input; using STPViewer.Services; @@ -13,6 +14,9 @@ public partial class MainWindow : Window public MainWindow() { InitializeComponent(); + // 版號單一來源 = csproj ;標題執行時讀,避免寫死 + var v = Assembly.GetExecutingAssembly().GetName().Version!; + Title = $"STPViewer V{v.Major}.{v.Minor}.{v.Build} — STP/STEP 3D 檢視器"; DataContext = _vm; _vm.Attach(viewport); _vm.AttachOverlay(gizmoOverlay); diff --git a/src/STPViewer/STPViewer.csproj b/src/STPViewer/STPViewer.csproj index 8cfdffd..1253814 100644 --- a/src/STPViewer/STPViewer.csproj +++ b/src/STPViewer/STPViewer.csproj @@ -6,6 +6,7 @@ enable enable true + 0.3.1