156 lines
18 KiB
XML
156 lines
18 KiB
XML
<src:DetailBaseControl xmlns:src="clr-namespace:ENI2"
|
|
x:Class="ENI2.DetailViewControls.PortCallDetailControl"
|
|
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.DetailViewControls"
|
|
xmlns:util="clr-namespace:ENI2.Util"
|
|
xmlns:enictrl="clr-namespace:ENI2.Controls"
|
|
xmlns:p="clr-namespace:ENI2.Properties"
|
|
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="600" d:DesignWidth="800">
|
|
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.textPortCall}">
|
|
<ScrollViewer>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="300" />
|
|
<RowDefinition Height="250" />
|
|
</Grid.RowDefinitions>
|
|
<GroupBox Name="noaNodGroupBox" Header="{x:Static p:Resources.textArrivalDeparture}" Margin="5, 20, 5, 0">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*" />
|
|
<ColumnDefinition Width="2*" />
|
|
<ColumnDefinition Width="1*" />
|
|
<ColumnDefinition Width="2*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="28" />
|
|
<RowDefinition Height="28" />
|
|
<RowDefinition Height="28" />
|
|
<RowDefinition Height="28" />
|
|
<RowDefinition Height="28" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textETAPortOfCall}" Name="label_ETAToPortOfCall" Margin="0,0,10,0"/>
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textETDPortOfCall}" Name="label_ETDFromPortOfCall" Margin="0,0,10,0"/>
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textETAKielCanal}" Name="label_ETAToKielCanal" Margin="0,0,10,0"/>
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textETDKielCanal}" Name="label_ETDFromKielCanal" Margin="0,0,10,0"/>
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textLastPort}" Name="label_LastPort" Margin="0,0,10,0"/>
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textNextPort}" Name="label_NextPort" Margin="0,0,10,0"/>
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="2" Content="{x:Static p:Resources.textETDLastPort}" Name="label_ETDFromLastport" Margin="0,0,10,0"/>
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textETANextPort}" Name="label_ETAToNextPort" Margin="0,0,10,0" />
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textAnchored}" Name="label_IsAnchored" Margin="0,0,10,0" />
|
|
<xctk:DateTimePicker Grid.Column="1" Grid.Row="0" Value="{Binding ETAToPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePicker_ETAToPortOfCall" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp"/>
|
|
<xctk:DateTimePicker Grid.Column="3" Grid.Row="0" Value="{Binding ETDFromPortOfCall, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePicker_ETDFromPortOfCall" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp"/>
|
|
<xctk:DateTimePicker Grid.Column="1" Grid.Row="1" Value="{Binding ETAToKielCanal, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePicker_ETAToKielCanal" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp"/>
|
|
<xctk:DateTimePicker Grid.Column="3" Grid.Row="1" Value="{Binding ETDFromKielCanal, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePicker_ETDFromKielCanal" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp"/>
|
|
<enictrl:LocodeControl Grid.Column="1" Grid.Row="2" Width="Auto" x:Name="locodeControl_LastPort" LocodeValue="{Binding LastPort, Mode=TwoWay}" LocodeSource="SSN" />
|
|
<xctk:DateTimePicker Grid.Column="3" Grid.Row="2" Value="{Binding ETDFromLastPort, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePicker_ETDFromLastPort" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp"/>
|
|
<enictrl:LocodeControl Grid.Column="1" Grid.Row="3" Width="Auto" x:Name="locodeControl_NextPort" LocodeValue="{Binding NextPort, Mode=TwoWay}" LocodeSource="SSN" />
|
|
<xctk:DateTimePicker Grid.Column="3" Grid.Row="3" Value="{Binding ETAToNextPort, Mode=TwoWay, Converter={util:UtcToLocalDateTimeConverter}}" Name="dateTimePicker_ETAToNextPort" Format="Custom" FormatString="dd.MM.yyyy HH:mm" ShowButtonSpinner="False" VerticalContentAlignment="Center" Margin="2" AllowTextInput="True" ContextMenu="{DynamicResource ClearContextMenu}" TextAlignment="Left" Minimum="1899.12.31 00:00" Maximum="2100.12.31 00:00" PreviewKeyUp="DateTimePicker_PreviewKeyUp"/>
|
|
|
|
<CheckBox Grid.Column="1" Grid.Row="4" IsThreeState="True" VerticalContentAlignment="Center" Name="checkBox_IsAnchored" IsChecked="{Binding IsAnchored}"/>
|
|
<GroupBox Grid.Row="5" Grid.ColumnSpan="4" Name="groupBoxCallPurpose" Header="{x:Static p:Resources.textCallPurposes}" >
|
|
<enictrl:ENIDataGrid x:Name="dataGridCallPurposes" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch"
|
|
SelectionMode="Single" AutoGenerateColumns="False" Margin="0,5,0,0">
|
|
<DataGrid.Columns>
|
|
<DataGridTextColumn Header="" Binding="{Binding Identifier}" IsReadOnly="True" />
|
|
<DataGridTextColumn Header="{x:Static p:Resources.textCode}" Binding="{Binding CallPurposeCode, Mode=TwoWay}" IsReadOnly="True" Width="0.1*" />
|
|
<DataGridTextColumn Header="{x:Static p:Resources.textDescription}" Binding="{Binding CallPurposeDescription, Mode=TwoWay}" IsReadOnly="True" Width="0.9*" />
|
|
</DataGrid.Columns>
|
|
</enictrl:ENIDataGrid>
|
|
</GroupBox>
|
|
</Grid>
|
|
</GroupBox>
|
|
<GroupBox Name="agentGroupBox" Header="{x:Static p:Resources.textAgent}" Grid.Row="1" Margin="5, 20, 5, 0">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="28" />
|
|
<RowDefinition Height="28" />
|
|
<RowDefinition Height="28" />
|
|
<RowDefinition Height="28" />
|
|
<RowDefinition Height="10" />
|
|
<RowDefinition Height="28" />
|
|
<RowDefinition Height="28" />
|
|
<RowDefinition Height="28" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="1*" />
|
|
<ColumnDefinition Width="2*" />
|
|
<ColumnDefinition Width="1*" />
|
|
<ColumnDefinition Width="2*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textCompanyName}" Name="label_AgentCompanyName" Margin="0,0,10,0"/>
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textStreetNumber}" Name="label_AgentStreetAndNumber" Margin="0,0,10,0"/>
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textPostalCode}" Name="label_AgentPostalCode" Margin="0,0,10,0"/>
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textLastName}" Name="label_AgentLastName" Margin="0,0,10,0"/>
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="0" Content="{x:Static p:Resources.textPhone}" Name="label_AgentPhone" Margin="0,0,10,0"/>
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textEMail}" Name="label_AgentEMail" Margin="0,0,10,0" />
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="2" Content="{x:Static p:Resources.textCity}" Name="label_AgentCity" Margin="0,0,10,0" />
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="5" Grid.Column="2" Content="{x:Static p:Resources.textFirstName}" Name="label_AgentFirstName" Margin="0,0,10,0"/>
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="6" Grid.Column="2" Content="{x:Static p:Resources.textFax}" Name="label_AgentFax" Margin="0,0,10,0"/>
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="7" Grid.Column="2" Content="{x:Static p:Resources.textWasteDisposalServiceProvider}" Margin="0,0,10,0" />
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textCountry}" Name="label_AgentCountry" Margin="0,0,10,0"/>
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textAgentTemplate}" Name="labelAgentTemplate" Margin="0,0,10,0"/>
|
|
<Label HorizontalContentAlignment="Right" Grid.Row="1" Grid.Column="2" Content="{x:Static p:Resources.textTitle}" Name="labelAgentTemplateTitle" Margin="0,0,10,0" Visibility="Hidden" />
|
|
|
|
<TextBox Grid.Row="0" Grid.Column="1" Name="textBox_AgentCompanyName" MaxLength="99" Margin="2" Text="{Binding AgentCompanyName, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
|
<TextBox Grid.Row="1" Grid.Column="1" Name="textBox_AgentStreetAndNumber" MaxLength="99" Margin="2" Text="{Binding AgentStreetAndNumber, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
|
<TextBox Grid.Row="2" Grid.Column="1" Name="textBox_AgentPostalCode" MaxLength="99" Margin="2" Text="{Binding AgentPostalCode, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
|
<TextBox Grid.Row="3" Grid.Column="3" Name="textBox_AgentCity" MaxLength="99" Margin="2" Text="{Binding AgentCity, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
|
<TextBox Grid.Row="3" Grid.Column="1" Name="textBox_AgentCountry" MaxLength="99" Margin="2" Text="{Binding AgentCountry, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center" />
|
|
<TextBox Grid.Row="5" Grid.Column="1" Name="textBox_AgentLastName" MaxLength="99" Margin="2" Text="{Binding AgentLastName, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
|
<TextBox Grid.Row="5" Grid.Column="3" Name="textBox_AgentFirstName" MaxLength="99" Margin="2" Text="{Binding AgentFirstName, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
|
<TextBox Grid.Row="6" Grid.Column="1" Name="textBox_AgentPhone" MaxLength="99" Margin="2" Text="{Binding AgentPhone, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
|
<TextBox Grid.Row="6" Grid.Column="3" Name="textBox_AgentFax" MaxLength="99" Margin="2" Text="{Binding AgentFax, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
|
<TextBox Grid.Row="7" Grid.Column="1" Name="textBox_AgentEMail" MaxLength="99" Margin="2" Text="{Binding AgentEMail, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
|
<TextBox Grid.Row="7" Grid.Column="3" Name="textBox_WasteDisposalServiceProvider" MaxLength="99" Margin="2" Text="{Binding WasteDisposalServiceProviderText, Converter={util:TrimStringConverter}}" VerticalContentAlignment="Center"/>
|
|
|
|
<ComboBox Grid.Row="0" Grid.Column="3" Name="comboBox_AgentTemplate" Margin="2" SelectedValuePath="Id" DisplayMemberPath="AgentTitle" SelectionChanged="comboBox_AgentTemplate_SelectionChanged" />
|
|
<Grid Grid.Column="2" Grid.Row="1" HorizontalAlignment="Right">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="26" />
|
|
</Grid.ColumnDefinitions>
|
|
<Button Name="buttonSetTemplate" Margin="2" Click="buttonSetTemplate_Click" BorderThickness="0" Background="Transparent"
|
|
ToolTip="Apply template" HorizontalContentAlignment="Right" IsEnabled="False">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="../Resources/check.png" Margin="0,0,0,0" Height="20" Width="20" />
|
|
</StackPanel>
|
|
</Button>
|
|
</Grid>
|
|
<Grid Grid.Row="1" Grid.Column="3" Name="gridTemplateControls" Visibility="Visible">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/> <!-- Name -->
|
|
<ColumnDefinition Width="26"/> <!-- Save button -->
|
|
<ColumnDefinition Width="26"/> <!-- Delete button -->
|
|
<ColumnDefinition Width="52"/> <!-- Undo button -->
|
|
</Grid.ColumnDefinitions>
|
|
<TextBox Grid.Column="0" Margin="2" Name="textBoxTemplateTitle" VerticalContentAlignment="Center"/>
|
|
<Button Name="buttonSaveTemplate" Grid.Column="1" Grid.Row="0" Margin="2" Click="buttonSaveTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Save template">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="../Resources/floppy_disk_blue.png" Margin="0,0,0,0" Height="20" Width="20" />
|
|
</StackPanel>
|
|
</Button>
|
|
<Button Name="buttonDeleteTemplate" Grid.Column="2" Grid.Row="0" Margin="2" Click="buttonDeleteTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Delete template" IsEnabled="False">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="../Resources/delete.png" Margin="0,0,0,0" Height="20" Width="20" />
|
|
</StackPanel>
|
|
</Button>
|
|
<Button Name="buttonUndoTemplate" Grid.Column="3" Grid.Row="0" Margin="22,2,2,2" Click="buttonUndoTemplate_Click" BorderThickness="0" Background="Transparent" ToolTip="Undo last overwrite" IsEnabled="False">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Image Source="../Resources/undo.png" Margin="0,0,0,0" Height="20" Width="20" />
|
|
</StackPanel>
|
|
</Button>
|
|
</Grid>
|
|
</Grid>
|
|
</GroupBox>
|
|
</Grid>
|
|
</ScrollViewer>
|
|
</GroupBox>
|
|
</src:DetailBaseControl>
|