Participants can be of multiple types (e.g. agent and terminal), therefore the participant type must be stored in the times data record in order to assign times correctly during display and to differentiate in calculation.
261 lines
19 KiB
XML
261 lines
19 KiB
XML
<UserControl x:Class="BreCalClient.ShipcallControl"
|
|
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:BreCalClient"
|
|
xmlns:p = "clr-namespace:BreCalClient.Resources"
|
|
xmlns:sets="clr-namespace:BreCalClient.Properties"
|
|
xmlns:db="clr-namespace:BreCalClient;assembly=BreCalClient"
|
|
xmlns:db2="clr-namespace:BreCalClient.misc.Model;assembly=BreCalClient"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="120" d:DesignWidth="800" Loaded="UserControl_Loaded">
|
|
<Border BorderBrush="LightGray" Margin="1" BorderThickness="1">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width=".1*" />
|
|
<ColumnDefinition Width=".15*" />
|
|
<ColumnDefinition Width=".15*" />
|
|
<ColumnDefinition Width=".15*" />
|
|
<ColumnDefinition Width=".15*" />
|
|
<ColumnDefinition Width=".15*" />
|
|
<ColumnDefinition Width=".15*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="32" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Grid Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" >
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="32"/>
|
|
<RowDefinition Height=".125*"/>
|
|
<RowDefinition Height=".125*"/>
|
|
<RowDefinition Height=".125*"/>
|
|
|
|
<RowDefinition Height=".05*"/>
|
|
<RowDefinition Height=".125*"/>
|
|
<RowDefinition Height=".125*"/>
|
|
<RowDefinition Height=".125*"/>
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width=".4*" />
|
|
<ColumnDefinition Width=".6*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid Grid.Row="0" Grid.Column="0" Grid.RowSpan="1" Grid.ColumnSpan="2">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="30" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Image Margin="2" Grid.Column="0" PreviewMouseUp="Image_PreviewMouseUp" x:Name="imageShipcallType" />
|
|
<Label Grid.Column="1" FontSize="12" x:Name="labelShipName" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" PreviewMouseUp="Image_PreviewMouseUp"/>
|
|
</Grid>
|
|
<Viewbox Grid.Row="1" Grid.Column="0" HorizontalAlignment="Left">
|
|
<TextBlock Text="IMO" />
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left">
|
|
<TextBlock x:Name="textBlockIMO" Padding="0" FontWeight="DemiBold" />
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="2" Grid.Column="0" HorizontalAlignment="Left">
|
|
<TextBlock Text="{x:Static p:Resources.textCallsign}" />
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left">
|
|
<TextBlock x:Name="textBlockCallsign" Padding="0"/>
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="3" Grid.Column="0" HorizontalAlignment="Left">
|
|
<TextBlock Text="{x:Static p:Resources.textLengthWidth}" Padding="0" />
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="3" Grid.Column="1" HorizontalAlignment="Left">
|
|
<TextBlock x:Name="textBlockLengthWidth" Padding="0"/>
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="5" Grid.Column="0" HorizontalAlignment="Left">
|
|
<TextBlock Text="ETA" x:Name="labelETA"/>
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="5" Grid.Column="1" HorizontalAlignment="Left">
|
|
<TextBlock x:Name="textBlockETA" />
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="6" Grid.Column="0" HorizontalAlignment="Left">
|
|
<TextBlock Text="{x:Static p:Resources.textBerth}" />
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="6" Grid.Column="1" HorizontalAlignment="Left">
|
|
<TextBlock x:Name="textBlockBerth" />
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="7" Grid.Column="0" HorizontalAlignment="Left">
|
|
<TextBlock Text="{x:Static p:Resources.textAgency}" />
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="7" Grid.Column="1" HorizontalAlignment="Left">
|
|
<TextBlock x:Name="textBlockAgency" />
|
|
</Viewbox>
|
|
|
|
</Grid>
|
|
|
|
<Label Grid.Row="0" Grid.Column="1" Grid.RowSpan="1" FontSize="12" Content="- / -" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelAgent" PreviewMouseUp="labelAgent_PreviewMouseUp"/>
|
|
<Label Grid.Row="0" Grid.Column="2" Grid.RowSpan="1" FontSize="12" Content="- / -" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelMooring" PreviewMouseUp="labelMooring_PreviewMouseUp"/>
|
|
<Label Grid.Row="0" Grid.Column="3" Grid.RowSpan="1" FontSize="12" Content="- / -" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelPortAuthority" PreviewMouseUp="labelPortAuthority_PreviewMouseUp" />
|
|
<Label Grid.Row="0" Grid.Column="4" Grid.RowSpan="1" FontSize="12" Content="- / -" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelPilot" PreviewMouseUp="labelPilot_PreviewMouseUp"/>
|
|
<Label Grid.Row="0" Grid.Column="5" Grid.RowSpan="1" FontSize="12" Content="- / -" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelTug" PreviewMouseUp="labelTug_PreviewMouseUp"/>
|
|
<Label Grid.Row="0" Grid.Column="6" Grid.RowSpan="1" FontSize="12" Content="- / -" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelTerminal" PreviewMouseUp="labelTerminal_PreviewMouseUp" />
|
|
|
|
<Grid Grid.Row="2" Grid.Column="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="0.3*" />
|
|
<ColumnDefinition Width="0.7*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="14" />
|
|
<RowDefinition Height="20" />
|
|
<RowDefinition Height="20" />
|
|
<RowDefinition Height="14" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textBerth}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
|
|
<Label Grid.Row="1" Grid.Column="0" Content="ETA" Padding="0" VerticalContentAlignment="Center" />
|
|
<Label Grid.Row="2" Grid.Column="0" Content="ETD" Padding="0" VerticalContentAlignment="Center" />
|
|
<Label Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textRemarks}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
|
|
<Label Grid.Row="1" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelAgencyETA" FontWeight="DemiBold"/>
|
|
<Label Grid.Row="2" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelAgencyETD" FontWeight="DemiBold"/>
|
|
<TextBlock Grid.Row="3" Grid.Column="1" Grid.RowSpan="2" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockAgencyRemarks" />
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="2" Grid.Column="2">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="0.3*" />
|
|
<ColumnDefinition Width="0.7*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="14" />
|
|
<RowDefinition Height="20" />
|
|
<RowDefinition Height="20" />
|
|
<RowDefinition Height="14" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textBerth}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
|
|
<Label Grid.Row="1" Grid.Column="0" Content="ETA" Padding="0" VerticalContentAlignment="Center" />
|
|
<Label Grid.Row="2" Grid.Column="0" Content="ETD" Padding="0" VerticalContentAlignment="Center" />
|
|
<Label Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textRemarks}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
|
|
<Label Grid.Row="1" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelMooringETA" FontWeight="DemiBold"/>
|
|
<Label Grid.Row="2" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelMooringETD" FontWeight="DemiBold"/>
|
|
<TextBlock Grid.Row="3" Grid.Column="1" Grid.RowSpan="2" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockMooringRemarks"/>
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="2" Grid.Column="3">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="0.3*" />
|
|
<ColumnDefinition Width="0.7*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="14" />
|
|
<RowDefinition Height="20" />
|
|
<RowDefinition Height="20" />
|
|
<RowDefinition Height="14" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textBerth}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
|
|
<Label Grid.Row="1" Grid.Column="0" Content="ETA" Padding="0" VerticalContentAlignment="Center" />
|
|
<Label Grid.Row="2" Grid.Column="0" Content="ETD" Padding="0" VerticalContentAlignment="Center" />
|
|
<Label Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textRemarks}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
|
|
<Label Grid.Row="1" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelPortAuthorityETA" FontWeight="DemiBold"/>
|
|
<Label Grid.Row="2" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelPortAuthorityETD" FontWeight="DemiBold"/>
|
|
<TextBlock Grid.Row="3" Grid.Column="1" Grid.RowSpan="2" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockPortAuthorityRemarks"/>
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="2" Grid.Column="4">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="0.3*" />
|
|
<ColumnDefinition Width="0.7*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="14" />
|
|
<RowDefinition Height="20" />
|
|
<RowDefinition Height="20" />
|
|
<RowDefinition Height="14" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textBerth}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
|
|
<Label Grid.Row="1" Grid.Column="0" Content="ETA" Padding="0" VerticalContentAlignment="Center" />
|
|
<Label Grid.Row="2" Grid.Column="0" Content="ETD" Padding="0" VerticalContentAlignment="Center" />
|
|
<Label Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textRemarks}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
|
|
<Label Grid.Row="1" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelPilotETA" FontWeight="DemiBold"/>
|
|
<Label Grid.Row="2" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelPilotETD" FontWeight="DemiBold"/>
|
|
<TextBlock Grid.Row="3" Grid.Column="1" Grid.RowSpan="2" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockPilotRemarks"/>
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="2" Grid.Column="5">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="0.3*" />
|
|
<ColumnDefinition Width="0.7*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="14" />
|
|
<RowDefinition Height="20" />
|
|
<RowDefinition Height="20" />
|
|
<RowDefinition Height="14" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textBerth}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
|
|
<Label Grid.Row="1" Grid.Column="0" Content="ETA" Padding="0" VerticalContentAlignment="Center" />
|
|
<Label Grid.Row="2" Grid.Column="0" Content="ETD" Padding="0" VerticalContentAlignment="Center" />
|
|
<Label Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textRemarks}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
|
|
<Label Grid.Row="1" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelTugETA" FontWeight="DemiBold"/>
|
|
<Label Grid.Row="2" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelTugETD" FontWeight="DemiBold"/>
|
|
<TextBlock Grid.Row="3" Grid.Column="1" Grid.RowSpan="2" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockTugRemarks" />
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="2" Grid.Column="6">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="0.3*" />
|
|
<ColumnDefinition Width="0.7*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="14" />
|
|
<RowDefinition Height="20" />
|
|
<RowDefinition Height="20" />
|
|
<RowDefinition Height="14" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" x:Name="labelTerminalBerth" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
|
|
<Label Grid.Row="1" Grid.Column="0" Content="Start" Padding="0" VerticalContentAlignment="Center" />
|
|
<Label Grid.Row="2" Grid.Column="0" Content="End" Padding="0" VerticalContentAlignment="Center" />
|
|
<Label Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textRemarks}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
|
|
<Label Grid.Row="1" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelOperationsStart" FontWeight="DemiBold"/>
|
|
<Label Grid.Row="2" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelOperationsEnd" FontWeight="DemiBold"/>
|
|
<TextBlock Grid.Row="3" Grid.Column="1" Grid.RowSpan="2" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockTerminalRemarks" />
|
|
</Grid>
|
|
|
|
<!-- Image Margin="2" Grid.Column="3" Grid.Row="0" Grid.RowSpan="3">
|
|
<Image.Style>
|
|
<Style TargetType="Image">
|
|
<Setter Property="Source" Value="{Binding NotFolderImage}"/>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding LightMode}" Value="{x:Static db:ShipcallControlModel+TrafficLightMode.OFF}">
|
|
<Setter Property="Source" Value="./Resources/trafficlight_off.png"/>
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding LightMode}" Value="{x:Static db:ShipcallControlModel+TrafficLightMode.RED}">
|
|
<Setter Property="Source" Value="./Resources/trafficlight_red.png"/>
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding LightMode}" Value="{x:Static db:ShipcallControlModel+TrafficLightMode.RED_YELLOW}">
|
|
<Setter Property="Source" Value="./Resources/trafficlight_red_yellow.png"/>
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding LightMode}" Value="{x:Static db:ShipcallControlModel+TrafficLightMode.GREEN}">
|
|
<Setter Property="Source" Value="./Resources/trafficlight_green.png"/>
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding LightMode}" Value="{x:Static db:ShipcallControlModel+TrafficLightMode.ALL}">
|
|
<Setter Property="Source" Value="./Resources/trafficlight_on.png"/>
|
|
</DataTrigger>
|
|
<DataTrigger Binding="{Binding LightMode}" Value="{x:Static db:ShipcallControlModel+TrafficLightMode.YELLOW}">
|
|
<Setter Property="Source" Value="./Resources/trafficlight_yellow.png"/>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Image.Style>
|
|
</Image-->
|
|
</Grid>
|
|
</Border>
|
|
</UserControl>
|