Version 3.5.6.9

SERV/LADG, etc..
This commit is contained in:
Daniel Schick 2017-04-30 07:44:41 +00:00
parent 47237ebf68
commit 1f6bdb11c8
9 changed files with 1247 additions and 9 deletions

View File

@ -60,7 +60,7 @@
<TextBox Grid.Row="3" Grid.Column="1" Name="textBowThrusterPower" Margin="2" Text="{Binding BowThrusterPower}" /> <TextBox Grid.Row="3" Grid.Column="1" Name="textBowThrusterPower" Margin="2" Text="{Binding BowThrusterPower}" />
<TextBox Grid.Row="4" Grid.Column="1" Name="textSternThrusterPower" Margin="2" Text="{Binding SternThrusterPower}" /> <TextBox Grid.Row="4" Grid.Column="1" Name="textSternThrusterPower" Margin="2" Text="{Binding SternThrusterPower}" />
<CheckBox Grid.Row="5" Grid.Column="1" Name="checkBoxFumigatedBulkCargo" IsThreeState="True" VerticalContentAlignment="Center" IsChecked="{Binding FumigatedBulkCargo}" Margin="2"/> <CheckBox Grid.Row="5" Grid.Column="1" Name="checkBoxFumigatedBulkCargo" IsThreeState="True" VerticalContentAlignment="Center" IsChecked="{Binding FumigatedBulkCargo}" Margin="2"/>
<xctk:DoubleUpDown Grid.Row="6" Grid.Column="1" Name="doubleUpDownDisplacementSummerDraught" ShowButtonSpinner="False" ParsingNumberStyle="Any" Value="{Binding DeplacementSummerDraught_TNE}" Margin="2" FormatString="N1"/> <xctk:DoubleUpDown Grid.Row="6" Grid.Column="1" Name="doubleUpDownDisplacementSummerDraught" ShowButtonSpinner="False" ParsingNumberStyle="Any" Value="{Binding DeplacementSummerDraught_TNE}" Margin="4,2,0,2" FormatString="N1"/>
<TextBox Grid.Row="2" Grid.Column="3" Grid.RowSpan="2" Name="textSpecialRequirements" Margin="2" Text="{Binding SpecialRequirementsOfShipAtBerth}" /> <TextBox Grid.Row="2" Grid.Column="3" Grid.RowSpan="2" Name="textSpecialRequirements" Margin="2" Text="{Binding SpecialRequirementsOfShipAtBerth}" />
<TextBox Grid.Row="4" Grid.Column="3" Grid.RowSpan="2" Name="textConstructionCharacteristics" Margin="2" Text="{Binding ConstructionCharacteristicsOfShip}" /> <TextBox Grid.Row="4" Grid.Column="3" Grid.RowSpan="2" Name="textConstructionCharacteristics" Margin="2" Text="{Binding ConstructionCharacteristicsOfShip}" />
</Grid> </Grid>
@ -80,12 +80,12 @@
<enictrl:ENIDataGrid x:Name="dataGridLADG" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" <enictrl:ENIDataGrid x:Name="dataGridLADG" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
SelectionMode="Single" AutoGenerateColumns="False" Margin="0,5,0,0"> SelectionMode="Single" AutoGenerateColumns="False" Margin="0,5,0,0">
<DataGrid.Columns> <DataGrid.Columns>
<DataGridTextColumn Header="{x:Static p:Resources.textCargoCodeNST}" Binding="{Binding CallCodeNST, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" /> <DataGridTextColumn Header="{x:Static p:Resources.textCargoHandlingType}" Binding="{Binding CargoHandlingType, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" />
<DataGridTextColumn Header="{x:Static p:Resources.textLACodes}" Binding="{Binding CargoLACode, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" /> <DataGridTextColumn Header="{x:Static p:Resources.textLACodes}" Binding="{Binding CargoLACode, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textCargoCodeNST}" Binding="{Binding CargoCodeNST, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" /> <DataGridTextColumn Header="{x:Static p:Resources.textCargoCodeNST}" Binding="{Binding CargoCodeNST, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
<DataGridTextColumn Header="{x:Static p:Resources.textCargoCodeNST3}" Binding="{Binding CargoCodeNST_3, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" /> <DataGridTextColumn Header="{x:Static p:Resources.textCargoCodeNST3}" Binding="{Binding CargoCodeNST_3, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" />
<DataGridTextColumn Header="{x:Static p:Resources.textCargoNumberOfItems}" Binding="{Binding CargoNumberOfItems, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" /> <DataGridTextColumn Header="{x:Static p:Resources.textCargoNumberOfItems}" Binding="{Binding CargoNumberOfItems, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" />
<DataGridTextColumn Header="{x:Static p:Resources.textCargoGrossQuantity}" Binding="{Binding CargoLGrossQuantity_TNE, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" /> <DataGridTextColumn Header="{x:Static p:Resources.textCargoGrossQuantity}" Binding="{Binding CargoGrossQuantity_TNE, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" />
<DataGridTextColumn Header="{x:Static p:Resources.textCargoPortOfLoading}" Binding="{Binding PortOfLoading, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" /> <DataGridTextColumn Header="{x:Static p:Resources.textCargoPortOfLoading}" Binding="{Binding PortOfLoading, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" />
<DataGridTextColumn Header="{x:Static p:Resources.textCargoPortOfDischarge}" Binding="{Binding PortOfDischarge, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" /> <DataGridTextColumn Header="{x:Static p:Resources.textCargoPortOfDischarge}" Binding="{Binding PortOfDischarge, Mode=TwoWay}" IsReadOnly="True" Width="0.15*" />
</DataGrid.Columns> </DataGrid.Columns>

