pimped up the optics of a shipcall cell (a bit)

This commit is contained in:
Daniel Schick 2024-04-19 16:07:00 +02:00
parent 829b7d9c3c
commit 634c638e27
3 changed files with 29 additions and 8 deletions

View File

@ -1,6 +1,6 @@
// Copyright (c) 2023 schick Informatik // Copyright (c) 2023 schick Informatik
// Description: Static lists used everywhere // Description: Static lists used everywhere
// //
using BreCalClient.misc.Model; using BreCalClient.misc.Model;
using System.Collections.Concurrent; using System.Collections.Concurrent;
@ -30,9 +30,13 @@ namespace BreCalClient
private readonly static ConcurrentDictionary<int, Berth> _berthLookupDict = new(); private readonly static ConcurrentDictionary<int, Berth> _berthLookupDict = new();
private readonly static Dictionary<int, Participant> _participantLookupDict = new(); private readonly static Dictionary<int, Participant> _participantLookupDict = new();
/// <summary>
/// List of TimeRef points
/// </summary>
// TODO: To make this portable the list of texts should come from a configuration file
private readonly static List<string> _timeRefs = new List<string> private readonly static List<string> _timeRefs = new List<string>
{ {
"Liegeplatz", "ETB",
"Geeste", "Geeste",
"TN-Weser" "TN-Weser"
}; };
@ -113,7 +117,7 @@ namespace BreCalClient
aList.Clear(); aList.Clear();
mList.Clear(); mList.Clear();
pList.Clear(); pList.Clear();
tList.Clear(); tList.Clear();
terList.Clear(); terList.Clear();
foreach (Participant p in participants) foreach (Participant p in participants)
@ -147,7 +151,7 @@ namespace BreCalClient
if (!ship.Deleted) if (!ship.Deleted)
_ships.Add(sm); _ships.Add(sm);
_allShips.Add(sm); _allShips.Add(sm);
} }
} }
#endregion #endregion

View File

@ -122,11 +122,15 @@
<Label Grid.Row="0" Grid.Column="0" Content = "ETA" x:Name="labelETAETDAgent" Padding="0" VerticalContentAlignment="Center" /> <Label Grid.Row="0" Grid.Column="0" Content = "ETA" x:Name="labelETAETDAgent" Padding="0" VerticalContentAlignment="Center" />
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textRemarks}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/> <Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textRemarks}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
<Label Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textBerth}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/> <Border Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" BorderThickness="0,1,0,0" BorderBrush="Gray" >
<Label Content="{x:Static p:Resources.textBerth}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
</Border>
<Label Grid.Row="0" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelAgencyETAETDValue" FontWeight="DemiBold"/> <Label Grid.Row="0" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelAgencyETAETDValue" FontWeight="DemiBold"/>
<TextBlock Grid.Row="1" Grid.Column="1" Grid.RowSpan="1" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockAgencyRemarks" FontSize="10"/> <TextBlock Grid.Row="1" Grid.Column="1" Grid.RowSpan="1" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockAgencyRemarks" FontSize="10"/>
<Label Grid.Row="2" Grid.Column="1" HorizontalContentAlignment="Left" x:Name="labelAgencyBerth" Padding="0" VerticalContentAlignment="Center" FontSize="11" FontWeight="SemiBold" /> <Label Grid.Row="2" Grid.Column="1" HorizontalContentAlignment="Left" x:Name="labelAgencyBerth" Padding="0" VerticalContentAlignment="Center" FontSize="11" FontWeight="SemiBold" />
<TextBlock Grid.Row="3" Grid.Column="0" Text="{x:Static p:Resources.textBerthRemarks}" Padding="0" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="9"/> <TextBlock Grid.Row="3" Grid.Column="0" Text="{x:Static p:Resources.textRemarks}" Padding="0" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="9"/>
<TextBlock Grid.Row="3" Grid.Column="1" Grid.RowSpan="1" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockAgencyBerthRemarks" FontSize="10"/> <TextBlock Grid.Row="3" Grid.Column="1" Grid.RowSpan="1" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockAgencyBerthRemarks" FontSize="10"/>
</Grid> </Grid>
</Border> </Border>
@ -226,9 +230,11 @@
<Label Grid.Row="0" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelOperationsStart" FontWeight="DemiBold"/> <Label Grid.Row="0" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelOperationsStart" FontWeight="DemiBold"/>
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textRemarks}" Padding="0" VerticalContentAlignment="Top" FontSize="9"/> <Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textRemarks}" Padding="0" VerticalContentAlignment="Top" FontSize="9"/>
<TextBlock Grid.Row="1" Grid.Column="1" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockTerminalRemarks" FontSize="10"/> <TextBlock Grid.Row="1" Grid.Column="1" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockTerminalRemarks" FontSize="10"/>
<Label Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textBerth}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/> <Border BorderThickness="0,1,0,0" BorderBrush="Gray" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2">
<Label Content="{x:Static p:Resources.textBerth}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
</Border>
<Label Grid.Row="2" Grid.Column="1" HorizontalContentAlignment="Left" x:Name="labelTerminalBerth" Padding="0" VerticalContentAlignment="Center" FontSize="11" FontWeight="SemiBold" /> <Label Grid.Row="2" Grid.Column="1" HorizontalContentAlignment="Left" x:Name="labelTerminalBerth" Padding="0" VerticalContentAlignment="Center" FontSize="11" FontWeight="SemiBold" />
<TextBlock Grid.Row="3" Grid.Column="0" Text="{x:Static p:Resources.textBerthRemarks}" TextWrapping="Wrap" Padding="0" VerticalAlignment="Top" FontSize="9"/> <TextBlock Grid.Row="3" Grid.Column="0" Text="{x:Static p:Resources.textRemarks}" TextWrapping="Wrap" Padding="0" VerticalAlignment="Top" FontSize="9"/>
<TextBlock Grid.Row="3" Grid.Column="1" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockTerminalBerthRemarks" FontSize="10"/> <TextBlock Grid.Row="3" Grid.Column="1" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockTerminalBerthRemarks" FontSize="10"/>
</Grid> </Grid>
</Border> </Border>

View File

@ -303,6 +303,17 @@ namespace BreCalClient
this.labelETAETDTerminal.Content = BreCalClient.Resources.Resources.textOperationsEnd; this.labelETAETDTerminal.Content = BreCalClient.Resources.Resources.textOperationsEnd;
} }
if((this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival) && (this.ShipcallControlModel?.Shipcall.TimeRefPoint != null))
{
int timeRefPointIndex = this.ShipcallControlModel?.Shipcall?.TimeRefPoint ?? 0;
this.labelETAETDAgent.Content = BreCalLists.TimeRefs[timeRefPointIndex];
this.labelETAETDMooring.Content = BreCalLists.TimeRefs[timeRefPointIndex];
this.labelETAETDPilot.Content = BreCalLists.TimeRefs[timeRefPointIndex];
this.labelETAETDPortAuthority.Content = BreCalLists.TimeRefs[timeRefPointIndex];
this.labelETAETDTug.Content = BreCalLists.TimeRefs[timeRefPointIndex];
}
if (this.ShipcallControlModel != null) if (this.ShipcallControlModel != null)
{ {