Files
wpf_ax_utility/wpf_ax_utility/UserWindow.xaml.cs
T
2022-03-09 13:53:25 +01:00

51 lines
1.1 KiB
C#

using Serilog;
using System;
using System.IO;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
namespace wpf_ax_utility
{
public partial class UserWindow : Window
{
public UserWindow()
{
InitializeComponent();
}
private void MouseLeftDrag(object sender, MouseButtonEventArgs e)
{
DragMove();
}
private void CloseButton(object sender, RoutedEventArgs e)
{
Close();
}
private void ButtonClicked(object sender, RoutedEventArgs e)
{
Utility.AucCleaner();
string AxArgs = string.Empty;
switch (((Button)sender).Name)
{
case "LIVE":
AxArgs = @"-regConfig=L:\Link\PAL_LIVE_USR.axc";
break;
case "STAGING":
AxArgs = @"-regConfig=L:\Link\PAL_STAGING_USR.axc";
break; ;
}
Utility.AxExecution(AxArgs);
Log.Logger.Information("Running AX client with this parameter: " + AxArgs);
}
}
}