From 40b9fff12107bb2a3c07122214ff9c200f33d045 Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Wed, 29 Jan 2025 20:36:32 +0100 Subject: [PATCH] Added sheet / logic part 10,11 HAZ arrival/departure --- ENI2/DetailRootControl.xaml.cs | 5 + .../DangerousGoodsDetailControl.xaml.cs | 40 +- ENI2/ENI2.csproj | 7 + ENI2/Properties/Resources.Designer.cs | 135 +++ ENI2/Properties/Resources.resx | 45 + .../DangerousCargoControl.xaml | 193 ++++ .../DangerousCargoControl.xaml.cs | 840 ++++++++++++++++++ .../Properties/AssemblyProductInfo.cs | 2 +- 8 files changed, 1248 insertions(+), 19 deletions(-) create mode 100644 ENI2/SheetDisplayControls/DangerousCargoControl.xaml create mode 100644 ENI2/SheetDisplayControls/DangerousCargoControl.xaml.cs diff --git a/ENI2/DetailRootControl.xaml.cs b/ENI2/DetailRootControl.xaml.cs index 3c09c07a..549bc577 100644 --- a/ENI2/DetailRootControl.xaml.cs +++ b/ENI2/DetailRootControl.xaml.cs @@ -185,6 +185,9 @@ namespace ENI2 this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text7CrewDeparture, MessageGroupControlType = typeof(CrewDepartureControl), ImagePath = "Resources/departure_worker.png" }); this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text8PassengerArrival, MessageGroupControlType = typeof(PassengerPreArrivalControl), ImagePath = "Resources/arrival_user.png" }); this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text9PassengerDeparture, MessageGroupControlType = typeof(PassengerDepartureControl), ImagePath = "Resources/departure_user.png" }); + this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text10DangerousCargoArrival, MessageGroupControlType = typeof(DangerousCargoControl), ImagePath = "Resources/sign_warning_radiation.png" }); + this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text11DangerousCargoDeparture, MessageGroupControlType = typeof(DangerousCargoControl), ImagePath = "Resources/sign_warning_radiation.png" }); + } this.listBoxMessages.ItemsSource = this._listBoxList; @@ -267,6 +270,8 @@ namespace ENI2 // Spezial-Balkon für die Wiederverwendung von HAZD / HAZA als ein Control (es tut mir leid :D) if (mg.MessageGroupName.Equals(Properties.Resources.textDGDeparture)) ((DangerousGoodsDetailControl)detailControl).IsDeparture = true; + if (mg.MessageGroupName.Equals(Properties.Resources.text11DangerousCargoDeparture)) + ((DangerousCargoControl)detailControl).IsDeparture = true; detailControl.Core = Core; detailControl.Messages = _messages; detailControl.LockedByOtherUser = this.LockedByOtherUser; diff --git a/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs b/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs index 823c5df6..6da66a77 100644 --- a/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs +++ b/ENI2/DetailViewControls/DangerousGoodsDetailControl.xaml.cs @@ -324,24 +324,7 @@ namespace ENI2.DetailViewControls } } - #endregion - - /// - /// Beim Hinzufügen der allerersten Gefahrgutposition sollen die Flags vorbelegt werden - /// - void SetHAZGlobalFlags() - { - HAZ haz = this.IsDeparture ? this.hazd : this.haza; - - int totalCount = haz.MARPOLPositions.Count + haz.IMDGPositions.Count + haz.IGCPositions.Count + haz.IBCPositions.Count + haz.IMSBCPositions.Count; - if(totalCount == 1) - { - if (!(this.checkBoxDangerousGoodsOnBoard.IsChecked ?? false)) this.checkBoxDangerousGoodsOnBoard.IsChecked = true; - if (this.checkBoxMoUBaltic.IsChecked ?? true) this.checkBoxMoUBaltic.IsChecked = false; - haz.NoDPGOnBoardOnArrival = false; - haz.MOUBaltic = false; - } - } + #endregion #region MARPOL datagrid handlers @@ -898,5 +881,26 @@ namespace ENI2.DetailViewControls #endregion + #region private methods + + /// + /// Beim Hinzufügen der allerersten Gefahrgutposition sollen die Flags vorbelegt werden + /// + void SetHAZGlobalFlags() + { + HAZ haz = this.IsDeparture ? this.hazd : this.haza; + + int totalCount = haz.MARPOLPositions.Count + haz.IMDGPositions.Count + haz.IGCPositions.Count + haz.IBCPositions.Count + haz.IMSBCPositions.Count; + if (totalCount == 1) + { + if (!(this.checkBoxDangerousGoodsOnBoard.IsChecked ?? false)) this.checkBoxDangerousGoodsOnBoard.IsChecked = true; + if (this.checkBoxMoUBaltic.IsChecked ?? true) this.checkBoxMoUBaltic.IsChecked = false; + haz.NoDPGOnBoardOnArrival = false; + haz.MOUBaltic = false; + } + } + + #endregion + } } diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj index 1aa26530..1b18e555 100644 --- a/ENI2/ENI2.csproj +++ b/ENI2/ENI2.csproj @@ -499,6 +499,9 @@ CrewPreArrivalControl.xaml + + DangerousCargoControl.xaml + PassengerDepartureControl.xaml @@ -838,6 +841,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/ENI2/Properties/Resources.Designer.cs b/ENI2/Properties/Resources.Designer.cs index 2648aa2e..48a9b91a 100644 --- a/ENI2/Properties/Resources.Designer.cs +++ b/ENI2/Properties/Resources.Designer.cs @@ -830,6 +830,69 @@ namespace ENI2.Properties { } } + /// + /// Looks up a localized string similar to 10.3 IGC data (on arrival), if applicable. + /// + public static string text10_3IGCData { + get { + return ResourceManager.GetString("text10.3IGCData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 10.1 General. + /// + public static string text101General { + get { + return ResourceManager.GetString("text101General", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 10.2 IBC data (on arrival), if applicable. + /// + public static string text102IBCData { + get { + return ResourceManager.GetString("text102IBCData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 10.3 IGC data (on arrival), if applicable. + /// + public static string text103IGCData { + get { + return ResourceManager.GetString("text103IGCData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 10.4 IMSBC data (on arrival), if applicable. + /// + public static string text104IMSBCData { + get { + return ResourceManager.GetString("text104IMSBCData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 10.5 MARPOL I data (on arrival), if applicable. + /// + public static string text105MARPOLData { + get { + return ResourceManager.GetString("text105MARPOLData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 10.6 IMDG data (on arrival), if applicable. + /// + public static string text106IMDGData { + get { + return ResourceManager.GetString("text106IMDGData", resourceCulture); + } + } + /// /// Looks up a localized string similar to 10. Dangerous cargo data on arrival. /// @@ -848,6 +911,15 @@ namespace ENI2.Properties { } } + /// + /// Looks up a localized string similar to 11.1 General. + /// + public static string text111General { + get { + return ResourceManager.GetString("text111General", resourceCulture); + } + } + /// /// Looks up a localized string similar to 1.11 Port of itinerary. /// @@ -857,6 +929,51 @@ namespace ENI2.Properties { } } + /// + /// Looks up a localized string similar to 11.2 IBC data (on departure), if applicable. + /// + public static string text112IBCData { + get { + return ResourceManager.GetString("text112IBCData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 11.3 IGC data (on departure), if applicable. + /// + public static string text113IGCData { + get { + return ResourceManager.GetString("text113IGCData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 11.4 IMSBC data (on departure), if applicable. + /// + public static string text114IMSBCData { + get { + return ResourceManager.GetString("text114IMSBCData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 11.5 MARPOL I data (on departure), if applicable. + /// + public static string text115MARPOLData { + get { + return ResourceManager.GetString("text115MARPOLData", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 11.6 IMDG data (on departure), if applicable. + /// + public static string text116IMDGData { + get { + return ResourceManager.GetString("text116IMDGData", resourceCulture); + } + } + /// /// Looks up a localized string similar to 11. Dangerous cargo data on departure. /// @@ -2513,6 +2630,24 @@ namespace ENI2.Properties { } } + /// + /// Looks up a localized string similar to DG manifest contact - family name. + /// + public static string textDGContactFamilyName { + get { + return ResourceManager.GetString("textDGContactFamilyName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DG manifest contact - phone. + /// + public static string textDGContactPhone { + get { + return ResourceManager.GetString("textDGContactPhone", resourceCulture); + } + } + /// /// Looks up a localized string similar to Dangerous goods departure. /// diff --git a/ENI2/Properties/Resources.resx b/ENI2/Properties/Resources.resx index 4a589e77..15abc490 100644 --- a/ENI2/Properties/Resources.resx +++ b/ENI2/Properties/Resources.resx @@ -2113,4 +2113,49 @@ 13. Waste receipts + + DG manifest contact - family name + + + DG manifest contact - phone + + + 10.2 IBC data (on arrival), if applicable + + + 10.3 IGC data (on arrival), if applicable + + + 10.4 IMSBC data (on arrival), if applicable + + + 10.3 IGC data (on arrival), if applicable + + + 10.5 MARPOL I data (on arrival), if applicable + + + 10.6 IMDG data (on arrival), if applicable + + + 10.1 General + + + 11.1 General + + + 11.2 IBC data (on departure), if applicable + + + 11.3 IGC data (on departure), if applicable + + + 11.4 IMSBC data (on departure), if applicable + + + 11.5 MARPOL I data (on departure), if applicable + + + 11.6 IMDG data (on departure), if applicable + \ No newline at end of file diff --git a/ENI2/SheetDisplayControls/DangerousCargoControl.xaml b/ENI2/SheetDisplayControls/DangerousCargoControl.xaml new file mode 100644 index 00000000..823a6cd6 --- /dev/null +++ b/ENI2/SheetDisplayControls/DangerousCargoControl.xaml @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +