diff --git a/ENI2/DetailRootControl.xaml.cs b/ENI2/DetailRootControl.xaml.cs
index 7f123564..254286a3 100644
--- a/ENI2/DetailRootControl.xaml.cs
+++ b/ENI2/DetailRootControl.xaml.cs
@@ -108,30 +108,40 @@ namespace ENI2
}
}
- public bool HasCriticalInfoMissing(out string messageText)
+ public bool HasCriticalInfoMissing(out string messageText, string locode)
{
messageText = "";
// Hier haben wir Logik für Spezialfälle, z.B. dass für BRE und BRV bestimmte Meldeklassen gesendet werden *müssen*
- if(this.Core.PoC.Equals("DEBRV") || this.Core.PoC.Equals("DEBRE") || this.Core.PoC.Equals("DEHAM"))
+ switch (locode)
{
- foreach(Message aMessage in _messages)
- {
- if (!this.Core.PoC.Equals("DEHAM")) {
- if ((aMessage.MessageNotificationClass == Message.NotificationClass.NOA_NOD) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "NOA_NOD"; return true; }
- if ((aMessage.MessageNotificationClass == Message.NotificationClass.AGNT) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "AGNT"; return true; }
- if ((aMessage.MessageNotificationClass == Message.NotificationClass.INFO) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "INFO"; return true; }
- if ((aMessage.MessageNotificationClass == Message.NotificationClass.SEC) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "SEC"; return true; }
- if ((aMessage.MessageNotificationClass == Message.NotificationClass.TIEFA) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "TIEFA"; return true; }
+ case "DEBRV":
+ case "DEBRE":
+ {
+ foreach (Message aMessage in _messages)
+ {
+ if ((aMessage.MessageNotificationClass == Message.NotificationClass.NOA_NOD) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "NOA_NOD"; return true; }
+ if ((aMessage.MessageNotificationClass == Message.NotificationClass.AGNT) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "AGNT"; return true; }
+ if ((aMessage.MessageNotificationClass == Message.NotificationClass.INFO) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "INFO"; return true; }
+ if ((aMessage.MessageNotificationClass == Message.NotificationClass.SEC) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "SEC"; return true; }
+ if ((aMessage.MessageNotificationClass == Message.NotificationClass.TIEFA) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "TIEFA"; return true; }
+ }
}
- if ((aMessage.MessageNotificationClass == Message.NotificationClass.SERV) && (aMessage.InternalStatus != Message.BSMDStatus.CONFIRMED)) { messageText = "SERV"; return true; }
- if ((aMessage.MessageNotificationClass == Message.NotificationClass.SERV) && (aMessage.Elements.Count == 0)) { messageText = "SERV"; return true; }
- }
+ break;
+ case "DEHAM":
+ foreach (Message aMessage in _messages)
+ {
+ if ((aMessage.MessageNotificationClass == Message.NotificationClass.SERV) && (aMessage.Elements.Count == 0)) { messageText = "SERV"; return true; }
+ }
+ break;
+ default:
+ break;
}
return false;
}
+
#endregion
#region Construction
diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj
index 46c413b1..86a4ffd7 100644
--- a/ENI2/ENI2.csproj
+++ b/ENI2/ENI2.csproj
@@ -36,8 +36,8 @@
5.4.0.0
true
publish.html
- 9
- 7.2.3.1
+ 2
+ 7.2.3.2
false
true
true
diff --git a/ENI2/MainWindow.xaml.cs b/ENI2/MainWindow.xaml.cs
index b9119418..5f4746c1 100644
--- a/ENI2/MainWindow.xaml.cs
+++ b/ENI2/MainWindow.xaml.cs
@@ -216,17 +216,28 @@ namespace ENI2
}
// Dez.22: Special case for BRE/BRV: Warning if some messages are not "confirmed"
- if(drc.Core.PoC.Equals("DEBRE")||drc.Core.PoC.Equals("DEBRV")||drc.Core.PoC.Equals("DEHAM"))
+ if(drc.Core.PoC.Equals("DEBRE")||drc.Core.PoC.Equals("DEBRV"))
{
- if(drc.HasCriticalInfoMissing(out string missingClass))
+ if(drc.HasCriticalInfoMissing(out string missingClass, drc.Core.PoC))
{
- _log.WarnFormat("set close warning because at least {0} is missing from BRE/BRV/HAM arrival", missingClass);
+ // _log.WarnFormat("set close warning because at least {0} is missing from BRE/BRV/HAM arrival", missingClass);
if (MessageBox.Show(string.Format(Properties.Resources.textSpecialCaseBREBRV, missingClass), Properties.Resources.textConfirmation, MessageBoxButton.YesNo,
MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No)
e.Cancel = true;
}
}
+ // Jul.24: Special case HAM extended (from above)
+ if (drc.Core.PoC.Equals("DEHAM"))
+ {
+ if (drc.HasCriticalInfoMissing(out string missingClass, drc.Core.PoC))
+ {
+ if (MessageBox.Show(string.Format(Properties.Resources.textSpecialCaseDEHAM, missingClass), Properties.Resources.textConfirmation, MessageBoxButton.YesNo,
+ MessageBoxImage.Question, MessageBoxResult.No) == MessageBoxResult.No)
+ e.Cancel = true;
+ }
+ }
+
if (!e.Cancel)
{
if (lockedCores.ContainsKey(tabItem))
diff --git a/ENI2/Properties/Resources.Designer.cs b/ENI2/Properties/Resources.Designer.cs
index 8414cb16..cc0ad076 100644
--- a/ENI2/Properties/Resources.Designer.cs
+++ b/ENI2/Properties/Resources.Designer.cs
@@ -4682,6 +4682,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to No {0} info given for DEHAM. Close anyway?.
+ ///
+ public static string textSpecialCaseDEHAM {
+ get {
+ return ResourceManager.GetString("textSpecialCaseDEHAM", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Special requirements.
///
diff --git a/ENI2/Properties/Resources.resx b/ENI2/Properties/Resources.resx
index 9a5930d4..b87fec42 100644
--- a/ENI2/Properties/Resources.resx
+++ b/ENI2/Properties/Resources.resx
@@ -1900,4 +1900,7 @@
Copy to PASD
+
+ No {0} info given for DEHAM. Close anyway?
+
\ No newline at end of file