App version to constants

This commit is contained in:
2026-02-17 09:19:16 +09:00
parent 4f16b09612
commit cf67eae49d
3 changed files with 4 additions and 2 deletions
+2
View File
@@ -5,6 +5,8 @@ namespace ReceiptPDFBuilder.Helpers;
class Constants
{
public static string AppVersion = "1.0.0";
public static string[] GetQuotes()
{
// sources:
+1 -1
View File
@@ -12,7 +12,7 @@
<PublishTrimmed>true</PublishTrimmed>
<PublishAot>true</PublishAot>
<AssemblyName>ReceiptPDFBuilder</AssemblyName>
<AssemblyVersion>1.0.0</AssemblyVersion> <!-- Also update MainViewModel version in constructor -->
<AssemblyVersion>1.0.0</AssemblyVersion> <!-- Also update Constants version -->
</PropertyGroup>
<ItemGroup>
<TrimmerRootAssembly Include="PdfSharp" />
+1 -1
View File
@@ -43,7 +43,7 @@ class MainViewModel : BaseViewModel, IFontResolver
var quotes = Constants.GetQuotes();
Random random = new Random();
var quoteIndex = random.Next(0, quotes.Length);
_createPDFLog = "----- Receipt PDF Builder v1.0.0 ------" + Environment.NewLine;
_createPDFLog = "----- Receipt PDF Builder v" + Constants.AppVersion + "------" + Environment.NewLine;
_createPDFLog += quotes[quoteIndex] + Environment.NewLine;
_createPDFLog += "---------------------------------------" + Environment.NewLine;
_createPDFLog += "Ready to create PDF!";