Merge branch 'release/eni_7.4'

This commit is contained in:
Daniel Schick 2022-09-30 12:11:26 +02:00
commit f68613c48a
15 changed files with 84 additions and 18 deletions

View File

@ -6,7 +6,7 @@
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
</startup>
<userSettings>
<CoreDeleteTool.Properties.Settings>

View File

@ -9,7 +9,7 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CoreDeleteTool</RootNamespace>
<AssemblyName>CoreDeleteTool</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
@ -80,6 +80,7 @@
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>

View File

@ -8,7 +8,8 @@ namespace CoreDeleteTool
{
public partial class Main : Form
{
SortableBindingList<MessageCore> messageCores = new SortableBindingList<MessageCore>();
private readonly SortableBindingList<MessageCore> messageCores = new SortableBindingList<MessageCore>();
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);

View File

@ -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 {

View File

@ -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())));

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

View File

@ -14,6 +14,7 @@ using ENI2.DetailViewControls;
using ENI2.Util;
using ENI2.EditControls;
using System.Windows.Input;
namespace ENI2
{
@ -143,6 +144,23 @@ namespace ENI2
BindingOperations.EnableCollectionSynchronization(_messages, this.messageListLock);
Dispatcher.BeginInvoke((Action)(() => this.listBoxMessages.SelectedIndex = 0));
RoutedCommand saveCmd = new RoutedCommand();
saveCmd.InputGestures.Add(new KeyGesture(Key.S, ModifierKeys.Control));
CommandBindings.Add(new CommandBinding(saveCmd, this.buttonSave_Click));
RoutedCommand saveAllCmd = new RoutedCommand();
saveAllCmd.InputGestures.Add(new KeyGesture(Key.A, ModifierKeys.Control));
CommandBindings.Add(new CommandBinding(saveAllCmd, this.buttonSaveAll_Click));
RoutedCommand reloadCmd = new RoutedCommand();
reloadCmd.InputGestures.Add(new KeyGesture(Key.R, ModifierKeys.Control));
CommandBindings.Add(new CommandBinding(reloadCmd, this.ShortCutReload));
RoutedCommand validateCmd = new RoutedCommand();
validateCmd.InputGestures.Add(new KeyGesture(Key.F, ModifierKeys.Control));
CommandBindings.Add(new CommandBinding(validateCmd, this.ShortCutValidate));
}
#endregion
@ -541,6 +559,16 @@ namespace ENI2
}
*/
private void ShortCutReload(object sender, ExecutedRoutedEventArgs e)
{
this.DetailControl_RequestReload(this.Core.Id.Value);
}
private void ShortCutValidate(object sender, ExecutedRoutedEventArgs e)
{
this.DetailControl_RequestValidate();
}
private void DetailControl_RequestReload(Guid id)
{
/// core und messages neu laden

View File

@ -36,8 +36,8 @@
<MinimumRequiredVersion>5.4.0.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.html</WebPage>
<ApplicationRevision>3</ApplicationRevision>
<ApplicationVersion>7.3.0.3</ApplicationVersion>
<ApplicationRevision>2</ApplicationRevision>
<ApplicationVersion>7.4.0.2</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
@ -84,7 +84,7 @@
</PropertyGroup>
<PropertyGroup />
<PropertyGroup>
<ManifestCertificateThumbprint>9B5725EAD90F2E06094631407417EB2554E88941</ManifestCertificateThumbprint>
<ManifestCertificateThumbprint>62DE8527C377957850DB503DA52FF66F664BD459</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<SignManifests>true</SignManifests>

View File

@ -27,11 +27,20 @@ namespace ENI2.Excel
{
try
{
// sheet.Columns.ClearFormats();
// sheet.Rows.ClearFormats();
Range usedRange = sheet.UsedRange;
lastUsedRow = usedRange.Rows.Count;
lastUsedColumn = usedRange.Columns.Count;
/*
Range last = sheet.Cells.SpecialCells(XlCellType.xlCellTypeLastCell, Type.Missing);
Range range = sheet.get_Range("A1", last);
lastUsedRow = last.Row;
lastUsedColumn = last.Column;
*/
return true;
}
catch(Exception)

View File

@ -982,6 +982,9 @@ namespace ENI2.Excel
}
}
if (!stat.Flag.IsNullOrEmpty()) stat.Flag = stat.Flag.ToUpper();
if (!stat.PortOfRegistry.IsNullOrEmpty()) stat.PortOfRegistry = stat.PortOfRegistry.ToUpper();
stat.MMSINumber = reader.ReadTextNoWhitespace("STAT.MMSINumber");
stat.CallSign = reader.ReadTextNoWhitespace("STAT.CallSign");
stat.ISMCompanyId = reader.ReadTextNoWhitespace("STAT.ISMCompanyId");

View File

@ -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<DatabaseEntity> statList = dummyHAZA.LoadList(reader);
foreach (DatabaseEntity derivedMessage in statList)
{
message.Elements.Add(derivedMessage);
derivedMessage.MessageHeader = message;
this.LoadDependingLists(derivedMessage);
}
}
}
}
}
}
}
}

View File

@ -2,6 +2,6 @@
[assembly: AssemblyCompany("schick Informatik")]
[assembly: AssemblyProduct("BSMD NSW interface")]
[assembly: AssemblyInformationalVersion("7.3.0")]
[assembly: AssemblyInformationalVersion("7.4.0")]
[assembly: AssemblyCopyright("Copyright © 2014-2022 schick Informatik")]
[assembly: AssemblyTrademark("")]

View File

@ -1,4 +1,4 @@
using System.Reflection;
[assembly: AssemblyVersion("7.3.0.*")]
[assembly: AssemblyVersion("7.4.0.*")]

View File

@ -356,11 +356,11 @@ namespace bsmd.database
break;
case ValidationCode.PAST_DATE:
{
if (value.Length == 0) errors.Add(RuleEngine.CreateError(ValidationCode.NOT_NULL, property.Name, value, entity.Title, identifier, entity.Tablename));
if (value.Length == 0) violations.Add(RuleEngine.CreateViolation(ValidationCode.NOT_NULL, property.Name, value, entity.Title, identifier, entity.Tablename));
if (DateTime.TryParse(value, out DateTime aTime))
{
if (aTime < DateTime.UtcNow)
errors.Add(RuleEngine.CreateError(validationCode, property.Name, value, entity.Title, identifier, entity.Tablename));
violations.Add(RuleEngine.CreateViolation(validationCode, property.Name, value, entity.Title, identifier, entity.Tablename));
}
}
break;