diff --git a/CoreDeleteTool/App.config b/CoreDeleteTool/App.config
index cac142d6..b967fdd4 100644
--- a/CoreDeleteTool/App.config
+++ b/CoreDeleteTool/App.config
@@ -6,7 +6,7 @@
-
+
diff --git a/CoreDeleteTool/CoreDeleteTool.csproj b/CoreDeleteTool/CoreDeleteTool.csproj
index 09b4a4c2..292d9e4d 100644
--- a/CoreDeleteTool/CoreDeleteTool.csproj
+++ b/CoreDeleteTool/CoreDeleteTool.csproj
@@ -9,7 +9,7 @@
Properties
CoreDeleteTool
CoreDeleteTool
- v4.5
+ v4.8
512
true
@@ -80,6 +80,7 @@
True
Resources.resx
+ True
SettingsSingleFileGenerator
diff --git a/CoreDeleteTool/Main.cs b/CoreDeleteTool/Main.cs
index 1311e32c..c6e75e9e 100644
--- a/CoreDeleteTool/Main.cs
+++ b/CoreDeleteTool/Main.cs
@@ -8,7 +8,8 @@ namespace CoreDeleteTool
{
public partial class Main : Form
{
- SortableBindingList messageCores = new SortableBindingList();
+
+ private readonly SortableBindingList messageCores = new SortableBindingList();
public Main()
{
@@ -49,8 +50,7 @@ namespace CoreDeleteTool
for (int i = 0; i < this.dataGridView.SelectedRows.Count; i++)
{
- MessageCore selectedCore = this.dataGridView.SelectedRows[i].DataBoundItem as MessageCore;
- if (selectedCore != null)
+ if (this.dataGridView.SelectedRows[i].DataBoundItem is MessageCore selectedCore)
{
DBManager.Instance.DeleteCore(selectedCore);
this.messageCores.Remove(selectedCore);
diff --git a/CoreDeleteTool/Properties/Resources.Designer.cs b/CoreDeleteTool/Properties/Resources.Designer.cs
index 139fb477..576b51f9 100644
--- a/CoreDeleteTool/Properties/Resources.Designer.cs
+++ b/CoreDeleteTool/Properties/Resources.Designer.cs
@@ -19,7 +19,7 @@ namespace CoreDeleteTool.Properties {
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
diff --git a/CoreDeleteTool/Properties/Settings.Designer.cs b/CoreDeleteTool/Properties/Settings.Designer.cs
index 9d5cddf2..45b61c4c 100644
--- a/CoreDeleteTool/Properties/Settings.Designer.cs
+++ b/CoreDeleteTool/Properties/Settings.Designer.cs
@@ -12,7 +12,7 @@ namespace CoreDeleteTool.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
diff --git a/CoreDeleteTool/application_delete.ico b/CoreDeleteTool/application_delete.ico
new file mode 100644
index 00000000..5317eaa3
Binary files /dev/null and b/CoreDeleteTool/application_delete.ico differ
diff --git a/bsmd.database/DBManager.cs b/bsmd.database/DBManager.cs
index 94603d3c..a37ceff9 100644
--- a/bsmd.database/DBManager.cs
+++ b/bsmd.database/DBManager.cs
@@ -792,6 +792,31 @@ namespace bsmd.database
}
}
}
+
+ // Stupid workaround to find HAZA's that are attached to a HAZD message header
+ if(message.MessageNotificationClass == Message.NotificationClass.HAZD)
+ {
+ using (SqlCommand cmd2 = new SqlCommand())
+ {
+ DatabaseEntity dummyHAZA = DBManager.CreateMessage(Message.NotificationClass.HAZA);
+
+ if (dummyHAZA != null)
+ {
+ dummyHAZA.PrepareLoadCommand(cmd2, Message.LoadFilter.MESSAGEHEADER, message.Id);
+ SqlDataReader reader = this.PerformCommand(cmd2);
+ if (reader != null)
+ {
+ List statList = dummyHAZA.LoadList(reader);
+ foreach (DatabaseEntity derivedMessage in statList)
+ {
+ message.Elements.Add(derivedMessage);
+ derivedMessage.MessageHeader = message;
+ this.LoadDependingLists(derivedMessage);
+ }
+ }
+ }
+ }
+ }
}
}
}