Added plugin control
This commit is contained in:
parent
0e65d37ef9
commit
5bd3199d1a
111
ENI2/Controls/EasyPeasyControl.xaml
Normal file
111
ENI2/Controls/EasyPeasyControl.xaml
Normal file
@ -0,0 +1,111 @@
|
||||
<UserControl x:Class="ENI2.Controls.EasyPeasyControl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:ENI2.Controls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
|
||||
|
||||
<DockPanel>
|
||||
<!-- Header with logo -->
|
||||
<Border DockPanel.Dock="Top" Padding="10" Background="#FFFDF6">
|
||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" >
|
||||
<!-- Embed SVG via Image (optional): place your SVG as a DrawingImage in resources, or replace with PNG -->
|
||||
<TextBlock Text="🍋 easy-peasy" FontSize="20" FontWeight="Bold" Margin="0,0,16,0"/>
|
||||
<TextBlock Text="Edit • Paste • Export XML" VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<StackPanel Margin="12" Orientation="Vertical" >
|
||||
<!-- Top-level fields -->
|
||||
<UniformGrid Columns="4" Rows="3" Margin="0,0,0,12">
|
||||
<TextBlock Text="DelegateIdentificationType" />
|
||||
<TextBox Text="{Binding DelegateIdentificationType, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<TextBlock Text="TraderIdentificationType" />
|
||||
<TextBox Text="{Binding TraderIdentificationType, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<TextBlock Text="LRN" />
|
||||
<TextBox Text="{Binding LRN, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<TextBlock Text="TraderIdentificationNumber" />
|
||||
<TextBox Text="{Binding TraderIdentificationNumber, UpdateSourceTrigger=PropertyChanged}" />
|
||||
|
||||
<TextBlock Text="Country" />
|
||||
<TextBox Text="{Binding Country, UpdateSourceTrigger=PropertyChanged}" />
|
||||
<TextBlock Text="DelegateIdentificationNumber" />
|
||||
<TextBox Text="{Binding DelegateIdentificationNumber, UpdateSourceTrigger=PropertyChanged}" />
|
||||
</UniformGrid>
|
||||
|
||||
<!-- ProofInformation -->
|
||||
<GroupBox Header="ProofInformationT2LT2LF">
|
||||
<StackPanel Margin="8">
|
||||
<UniformGrid Columns="4" Rows="4" Margin="0,0,0,12">
|
||||
<TextBlock Text="CompetentCustomsOffice"/>
|
||||
<TextBox Text="{Binding ProofInformationT2LT2LF.CompetentCustomsOffice, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<TextBlock Text="DeclarationType"/>
|
||||
<TextBox Text="{Binding ProofInformationT2LT2LF.DeclarationType, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
|
||||
<TextBlock Text="DeclarationDate (yyyy-MM-ddTHH:mm:ss)"/>
|
||||
<TextBox Text="{Binding ProofInformationT2LT2LF.DeclarationDate, StringFormat={}{0:yyyy-MM-ddTHH:mm:ss}, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<TextBlock Text="TotalGrossMassKg"/>
|
||||
<TextBox Text="{Binding ProofInformationT2LT2LF.TotalGrossMassKg, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
|
||||
<TextBlock Text="RequestedValidityOfTheProof.NumberOfDays"/>
|
||||
<TextBox Text="{Binding ProofInformationT2LT2LF.RequestedValidityOfTheProof.NumberOfDays, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
<TextBlock Text="RequestType"/>
|
||||
<TextBox Text="{Binding ProofInformationT2LT2LF.RequestType, UpdateSourceTrigger=PropertyChanged}"/>
|
||||
</UniformGrid>
|
||||
|
||||
<GroupBox Header="LocationOfGoods">
|
||||
<UniformGrid Columns="6" Margin="8">
|
||||
<TextBlock Text="TypeOfLocation"/>
|
||||
<TextBox Text="{Binding ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.LocationOfGoods.TypeOfLocation}"/>
|
||||
<TextBlock Text="QualifierOfIdentification"/>
|
||||
<TextBox Text="{Binding ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.LocationOfGoods.QualifierOfIdentification}"/>
|
||||
<TextBlock Text="UNLocode"/>
|
||||
<TextBox Text="{Binding ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.LocationOfGoods.UNLocode}"/>
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
|
||||
<CheckBox Content="ContainerIndication"
|
||||
IsChecked="{Binding ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.ContainerIndication}"/>
|
||||
|
||||
<!-- Goods Items grid (paste target) -->
|
||||
<TextBlock Text="GoodsItemsForT2LT2LF (Paste tab/CSV with columns: HS, Item#, Description, Gross, Net, Pkgs, Type, Marks)" Margin="0,12,0,4"/>
|
||||
<DataGrid ItemsSource="{Binding ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.GoodsItemsForT2LT2LF}"
|
||||
AutoGenerateColumns="False" CanUserAddRows="True"
|
||||
PreviewKeyDown="GoodsGrid_PreviewKeyDown" >
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="HS Code" Binding="{Binding Commodity.HarmonizedSystemSubHeadingCode}"/>
|
||||
<DataGridTextColumn Header="Item #" Binding="{Binding GoodsItemNumber}"/>
|
||||
<DataGridTextColumn Header="Description" Binding="{Binding DescriptionOfGoods}" Width="2*"/>
|
||||
<DataGridTextColumn Header="Gross" Binding="{Binding GoodsMeasure.GrossMass}"/>
|
||||
<DataGridTextColumn Header="Net" Binding="{Binding GoodsMeasure.NetMass}"/>
|
||||
<DataGridTextColumn Header="Pkgs" Binding="{Binding Packaging.NumberOfPackages}"/>
|
||||
<DataGridTextColumn Header="Type" Binding="{Binding Packaging.TypeOfPackages}"/>
|
||||
<DataGridTextColumn Header="Marks" Binding="{Binding Packaging.ShippingMarks}" Width="*"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
<GroupBox Header="TransportDocuments" Margin="0,12,0,0">
|
||||
<UniformGrid Columns="4" Margin="8">
|
||||
<TextBlock Text="Type"/>
|
||||
<TextBox Text="{Binding ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.TransportDocuments.Type}"/>
|
||||
<TextBlock Text="ReferenceNumber"/>
|
||||
<TextBox Text="{Binding ProofInformationT2LT2LF.GoodsShipmentForT2LT2LF.TransportDocuments.ReferenceNumber}"/>
|
||||
</UniformGrid>
|
||||
</GroupBox>
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
|
||||
<!-- Actions -->
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,16,0,0">
|
||||
<Button Content="Clear" Width="100" Margin="0,0,8,0" Click="Clear_Click"/>
|
||||
<Button Content="Export" Width="120" Click="Export_Click"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
28
ENI2/Controls/EasyPeasyControl.xaml.cs
Normal file
28
ENI2/Controls/EasyPeasyControl.xaml.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace ENI2.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for EasyPeasyControl.xaml
|
||||
/// </summary>
|
||||
public partial class EasyPeasyControl : UserControl
|
||||
{
|
||||
public EasyPeasyControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -297,6 +297,9 @@
|
||||
<Compile Include="Controls\ConditionGroupControl.xaml.cs">
|
||||
<DependentUpon>ConditionGroupControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\EasyPeasyControl.xaml.cs">
|
||||
<DependentUpon>EasyPeasyControl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Controls\EditWindowBase.cs" />
|
||||
<Compile Include="Controls\ENIDataGrid.cs" />
|
||||
<Compile Include="Controls\IHighlightControlContainer.cs" />
|
||||
@ -587,6 +590,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Controls\EasyPeasyControl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Controls\LocodeControl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user