From 467dbcfc62411f4b6a96710724e3b8b7605460ee Mon Sep 17 00:00:00 2001 From: "PAL\\cbo" Date: Thu, 5 May 2022 08:49:46 +0200 Subject: [PATCH] Apply the changes on UserWindows as previously made on MainWindows --- wpf_ax_utility/UserWindow.xaml.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/wpf_ax_utility/UserWindow.xaml.cs b/wpf_ax_utility/UserWindow.xaml.cs index feb4196..213447d 100644 --- a/wpf_ax_utility/UserWindow.xaml.cs +++ b/wpf_ax_utility/UserWindow.xaml.cs @@ -28,18 +28,24 @@ namespace wpf_ax_utility { Utility.AucCleaner(); - string AxArgs = string.Empty; + string AxcFilePath = ""; switch (((Button)sender).Name) { case "LIVE": - AxArgs = @"-regConfig=axc\PAL_LIVE_USR.axc"; + AxcFilePath = Properties.Resources.network_axc_path + Properties.Resources.LIVE_axc_filename; + if (!File.Exists(AxcFilePath)) + AxcFilePath = Properties.Resources.local_axc_path + Properties.Resources.LIVE_axc_filename; break; case "TEST": - AxArgs = @"-regConfig=axc\PAL_TEST_USR.axc"; + AxcFilePath = Properties.Resources.network_axc_path + Properties.Resources.TEST_axc_filename; + if (!File.Exists(AxcFilePath)) + AxcFilePath = Properties.Resources.local_axc_path + Properties.Resources.TEST_axc_filename; break; ; } + var AxArgs = @"-regConfig=" + AxcFilePath; + Utility.AxExecution(AxArgs); Log.Logger.Information("Running AX client with this parameter: " + AxArgs);