From 80ad3e8e5a8b9454b28a52f86e051f1ff692cb15 Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Mon, 16 Sep 2024 16:02:57 +0200 Subject: [PATCH] Show port in shipcall control overview at the bottom left --- src/BreCalClient/MainWindow.xaml.cs | 1 + src/BreCalClient/ShipcallControl.xaml | 16 ++++++---------- src/BreCalClient/ShipcallControl.xaml.cs | 11 +++++------ 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/BreCalClient/MainWindow.xaml.cs b/src/BreCalClient/MainWindow.xaml.cs index 84f8595..9068853 100644 --- a/src/BreCalClient/MainWindow.xaml.cs +++ b/src/BreCalClient/MainWindow.xaml.cs @@ -287,6 +287,7 @@ namespace BreCalClient } }; scmOut.Shipcall.ShipId = esc.ShipcallModel.Shipcall.ShipId; + scmOut.Shipcall.PortId = esc.ShipcallModel.Shipcall.PortId; scmOut.Ship = esc.ShipcallModel.Ship; DateTime eta = esc.ShipcallModel.Shipcall?.Eta ?? DateTime.Now; scmOut.Shipcall.Etd = eta.AddDays(2); diff --git a/src/BreCalClient/ShipcallControl.xaml b/src/BreCalClient/ShipcallControl.xaml index 934ae9f..c045168 100644 --- a/src/BreCalClient/ShipcallControl.xaml +++ b/src/BreCalClient/ShipcallControl.xaml @@ -76,24 +76,20 @@ - - - - - - - + - + - + - + + + diff --git a/src/BreCalClient/ShipcallControl.xaml.cs b/src/BreCalClient/ShipcallControl.xaml.cs index 8f343df..7026253 100644 --- a/src/BreCalClient/ShipcallControl.xaml.cs +++ b/src/BreCalClient/ShipcallControl.xaml.cs @@ -82,8 +82,7 @@ namespace BreCalClient this.labelAgencyBerth.Content = ""; this.labelAgencyETAETDValue.Content = ""; this.textBlockAgencyRemarks.Text = ""; - this.textBlockAgencyBerthRemarks.Text = ""; - this.textBlockDraft.Text = ""; + this.textBlockAgencyBerthRemarks.Text = ""; } _mooring = this.ShipcallControlModel?.GetParticipantForType(Extensions.ParticipantType.MOORING); @@ -315,6 +314,8 @@ namespace BreCalClient if (this.ShipcallControlModel != null) { + this.textBlockHarbour.Text = ((ShipcallControlModel != null) && (ShipcallControlModel.Shipcall != null) && BreCalLists.PortLookupDict.ContainsKey(ShipcallControlModel.Shipcall.PortId)) ? + BreCalLists.PortLookupDict[ShipcallControlModel.Shipcall.PortId].Name : ""; Times? agencyTimes = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.AGENCY); if (agencyTimes != null) @@ -322,8 +323,7 @@ namespace BreCalClient this.labelAgencyBerth.Content = this.ShipcallControlModel?.GetBerthText(agencyTimes); this.labelAgencyETAETDValue.Content = agencyTimes.DisplayTime(this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival); this.textBlockAgencyRemarks.Text = agencyTimes.Remarks.TruncateDots(50); - this.textBlockAgencyBerthRemarks.Text = agencyTimes.BerthInfo.TruncateDots(50); - this.textBlockDraft.Text = ShipcallControlModel?.Shipcall?.Draft?.ToString("N2"); + this.textBlockAgencyBerthRemarks.Text = agencyTimes.BerthInfo.TruncateDots(50); } else { @@ -331,8 +331,7 @@ namespace BreCalClient this.labelAgencyBerth.Content = ""; this.labelAgencyETAETDValue.Content = "- / -"; this.textBlockAgencyRemarks.Text = ""; - this.textBlockAgencyBerthRemarks.Text = ""; - this.textBlockDraft.Text = ""; + this.textBlockAgencyBerthRemarks.Text = ""; } Times? mooringTimes = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.MOORING);