View File

@ -35,7 +35,7 @@
<MinimumRequiredVersion>3.5.1.0</MinimumRequiredVersion> <MinimumRequiredVersion>3.5.1.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish> <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage> <WebPage>publish.html</WebPage>
<ApplicationRevision>9</ApplicationRevision> <ApplicationRevision>10</ApplicationRevision>
<ApplicationVersion>3.5.6.%2a</ApplicationVersion> <ApplicationVersion>3.5.6.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>

View File

@ -10,7 +10,7 @@ Copyright (c) 2017 Informatikbüro Daniel Schick
--%> --%>
extensions: .vb extensions: .vb
'Sample license text. 'Sample license text.
extensions: .xml .config .xsd extensions: .xml .config .xsd .xaml
<!-- <!--
Sample license text. Copyright (c) 2017 schick Informatik
--> -->

View File

@ -1,13 +1,17 @@
<enictrl:EditWindowBase x:Class="ENI2.EditControls.EditLADGDialog" <!--
Copyright (c) 2017 schick Informatik
-->
<enictrl:EditWindowBase x:Class="ENI2.EditControls.EditLADGDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ENI2.EditControls" xmlns:local="clr-namespace:ENI2.EditControls"
xmlns:enictrl="clr-namespace:ENI2.Controls" xmlns:enictrl="clr-namespace:ENI2.Controls"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:p="clr-namespace:ENI2.Properties" xmlns:p="clr-namespace:ENI2.Properties"
mc:Ignorable="d" mc:Ignorable="d"
Title="{x:Static p:Resources.textLadg}" Height="250" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue"> Title="{x:Static p:Resources.textLadg}" Height="246" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="28" /> <RowDefinition Height="28" />
@ -31,5 +35,15 @@
<Label Name="labelPortOfLoading" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textCargoPortOfLoading}" /> <Label Name="labelPortOfLoading" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textCargoPortOfLoading}" />
<Label Name="labelPortOfDischarge" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textCargoPortOfDischarge}" /> <Label Name="labelPortOfDischarge" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textCargoPortOfDischarge}" />
<Label Name="labelCodeNST3" Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textCargoCodeNST3}" /> <Label Name="labelCodeNST3" Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textCargoCodeNST3}" />
<ComboBox Grid.Row="0" Grid.Column="1" Name="comboBoxHandlingType" Margin="2" />
<ComboBox Grid.Row="0" Grid.Column="3" Name="comboBoxLACodes" Margin="2" />
<ComboBox Grid.Row="1" Grid.Column="1" Name="comboBoxNSTCode" Margin="2" />
<ComboBox Grid.Row="1" Grid.Column="3" Name="comboBoxNST3Code" Margin="2" />
<xctk:IntegerUpDown Grid.Row="2" Grid.Column="1" Name="integerUpDownNumberOfItems" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2,2,2,2" />
<xctk:DoubleUpDown Grid.Row="3" Grid.Column="1" Name="doubleUpDownGrossQuantity" ShowButtonSpinner="False" ParsingNumberStyle="Any" Margin="2,2,2,2" FormatString="N1"/>
<enictrl:LocodeControl Grid.Column="1" Grid.Row="4" Width="Auto" x:Name="locodeControl_PortOfLoading" />
<enictrl:LocodeControl Grid.Column="1" Grid.Row="5" Width="Auto" x:Name="locodeControl_PortOfDischarge" />
</Grid> </Grid>
</enictrl:EditWindowBase> </enictrl:EditWindowBase>

View File

