Compare commits

..

3 Commits

3 changed files with 27 additions and 14 deletions

View File

@ -871,7 +871,7 @@ namespace ENI2
vViolations.AddRange(violations); vViolations.AddRange(violations);
} }
#region 12.11.18 / 6.3.21 / 23.5.22 / 26.10.24: globale Plausi-Prüfungen #region 12.11.18 / 6.3.21 / 23.5.22 / 26.10.24 / 27.1.26: globale Plausi-Prüfungen
Message crewaMessage = messagesSnapshot.Find(message => message.MessageNotificationClass == Message.NotificationClass.CREWA); Message crewaMessage = messagesSnapshot.Find(message => message.MessageNotificationClass == Message.NotificationClass.CREWA);
Message crewdMessage = messagesSnapshot.Find(message => message.MessageNotificationClass == Message.NotificationClass.CREWD); Message crewdMessage = messagesSnapshot.Find(message => message.MessageNotificationClass == Message.NotificationClass.CREWD);
@ -1243,6 +1243,8 @@ namespace ENI2
#region WAS special max capa rules regarding next port #region WAS special max capa rules regarding next port
{ {
string wasMessageGroup = this.MessageGroupForMessage(wasMessage);
// see WAS-Regulation.docx in parent projects misc folder // see WAS-Regulation.docx in parent projects misc folder
if ((noanodMessage?.Elements.Count > 0) && wasMessage?.Elements.Count > 0) if ((noanodMessage?.Elements.Count > 0) && wasMessage?.Elements.Count > 0)
{ {
@ -1266,7 +1268,7 @@ namespace ENI2
if (waste.WasteAmountRetained_MTQ > waste.WasteCapacity_MTQ * 0.5) if (waste.WasteAmountRetained_MTQ > waste.WasteCapacity_MTQ * 0.5)
{ {
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Acc. to EU Regulation 2022/89 the amount retained on board is noticeably", null, "WAS", waste.Identifier, "WAS"); MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Acc. to EU Regulation 2022/89 the amount retained on board is noticeably", null, "WAS", waste.Identifier, "WAS");
mv.MessageGroupName = Properties.Resources.textPortNotification; mv.MessageGroupName = wasMessageGroup;
vViolations.Add(mv); vViolations.Add(mv);
} }
break; break;
@ -1284,7 +1286,7 @@ namespace ENI2
if (waste.WasteAmountRetained_MTQ > waste.WasteCapacity_MTQ * 0.25) if (waste.WasteAmountRetained_MTQ > waste.WasteCapacity_MTQ * 0.25)
{ {
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Acc. to EU Regulation 2022/89 the amount retained on board is noticeably", null, "WAS", waste.Identifier, "WAS"); MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Acc. to EU Regulation 2022/89 the amount retained on board is noticeably", null, "WAS", waste.Identifier, "WAS");
mv.MessageGroupName = Properties.Resources.textPortNotification; mv.MessageGroupName = wasMessageGroup;
vViolations.Add(mv); vViolations.Add(mv);
} }
break; break;
@ -1293,7 +1295,7 @@ namespace ENI2
if (waste.WasteAmountRetained_MTQ > waste.WasteCapacity_MTQ * 0.75) if (waste.WasteAmountRetained_MTQ > waste.WasteCapacity_MTQ * 0.75)
{ {
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Acc. to EU Regulation 2022/89 the amount retained on board is noticeably", null, "WAS", waste.Identifier, "WAS"); MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Acc. to EU Regulation 2022/89 the amount retained on board is noticeably", null, "WAS", waste.Identifier, "WAS");
mv.MessageGroupName = Properties.Resources.textPortNotification; mv.MessageGroupName = wasMessageGroup;
vViolations.Add(mv); vViolations.Add(mv);
} }
break; break;
@ -1314,7 +1316,7 @@ namespace ENI2
if (waste.WasteAmountRetained_MTQ > waste.WasteCapacity_MTQ * 0.25) if (waste.WasteAmountRetained_MTQ > waste.WasteCapacity_MTQ * 0.25)
{ {
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Acc. to EU Regulation 2022/89 the amount retained on board is noticeably", null, "WAS", waste.Identifier, "WAS"); MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Acc. to EU Regulation 2022/89 the amount retained on board is noticeably", null, "WAS", waste.Identifier, "WAS");
mv.MessageGroupName = Properties.Resources.textPortNotification; mv.MessageGroupName = wasMessageGroup;
vViolations.Add(mv); vViolations.Add(mv);
} }
break; break;
@ -1322,7 +1324,7 @@ namespace ENI2
if (waste.WasteAmountRetained_MTQ > waste.WasteCapacity_MTQ * 0.5) if (waste.WasteAmountRetained_MTQ > waste.WasteCapacity_MTQ * 0.5)
{ {
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Acc. to EU Regulation 2022/89 the amount retained on board is noticeably", null, "WAS", waste.Identifier, "WAS"); MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Acc. to EU Regulation 2022/89 the amount retained on board is noticeably", null, "WAS", waste.Identifier, "WAS");
mv.MessageGroupName = Properties.Resources.textPortNotification; mv.MessageGroupName = wasMessageGroup;
vViolations.Add(mv); vViolations.Add(mv);
} }
break; break;
@ -1340,7 +1342,7 @@ namespace ENI2
if (waste.WasteAmountRetained_MTQ > waste.WasteCapacity_MTQ * 0.2) if (waste.WasteAmountRetained_MTQ > waste.WasteCapacity_MTQ * 0.2)
{ {
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Acc. to EU Regulation 2022/89 the amount retained on board is noticeably", null, "WAS", waste.Identifier, "WAS"); MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Acc. to EU Regulation 2022/89 the amount retained on board is noticeably", null, "WAS", waste.Identifier, "WAS");
mv.MessageGroupName = Properties.Resources.textPortNotification; mv.MessageGroupName = wasMessageGroup;
vViolations.Add(mv); vViolations.Add(mv);
} }
break; break;
@ -1349,7 +1351,7 @@ namespace ENI2
if (waste.WasteAmountRetained_MTQ > waste.WasteCapacity_MTQ * 0.25) if (waste.WasteAmountRetained_MTQ > waste.WasteCapacity_MTQ * 0.25)
{ {
MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Acc. to EU Regulation 2022/89 the amount retained on board is noticeably", null, "WAS", waste.Identifier, "WAS"); MessageViolation mv = RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Acc. to EU Regulation 2022/89 the amount retained on board is noticeably", null, "WAS", waste.Identifier, "WAS");
mv.MessageGroupName = Properties.Resources.textPortNotification; mv.MessageGroupName = wasMessageGroup;
vViolations.Add(mv); vViolations.Add(mv);
} }
break; break;
@ -1459,6 +1461,12 @@ namespace ENI2
MessageBox.Show(Properties.Resources.textValidationOK, Properties.Resources.textValidation, MessageBoxButton.OK, MessageBoxImage.Information); MessageBox.Show(Properties.Resources.textValidationOK, Properties.Resources.textValidation, MessageBoxButton.OK, MessageBoxImage.Information);
} }
} }
if (controlCache.TryGetValue(Properties.Resources.textOverview, out DetailBaseControl overviewControl) &&
overviewControl is OverViewDetailControl ovdc)
{
ovdc.RefreshMessageGrid();
}
} }
private void ApplyCrewEffectsWarningSuppression() private void ApplyCrewEffectsWarningSuppression()

