138 lines
8.4 KiB
XML
138 lines
8.4 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:db="clr-namespace:BreCalClient;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>
|
|
|
|
<Label Grid.Row="0" Grid.Column="0" Grid.RowSpan="1" Grid.ColumnSpan="2" FontSize="10" Content="{Binding Ship.Name}" Foreground="White" Background="#203864" VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" />
|
|
|
|
<Viewbox Grid.Row="1" Grid.Column="0">
|
|
<TextBlock Text="IMO" />
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="1" Grid.Column="1">
|
|
<TextBlock Text="{Binding Ship.Imo}" />
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="2" Grid.Column="0">
|
|
<TextBlock Text="{x:Static p:Resources.textCallsign}" />
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="2" Grid.Column="1">
|
|
<TextBlock Text="{Binding Ship.Callsign}" />
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="3" Grid.Column="0">
|
|
<TextBlock Text="{x:Static p:Resources.textLengthWidth}" />
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="3" Grid.Column="1">
|
|
<TextBlock>
|
|
<TextBlock.Text>
|
|
<MultiBinding StringFormat="{}{0}m/{1}m">
|
|
<Binding Path="Ship.Length" />
|
|
<Binding Path="Ship.Width" />
|
|
</MultiBinding>
|
|
</TextBlock.Text>
|
|
</TextBlock>
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="5" Grid.Column="0">
|
|
<TextBlock Text="ETA" />
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="5" Grid.Column="1">
|
|
<TextBlock Text="{Binding Shipcall.Eta}" />
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="6" Grid.Column="0">
|
|
<TextBlock Text="{x:Static p:Resources.textBerth}" />
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="6" Grid.Column="1">
|
|
<TextBlock Text="{Binding Berth}" />
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="7" Grid.Column="0">
|
|
<TextBlock Text="{x:Static p:Resources.textAgency}" />
|
|
</Viewbox>
|
|
<Viewbox Grid.Row="7" Grid.Column="1">
|
|
<TextBlock Text="{Binding Agency}" />
|
|
</Viewbox>
|
|
|
|
</Grid>
|
|
|
|
<Label Grid.Row="0" Grid.Column="1" Grid.RowSpan="1" FontSize="12" Content="- / -" Foreground="White" Background="#203864" VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelAgent"/>
|
|
<Label Grid.Row="0" Grid.Column="2" Grid.RowSpan="1" FontSize="12" Content="- / -" Foreground="White" Background="#203864" VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelMooring"/>
|
|
<Label Grid.Row="0" Grid.Column="3" Grid.RowSpan="1" FontSize="12" Content="- / -" Foreground="White" Background="#203864" VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelPortAuthority"/>
|
|
<Label Grid.Row="0" Grid.Column="4" Grid.RowSpan="1" FontSize="12" Content="- / -" Foreground="White" Background="#203864" VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelPilot"/>
|
|
<Label Grid.Row="0" Grid.Column="5" Grid.RowSpan="1" FontSize="12" Content="- / -" Foreground="White" Background="#203864" VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelTug"/>
|
|
<Label Grid.Row="0" Grid.Column="6" Grid.RowSpan="1" FontSize="12" Content="- / -" Foreground="White" Background="#203864" VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Name="labelTerminal"/>
|
|
|
|
|
|
|
|
|
|
<!-- 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>
|