From 876c00ac49d31d156b24d0956688906cb343fb9f Mon Sep 17 00:00:00 2001 From: Steven Date: Fri, 27 May 2022 21:37:15 +0200 Subject: [PATCH] Added Feature Request + add Variable: %DATE --- .../ViewModel/TaskSetupViewModels/CommonTaskViewModel.cs | 8 +++++++- RFiDGearBundleSetup/Bundle.wxs | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/RFiDGear/ViewModel/TaskSetupViewModels/CommonTaskViewModel.cs b/RFiDGear/ViewModel/TaskSetupViewModels/CommonTaskViewModel.cs index cc413ee..2af505e 100644 --- a/RFiDGear/ViewModel/TaskSetupViewModels/CommonTaskViewModel.cs +++ b/RFiDGear/ViewModel/TaskSetupViewModels/CommonTaskViewModel.cs @@ -876,7 +876,13 @@ private void OnNewWriteReportCommand(ReportReaderWriter _reportReaderWriter) hasVariable = true; } - if (temporaryContent.Contains("%FREEMEM")) + if (temporaryContent.Contains("%DATE")) + { + temporaryContent = temporaryContent.Replace("%DATE", DateTime.Now.ToString("dd/MM/yyyy") ?? ""); + hasVariable = true; + } + + if (temporaryContent.Contains("%FREEMEM")) { temporaryContent = temporaryContent.Replace("%FREEMEM", GenericChip.FreeMemory.ToString() ?? ""); hasVariable = true; diff --git a/RFiDGearBundleSetup/Bundle.wxs b/RFiDGearBundleSetup/Bundle.wxs index fe3b594..10841b3 100644 --- a/RFiDGearBundleSetup/Bundle.wxs +++ b/RFiDGearBundleSetup/Bundle.wxs @@ -20,7 +20,7 @@ - +