Update front view and window management
This commit is contained in:
@@ -4,11 +4,15 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
MouseLeftButtonDown="MouseLeftDrag"
|
||||
Height="260" Width="400"
|
||||
ResizeMode="NoResize"
|
||||
WindowStyle="None"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
AllowsTransparency="True"
|
||||
Background="Transparent"
|
||||
Title="PAL Ax Utility"
|
||||
Icon="/axlogo.png">
|
||||
Icon="/axlogo.ico">
|
||||
|
||||
<Window.Resources>
|
||||
<Style TargetType="Button" x:Key="TabButton">
|
||||
@@ -21,9 +25,31 @@
|
||||
</Style.Resources>
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
|
||||
<Grid>
|
||||
<GroupBox Margin="15,10,15,10"
|
||||
VerticalAlignment="Top"
|
||||
<Border BorderBrush="#0082C4" BorderThickness="1.5" CornerRadius="10" Background="White">
|
||||
<StackPanel>
|
||||
<DockPanel>
|
||||
<Border Height="25" Width="25" CornerRadius="5" Margin="2,0,0,0">
|
||||
<Border.Background>
|
||||
<ImageBrush Stretch="Fill" ImageSource="/axlogo.ico"/>
|
||||
</Border.Background>
|
||||
</Border>
|
||||
<TextBlock Margin="5,0,0,0" FontWeight="DemiBold" Text="PAL Ax Utility" VerticalAlignment="Center"/>
|
||||
<Button Style="{StaticResource TabButton}"
|
||||
Click="CloseButton"
|
||||
Height="25" Width="25"
|
||||
FontSize="18"
|
||||
FontWeight="DemiBold"
|
||||
Background="Transparent"
|
||||
HorizontalAlignment="Right"
|
||||
BorderBrush="{x:Null}"
|
||||
Margin="0,3,3,0">
|
||||
<TextBlock Text="x" Margin="0,-5,0,0"/>
|
||||
</Button>
|
||||
</DockPanel>
|
||||
<GroupBox Margin="15,5,15,10"
|
||||
VerticalAlignment="Center"
|
||||
BorderBrush="LightGray"
|
||||
BorderThickness="1"
|
||||
Header="Ambienti">
|
||||
@@ -68,5 +94,7 @@
|
||||
</DockPanel>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace wpf_ax_utility
|
||||
{
|
||||
@@ -12,30 +13,40 @@ namespace wpf_ax_utility
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void MouseLeftDrag(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
DragMove();
|
||||
}
|
||||
|
||||
private void CloseButton(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void ButtonClicked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
AucCleaner();
|
||||
|
||||
string AxClient = @"C:\Program Files (x86)\Microsoft Dynamics AX\60\Client\Bin\Ax32.exe";
|
||||
string AxArguments = string.Empty;
|
||||
string AxArgs = string.Empty;
|
||||
|
||||
switch (((Button)sender).Name)
|
||||
{
|
||||
case "LIVE":
|
||||
AxArguments = @"-regConfig=L:\Link\PAL_LIVE_02_USR.axc";
|
||||
AxArgs = @"-regConfig=L:\Link\PAL_LIVE_02_USR.axc";
|
||||
break;
|
||||
case "DEV":
|
||||
AxArguments = @"-regConfig=L:\Link\PAL_DEVELOP_USR.axc";
|
||||
AxArgs = @"-regConfig=L:\Link\PAL_DEVELOP_USR.axc";
|
||||
break ;
|
||||
case "TEST":
|
||||
AxArguments = @"-regConfig=L:\Link\PAL_TEST_USR.axc";
|
||||
AxArgs = @"-regConfig=L:\Link\PAL_TEST_USR.axc";
|
||||
break;
|
||||
case "STAGING":
|
||||
AxArguments = @"-regConfig=L:\Link\PAL_STAGING_USR.axc";
|
||||
AxArgs = @"-regConfig=L:\Link\PAL_STAGING_USR.axc";
|
||||
break; ;
|
||||
}
|
||||
|
||||
AxExecution(AxClient, AxArguments);
|
||||
AxExecution(AxClient, AxArgs);
|
||||
}
|
||||
|
||||
public static void AxExecution(string AxClient, string AxArgs)
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 168 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 MiB |
@@ -8,12 +8,15 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="axlogo.ico" />
|
||||
<None Remove="axlogo.png" />
|
||||
<None Remove="rdrect1197.png" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="axlogo.png" />
|
||||
<Resource Include="axlogo.ico">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Resource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user