View File

@ -341,8 +341,8 @@ namespace ENI2.DetailViewControls
} }
} }
public void UpdateCore() public void UpdateCore()
{ {
this.UnregisterTextboxChange(this.textBoxDisplayId); this.UnregisterTextboxChange(this.textBoxDisplayId);
this.textBoxDisplayId.DataContext = null; this.textBoxDisplayId.DataContext = null;
@ -367,8 +367,13 @@ namespace ENI2.DetailViewControls
//}; //};
//sid.UpdateId(this.Core.DisplayId); //sid.UpdateId(this.Core.DisplayId);
//sid.Show(); //sid.Show();
this.Core.IsDirty = false; // ist ja schon gespeichert.. this.Core.IsDirty = false; // ist ja schon gespeichert..
} }
internal void RefreshMessageGrid()
{
this.dataGridMessages?.Items?.Refresh();
}
#endregion #endregion

View File

@ -36,8 +36,8 @@
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion> <MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish> <CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage> <WebPage>publish.html</WebPage>
<ApplicationRevision>0</ApplicationRevision> <ApplicationRevision>1</ApplicationRevision>
<ApplicationVersion>7.2.14.0</ApplicationVersion> <ApplicationVersion>7.2.14.1</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut> <CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted> <PublishWizardCompleted>true</PublishWizardCompleted>