Apply the changes on UserWindows as previously made on MainWindows

This commit is contained in:
PAL\cbo
2022-05-05 08:49:46 +02:00
parent 4980d300d7
commit 467dbcfc62
+9 -3
View File
@@ -28,18 +28,24 @@ namespace wpf_ax_utility
{ {
Utility.AucCleaner(); Utility.AucCleaner();
string AxArgs = string.Empty; string AxcFilePath = "";
switch (((Button)sender).Name) switch (((Button)sender).Name)
{ {
case "LIVE": 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; break;
case "TEST": 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; ; break; ;
} }
var AxArgs = @"-regConfig=" + AxcFilePath;
Utility.AxExecution(AxArgs); Utility.AxExecution(AxArgs);
Log.Logger.Information("Running AX client with this parameter: " + AxArgs); Log.Logger.Information("Running AX client with this parameter: " + AxArgs);