@ -26,12 +26,102 @@ namespace ENI2.EditControls
/// </summary> /// </summary>
public partial class EditLADGDialog : EditWindowBase public partial class EditLADGDialog : EditWindowBase
{ {
private static string[] handlingTypeList =
{
Properties.Resources.textLoading,
Properties.Resources.textDischarge,
Properties.Resources.textTransit
};
public EditLADGDialog() public EditLADGDialog()
{ {
InitializeComponent(); InitializeComponent();
Loaded += EditLADGDialog_Loaded;
} }
public LADG LADG { get; set; } public LADG LADG { get; set; }
#region event handler
private void EditLADGDialog_Loaded(object sender, RoutedEventArgs e)
{
this.OKClicked += EditLADGDialog_OKClicked;
this.comboBoxHandlingType.ItemsSource = handlingTypeList;
this.comboBoxLACodes.ItemsSource = LaCodes;
if (this.LADG.CargoHandlingType.HasValue)
this.comboBoxHandlingType.SelectedIndex = this.LADG.CargoHandlingType.Value;
this.integerUpDownNumberOfItems.Value = this.LADG.CargoNumberOfItems;
this.doubleUpDownGrossQuantity.Value = this.LADG.CargoGrossQuantity_TNE;
this.locodeControl_PortOfLoading.LocodeValue = this.LADG.PortOfLoading;
this.locodeControl_PortOfDischarge.LocodeValue = this.LADG.PortOfDischarge;
this.comboBoxLACodes.SelectedItem = LACodeEntryForCode(this.LADG.CargoLACode);
}
private void EditLADGDialog_OKClicked()
{
this.LADG.CargoHandlingType = (this.comboBoxHandlingType.SelectedIndex < 0) ? null : (byte?) this.comboBoxHandlingType.SelectedIndex;
this.LADG.CargoNumberOfItems = this.integerUpDownNumberOfItems.Value;
this.LADG.CargoGrossQuantity_TNE = this.doubleUpDownGrossQuantity.Value;
this.LADG.PortOfLoading = this.locodeControl_PortOfLoading.LocodeValue;
this.LADG.PortOfDischarge = this.locodeControl_PortOfDischarge.LocodeValue;
this.LADG.CargoLACode = (this.comboBoxLACodes.SelectedIndex < 0) ? null : (int?) ((LACodeEntry)this.comboBoxLACodes.SelectedValue).Code;
}
#endregion
#region class LACodeEntry
private static LACodeEntry[] LaCodes =
{
new LACodeEntry(10, "unverpacktes Flüssiggut"),
new LACodeEntry(20, "unverpacktes Schüttgut"),
new LACodeEntry(30, "unverpacktes oder konventionell verpacktes Stückgut (Stückgut nicht in Containern >= 20 Fuß und nicht auf Ro-Ro-Einheiten)"),
new LACodeEntry(31, "Kfz als Handelsgüter"),
new LACodeEntry(32, "lebende Tiere als Handelsgüter"),
new LACodeEntry(41, "20-Fuß-Container"),
new LACodeEntry(42, "40-Fuß-Container"),
new LACodeEntry(43, "Container zwischen 20 und 40 Fuß"),
new LACodeEntry(44, "Container größer als 40 Fuß"),
new LACodeEntry(51, "Straßengüterfahrzeuge einschl. deren Anhänger"),
new LACodeEntry(52, "Pkw einschl. deren Anhänger, Krafträder"),
new LACodeEntry(53, "Omnibusse"),
new LACodeEntry(61, "Anhänger / Sattelauflieger für Straßengüterfahrzeuge"),
new LACodeEntry(62, "Sonstige Anhänger von Straßenfahrzeugen (ohne Zugmaschine) und nicht selbstfahrende Straßenfahrzeuge"),
new LACodeEntry(63, "Rolltrailer (Anhänger für die Güterbeförderung auf See"),
new LACodeEntry(64, "Trägerschiffsleichter"),
new LACodeEntry(65, "Wechselbrücken / -behälter"),
new LACodeEntry(66, "Eisenbahngüterwagen"),
new LACodeEntry(67, "Reisezugwagen und Triebwagen")
};
private static LACodeEntry LACodeEntryForCode(int? code)
{
if (!code.HasValue) return null;
for (int i = 0; i < LaCodes.Length; i++)
if (LaCodes[i].Code == code) return LaCodes[i];
return null;
}
public class LACodeEntry
{
public int Code;
public string Description;
public LACodeEntry(int code, string description) { Code = code; Description = description; }
public override string ToString()
{
return string.Format("{0} - {1}", this.Code, this.Description);
}
}
#endregion
} }
} }

View File

@ -6,7 +6,7 @@
xmlns:p="clr-namespace:ENI2.Properties" xmlns:p="clr-namespace:ENI2.Properties"
xmlns:local="clr-namespace:ENI2" xmlns:local="clr-namespace:ENI2"
mc:Ignorable="d" mc:Ignorable="d"
Title="ENI 2" Height="350" Width="525" Icon="Resources/logo_schwarz.ico" Loaded="Window_Loaded" Closing="Window_Closing" Title="ENI 2" Height="450" Width="825" Icon="Resources/logo_schwarz.ico" Loaded="Window_Loaded" Closing="Window_Closing"
SourceInitialized="Window_SourceInitialized"> SourceInitialized="Window_SourceInitialized">
<Window.CommandBindings> <Window.CommandBindings>
<CommandBinding Command="{x:Static local:CustomCommands.Clear}" <CommandBinding Command="{x:Static local:CustomCommands.Clear}"

File diff suppressed because it is too large Load Diff

View File

@ -457,4 +457,13 @@
<data name="textShippingAreaOverseas" xml:space="preserve"> <data name="textShippingAreaOverseas" xml:space="preserve">
<value>Overseas</value> <value>Overseas</value>
</data> </data>
<data name="textLoading" xml:space="preserve">
<value>Loading</value>
</data>
<data name="textDischarge" xml:space="preserve">
<value>Discharge</value>
</data>
<data name="textTransit" xml:space="preserve">
<value>Transit</value>
</data>
</root> </root>

Binary file not shown.