Added sample sheet control, made display type selectable through reporting party dialog, updated references

This commit is contained in:
Daniel Schick 2025-01-22 17:05:28 +01:00
parent b2062c3227
commit 3c3fa5e1bd
19 changed files with 461 additions and 72 deletions

View File

@ -44,7 +44,6 @@ namespace ENI2
DataGrid grid = sender as DataGrid;
if(grid?.SelectedItems?.Count == 1)
{
DataGridRow dgr = grid.ItemContainerGenerator.ContainerFromItem(grid.SelectedItem) as DataGridRow;
MessageCore selectedCore = grid.SelectedItem as MessageCore;
this.DisplayCore(selectedCore);
}

View File

@ -85,7 +85,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.1" newVersion="9.0.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />

View File

@ -35,7 +35,7 @@ namespace ENI2
private ManualResetEvent ResetSplashCreated;
private Thread _splashThread;
private ILog _log = LogManager.GetLogger(typeof(App).Name);
private readonly ILog _log = LogManager.GetLogger(typeof(App).Name);
public App() : base()
{

View File

@ -17,6 +17,7 @@ using ENI2.EditControls;
using System.Windows.Input;
using Microsoft.Office.Interop.Excel;
using System.Linq;
using ENI2.SheetDisplayControls;
namespace ENI2
{
@ -146,7 +147,7 @@ namespace ENI2
#region Construction
public DetailRootControl(MessageCore aCore)
public DetailRootControl(MessageCore aCore, ReportingParty.ShipcallDisplayModeEnum displayMode)
{
Core = aCore;
InitializeComponent();
@ -154,8 +155,10 @@ namespace ENI2
shipEMailLabel.Text = aCore.HerbergEmailContactReportingVessel;
displayIdLabel.Text = aCore.DisplayId;
// TODO: Hier muss es eine Unterscheidung geben, in welchem Darstellungs-Mode der Anlauf dargestellt wird (Classic oder Formblatt)
// Listbox befüllen
if (displayMode == ReportingParty.ShipcallDisplayModeEnum.CLASSIC)
{
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textOverview, MessageGroupControlType = typeof(OverViewDetailControl), ImagePath = "Resources/documents.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textPortCall, MessageGroupControlType = typeof(PortCallDetailControl), ImagePath = "Resources/eye_blue.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textPortNotification, MessageGroupControlType = typeof(PortNotificationDetailControl), ImagePath = "Resources/anchor.png" });
@ -170,7 +173,11 @@ namespace ENI2
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textDGArrival, MessageGroupControlType = typeof(DangerousGoodsDetailControl), ImagePath = "Resources/sign_warning_radiation.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textDGDeparture, MessageGroupControlType = typeof(DangerousGoodsDetailControl), ImagePath = "Resources/sign_warning_radiation.png" });
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.textTowage, MessageGroupControlType = typeof(TowageDetailControl), ImagePath = "Resources/ship2.png" });
}
else
{
this._listBoxList.Add(new MessageGroup() { MessageGroupName = Properties.Resources.text1Voyage, MessageGroupControlType = typeof(VoyageControl), ImagePath = "Resources/ship2.png" });
}
this.listBoxMessages.ItemsSource = this._listBoxList;

View File

@ -140,26 +140,26 @@
<Reference Include="log4net, Version=3.0.3.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>packages\log4net.3.0.3\lib\net462\log4net.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Bcl.AsyncInterfaces.9.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=9.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Bcl.AsyncInterfaces.9.0.1\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Extensions.DependencyInjection.9.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.dll</HintPath>
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=9.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Extensions.DependencyInjection.9.0.1\lib\net462\Microsoft.Extensions.DependencyInjection.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Extensions.DependencyInjection.Abstractions.9.0.0\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=9.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Extensions.DependencyInjection.Abstractions.9.0.1\lib\net462\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Logging, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Extensions.Logging.9.0.0\lib\net462\Microsoft.Extensions.Logging.dll</HintPath>
<Reference Include="Microsoft.Extensions.Logging, Version=9.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Extensions.Logging.9.0.1\lib\net462\Microsoft.Extensions.Logging.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Extensions.Logging.Abstractions.9.0.0\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=9.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Extensions.Logging.Abstractions.9.0.1\lib\net462\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Options, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Extensions.Options.9.0.0\lib\net462\Microsoft.Extensions.Options.dll</HintPath>
<Reference Include="Microsoft.Extensions.Options, Version=9.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Extensions.Options.9.0.1\lib\net462\Microsoft.Extensions.Options.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Extensions.Primitives, Version=9.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Extensions.Primitives.9.0.0\lib\net462\Microsoft.Extensions.Primitives.dll</HintPath>
<Reference Include="Microsoft.Extensions.Primitives, Version=9.0.0.1, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Extensions.Primitives.9.0.1\lib\net462\Microsoft.Extensions.Primitives.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<HintPath>packages\Microsoft.Office.Interop.Excel.15.0.4795.1001\lib\net20\Microsoft.Office.Interop.Excel.dll</HintPath>
@ -202,8 +202,8 @@
<Reference Include="System.Data.SQLite, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\lib\net46\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Diagnostics.DiagnosticSource, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Diagnostics.DiagnosticSource.9.0.0\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
<Reference Include="System.Diagnostics.DiagnosticSource, Version=9.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Diagnostics.DiagnosticSource.9.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
@ -493,6 +493,9 @@
<DesignTime>True</DesignTime>
<DependentUpon>Reference.svcmap</DependentUpon>
</Compile>
<Compile Include="SheetDisplayControls\VoyageControl.xaml.cs">
<DependentUpon>VoyageControl.xaml</DependentUpon>
</Compile>
<Compile Include="SplashScreenWindow.xaml.cs">
<DependentUpon>SplashScreenWindow.xaml</DependentUpon>
</Compile>
@ -802,6 +805,10 @@
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="SheetDisplayControls\VoyageControl.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SplashScreenWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>

View File

@ -8,7 +8,7 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:p="clr-namespace:ENI2.Properties"
mc:Ignorable="d"
Title="{x:Static p:Resources.textReportingParty}" Height="350" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue">
Title="{x:Static p:Resources.textReportingParty}" Height="378" Width="800" WindowStyle="SingleBorderWindow" Background="AliceBlue">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="28" />
@ -21,6 +21,7 @@
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*" />
@ -46,9 +47,10 @@
<Label Name="labelUserEMail" Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textEMail}" HorizontalContentAlignment="Right" />
<Label Name="labelAdmin" Grid.Row="7" Grid.Column="2" Content="{x:Static p:Resources.textAdministrator}" HorizontalContentAlignment="Right" />
<Label Name="labelArchived" Grid.Row="8" Grid.Column="0" Content="{x:Static p:Resources.textArchived}" HorizontalContentAlignment="Right" />
<Label Name="labelCreated" Grid.Row="9" Grid.Column="0" Content="{x:Static p:Resources.textCreated}" HorizontalContentAlignment="Right" />
<Label Name="labelChanged" Grid.Row="9" Grid.Column="2" Content="{x:Static p:Resources.textChanged}" HorizontalContentAlignment="Right" />
<Label Name="labelEditor" Grid.Row="8" Grid.Column="2" Content="{x:Static p:Resources.textEditor}" HorizontalContentAlignment="Right" />
<Label Name="labelDefaultDisplay" Grid.Row="9" Grid.Column="0" Content="{x:Static p:Resources.textDefaultDisplay}" HorizontalContentAlignment="Right" />
<Label Name="labelCreated" Grid.Row="10" Grid.Column="0" Content="{x:Static p:Resources.textCreated}" HorizontalContentAlignment="Right" />
<Label Name="labelChanged" Grid.Row="10" Grid.Column="2" Content="{x:Static p:Resources.textChanged}" HorizontalContentAlignment="Right" />
<TextBox Grid.Row="0" Grid.Column="1" Width="auto" Name="textBoxName" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
<TextBox Grid.Row="0" Grid.Column="3" Width="auto" Name="textBoxEMail" Margin="2" MaxLength="100" VerticalContentAlignment="Center" />
@ -67,9 +69,9 @@
<CheckBox Grid.Row="7" Grid.Column="3" VerticalAlignment="Center" Name="checkBoxAdministrator" Margin="2" />
<CheckBox Grid.Row="8" Grid.Column="3" VerticalAlignment="Center" Name="checkBoxEditor" Margin="2" />
<CheckBox Grid.Row="8" Grid.Column="1" VerticalAlignment="Center" Name="checkBoxArchived" Margin="2" />
<Label Grid.Row="9" Grid.Column="1" Name="dateTimePickerCreated" FontStyle="Italic" />
<Label Grid.Row="9" Grid.Column="3" Name="dateTimePickerChanged" FontStyle="Italic" />
<ComboBox x:Name="comboBoxDefaultDisplay" Grid.Column="1" Grid.Row="9" Margin="2" SelectedValuePath="Key" DisplayMemberPath="Value" />
<Label Grid.Row="10" Grid.Column="1" Name="dateTimePickerCreated" FontStyle="Italic" />
<Label Grid.Row="10" Grid.Column="3" Name="dateTimePickerChanged" FontStyle="Italic" />
</Grid>
</enictrl:EditWindowBase>

View File

@ -2,6 +2,7 @@
// Description: Reporting party Bearbeitungsdialog
//
using System;
using System.Windows;
using bsmd.database;
@ -24,6 +25,7 @@ namespace ENI2.EditControls
private void EditReportingPartyDialog_Loaded(object sender, RoutedEventArgs e)
{
this.comboBoxDefaultDisplay.ItemsSource = Util.EnumHelper.GetAllValuesAndDescription(typeof(ReportingParty.ShipcallDisplayModeEnum));
this.textBoxCity.Text = this.ReportingParty.City;
this.textBoxCountry.Text = this.ReportingParty.Country;
this.textBoxEMail.Text = this.ReportingParty.EMail;
@ -40,6 +42,7 @@ namespace ENI2.EditControls
this.checkBoxAdministrator.IsChecked = this.ReportingParty.IsAdmin;
this.checkBoxArchived.IsChecked = this.ReportingParty.IsArchived;
this.checkBoxEditor.IsChecked = this.ReportingParty.IsEditor;
this.comboBoxDefaultDisplay.SelectedValue = this.ReportingParty.ShipcallDisplayMode;
this.dateTimePickerChanged.Content = this.ReportingParty.Changed.HasValue ? this.ReportingParty.Changed.ToString() : "";
this.dateTimePickerCreated.Content = this.ReportingParty.Created.HasValue ? this.ReportingParty.Created.ToString() : "";
@ -62,6 +65,7 @@ namespace ENI2.EditControls
this.ReportingParty.StreetAndNumber = this.textBoxStreetNumber.Text.Trim();
this.ReportingParty.UserEMail = this.textBoxUserEMail.Text.Trim();
this.ReportingParty.Logon = this.textBoxUserLogon.Text.Trim();
this.ReportingParty.ShipcallDisplayMode = (ReportingParty.ShipcallDisplayModeEnum) Enum.Parse(typeof(ReportingParty.ShipcallDisplayModeEnum), (string) this.comboBoxDefaultDisplay.SelectedValue);
if(!this.passwordBoxPassword.Password.IsNullOrEmpty())
{

View File

@ -79,7 +79,7 @@ namespace ENI2
#region Search related event handler
private void AnmeldungenControl_MessageCoreSelected(MessageCore aMessageCore)
private void AnmeldungenControl_MessageCoreSelected(MessageCore aMessageCore, ReportingParty.ShipcallDisplayModeEnum displayMode = ReportingParty.ShipcallDisplayModeEnum.CLASSIC)
{
if(aMessageCore != null)
{
@ -120,7 +120,7 @@ namespace ENI2
iDidLockIt);
searchResultItem.IsCancelled = aMessageCore.Cancelled ?? false;
DetailRootControl drc = new DetailRootControl(aMessageCore);
DetailRootControl drc = new DetailRootControl(aMessageCore, displayMode);
drc.LockedByOtherUser = !iDidLockIt;
if (!(aMessageCore.Cancelled ?? false))

View File

@ -830,6 +830,114 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to 1.10 Maritime health data.
/// </summary>
public static string text110MaritimeHealthData {
get {
return ResourceManager.GetString("text110MaritimeHealthData", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 1.11 Port of itinerary.
/// </summary>
public static string text111PortOfItinerary {
get {
return ResourceManager.GetString("text111PortOfItinerary", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 1.1 Previous port.
/// </summary>
public static string text11PreviousPort {
get {
return ResourceManager.GetString("text11PreviousPort", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 1.2 Incoming voyage.
/// </summary>
public static string text12IncomingVoyage {
get {
return ResourceManager.GetString("text12IncomingVoyage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 1.3 Relevant Portcall (port of call) / Kiel-Canal-Transit.
/// </summary>
public static string text13RelevantPortcall {
get {
return ResourceManager.GetString("text13RelevantPortcall", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 1.4 Outgoing voyage.
/// </summary>
public static string text14OutgoingVoyage {
get {
return ResourceManager.GetString("text14OutgoingVoyage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 1.5 Next port.
/// </summary>
public static string text15NextPort {
get {
return ResourceManager.GetString("text15NextPort", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 1.5 Voyage.
/// </summary>
public static string text16Voyage {
get {
return ResourceManager.GetString("text16Voyage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 1.7 Last 10 port facilities called.
/// </summary>
public static string text17Last10PortFacilitiesCalled {
get {
return ResourceManager.GetString("text17Last10PortFacilitiesCalled", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 1.8 Ship to ship activities during last 10 port facilities called.
/// </summary>
public static string text18ShipToShip {
get {
return ResourceManager.GetString("text18ShipToShip", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 1.9 Ports called during the last 30 days.
/// </summary>
public static string text19PortsCalled30days {
get {
return ResourceManager.GetString("text19PortsCalled30days", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 1. Voyage.
/// </summary>
public static string text1Voyage {
get {
return ResourceManager.GetString("text1Voyage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to About ENI-2.
/// </summary>
@ -2000,6 +2108,15 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Default display.
/// </summary>
public static string textDefaultDisplay {
get {
return ResourceManager.GetString("textDefaultDisplay", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to _Delete.
/// </summary>
@ -3620,6 +3737,24 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Open in classic display mode.
/// </summary>
public static string textOpenClassic {
get {
return ResourceManager.GetString("textOpenClassic", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Open in form sheet display mode.
/// </summary>
public static string textOpenFormsheet {
get {
return ResourceManager.GetString("textOpenFormsheet", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Operations.
/// </summary>
@ -5303,6 +5438,15 @@ namespace ENI2.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Voyage.
/// </summary>
public static string textVoyage {
get {
return ResourceManager.GetString("textVoyage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Waiting for Id...
/// </summary>

View File

@ -1912,4 +1912,52 @@
<data name="textConfimDeleteAllEntries" xml:space="preserve">
<value>This will delete all entries. Are you sure?</value>
</data>
<data name="textVoyage" xml:space="preserve">
<value>Voyage</value>
</data>
<data name="text11PreviousPort" xml:space="preserve">
<value>1.1 Previous port</value>
</data>
<data name="text12IncomingVoyage" xml:space="preserve">
<value>1.2 Incoming voyage</value>
</data>
<data name="text13RelevantPortcall" xml:space="preserve">
<value>1.3 Relevant Portcall (port of call) / Kiel-Canal-Transit</value>
</data>
<data name="text14OutgoingVoyage" xml:space="preserve">
<value>1.4 Outgoing voyage</value>
</data>
<data name="text15NextPort" xml:space="preserve">
<value>1.5 Next port</value>
</data>
<data name="text16Voyage" xml:space="preserve">
<value>1.5 Voyage</value>
</data>
<data name="text17Last10PortFacilitiesCalled" xml:space="preserve">
<value>1.7 Last 10 port facilities called</value>
</data>
<data name="text18ShipToShip" xml:space="preserve">
<value>1.8 Ship to ship activities during last 10 port facilities called</value>
</data>
<data name="text19PortsCalled30days" xml:space="preserve">
<value>1.9 Ports called during the last 30 days</value>
</data>
<data name="text110MaritimeHealthData" xml:space="preserve">
<value>1.10 Maritime health data</value>
</data>
<data name="text111PortOfItinerary" xml:space="preserve">
<value>1.11 Port of itinerary</value>
</data>
<data name="textDefaultDisplay" xml:space="preserve">
<value>Default display</value>
</data>
<data name="textOpenClassic" xml:space="preserve">
<value>Open in classic display mode</value>
</data>
<data name="textOpenFormsheet" xml:space="preserve">
<value>Open in form sheet display mode</value>
</data>
<data name="text1Voyage" xml:space="preserve">
<value>1. Voyage</value>
</data>
</root>

View File

@ -0,0 +1,85 @@
<src:DetailBaseControl xmlns:src="clr-namespace:ENI2"
x:Class="ENI2.SheetDisplayControls.VoyageControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:p="clr-namespace:ENI2.Properties"
xmlns:enictrl="clr-namespace:ENI2.Controls"
xmlns:util="clr-namespace:ENI2.Util"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:local="clr-namespace:ENI2.SheetDisplayControls"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<GroupBox Name="arrivalNotificationGroupBox" Header="{x:Static p:Resources.textVoyage}">
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width=".25*"/>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="56" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="56" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="56" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="56" /><!--row15-->
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="56" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
<RowDefinition Height="56" />
<RowDefinition Height="28" />
<RowDefinition Height="28" />
</Grid.RowDefinitions>
<TextBlock FontSize="18" VerticalAlignment="Bottom" Text="{x:Static p:Resources.text11PreviousPort}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"/>
<TextBlock FontSize="18" VerticalAlignment="Bottom" Text="{x:Static p:Resources.text12IncomingVoyage}" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="2"/>
<TextBlock FontSize="18" VerticalAlignment="Bottom" Text="{x:Static p:Resources.text13RelevantPortcall}" Grid.Column="0" Grid.Row="8" Grid.ColumnSpan="2"/>
<TextBlock FontSize="18" VerticalAlignment="Bottom" Text="{x:Static p:Resources.text14OutgoingVoyage}" Grid.Column="0" Grid.Row="15" Grid.ColumnSpan="2"/>
<TextBlock FontSize="18" VerticalAlignment="Bottom" Text="{x:Static p:Resources.text15NextPort}" Grid.Column="0" Grid.Row="19" Grid.ColumnSpan="2"/>
<TextBlock FontSize="18" VerticalAlignment="Bottom" Text="{x:Static p:Resources.text16Voyage}" Grid.Column="0" Grid.Row="23" Grid.ColumnSpan="2"/>
<TextBlock FontSize="18" VerticalAlignment="Bottom" Text="{x:Static p:Resources.text11PreviousPort}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"/>
<TextBlock FontSize="18" VerticalAlignment="Bottom" Text="{x:Static p:Resources.text11PreviousPort}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"/>
<TextBlock FontSize="18" VerticalAlignment="Bottom" Text="{x:Static p:Resources.text11PreviousPort}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"/>
<TextBlock FontSize="18" VerticalAlignment="Bottom" Text="{x:Static p:Resources.text11PreviousPort}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"/>
<TextBlock FontSize="18" VerticalAlignment="Bottom" Text="{x:Static p:Resources.text11PreviousPort}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"/>
</Grid>
</ScrollViewer>
</GroupBox>
</src:DetailBaseControl>

View File

@ -0,0 +1,39 @@
// Copyright (c) 2025 - schick Informatik
// Description:
//
using System.Windows;
using bsmd.database;
using ENI2.EditControls;
using System.Windows.Media;
using System.Windows.Controls;
using System.Windows.Media.Imaging;
using System;
namespace ENI2.SheetDisplayControls
{
/// <summary>
/// Interaction logic for VoyageControl.xaml
/// </summary>
public partial class VoyageControl : DetailBaseControl
{
public VoyageControl()
{
InitializeComponent();
}
#region mouse wheel
private void ScrollViewer_PreviewMouseWheel(object sender, System.Windows.Input.MouseWheelEventArgs e)
{
ScrollViewer scv = (ScrollViewer)sender;
scv.ScrollToVerticalOffset(scv.VerticalOffset - e.Delta);
e.Handled = true;
}
#endregion
}
}

View File

@ -72,6 +72,18 @@ namespace ENI2
cancelItem.Visibility = Visibility.Collapsed;
this.dataGrid.ContextMenu.Items.Add(cancelItem);
this.dataGrid.ContextMenu.Items.Add(new Separator());
MenuItem classicOpen = new MenuItem();
classicOpen.Header = Properties.Resources.textOpenClassic;
classicOpen.Click += ClassicOpen_Click;
this.dataGrid.ContextMenu.Items.Add(classicOpen);
MenuItem formOpen = new MenuItem();
formOpen.Header = Properties.Resources.textOpenFormsheet;
formOpen.Click += FormOpen_Click;
this.dataGrid.ContextMenu.Items.Add(formOpen);
if (Keyboard.IsKeyDown(Key.LeftShift))
{
efMode = true;
@ -79,8 +91,6 @@ namespace ENI2
}
}
#endregion
public event MessageCore.MessageCoreSelectedHandler MessageCoreSelected;
@ -256,20 +266,20 @@ namespace ENI2
#region Selection event handling
private void DisplayCore(MessageCore core)
private void DisplayCore(MessageCore core, ReportingParty.ShipcallDisplayModeEnum displayMode)
{
if (core != null)
{
this.OnMessageCoreSelected(core);
this.OnMessageCoreSelected(core, displayMode);
}
}
protected void OnMessageCoreSelected(MessageCore aMessageCore)
protected void OnMessageCoreSelected(MessageCore aMessageCore, ReportingParty.ShipcallDisplayModeEnum displayMode)
{
if ((this.MessageCoreSelected != null) && (aMessageCore != null))
{
Util.UIHelper.SetBusyState();
this.MessageCoreSelected(aMessageCore);
this.MessageCoreSelected(aMessageCore, displayMode);
}
}
@ -282,7 +292,7 @@ namespace ENI2
{
// DataGridRow dgr = grid.ItemContainerGenerator.ContainerFromItem(grid.SelectedItem) as DataGridRow;
MessageCore selectedCore = grid.SelectedItem as MessageCore;
this.DisplayCore(selectedCore);
this.DisplayCore(selectedCore, DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].ShipcallDisplayMode);
}
}
}
@ -292,7 +302,7 @@ namespace ENI2
if ((e.Key == Key.Return) || (e.Key == Key.Enter))
{
MessageCore selectedCore = dataGrid.SelectedItem as MessageCore;
this.DisplayCore(selectedCore);
this.DisplayCore(selectedCore, DBManager.Instance.GetReportingPartyDict()[App.UserId.Value].ShipcallDisplayMode);
}
else
{
@ -330,6 +340,24 @@ namespace ENI2
}
}
private void FormOpen_Click(object sender, RoutedEventArgs e)
{
if (this.dataGrid.SelectedItems?.Count == 1)
{
MessageCore selectedCore = this.dataGrid.SelectedItem as MessageCore;
this.DisplayCore(selectedCore, ReportingParty.ShipcallDisplayModeEnum.FORMSHEET);
}
}
private void ClassicOpen_Click(object sender, RoutedEventArgs e)
{
if (this.dataGrid.SelectedItems?.Count == 1)
{
MessageCore selectedCore = this.dataGrid.SelectedItem as MessageCore;
this.DisplayCore(selectedCore, ReportingParty.ShipcallDisplayModeEnum.CLASSIC);
}
}
#endregion
private void logoImage_MouseUp(object sender, MouseButtonEventArgs e)

View File

@ -6,19 +6,19 @@ Sample license text.
<package id="ExcelDataReader" version="3.7.0" targetFramework="net48" />
<package id="Extended.Wpf.Toolkit" version="4.6.1" targetFramework="net48" />
<package id="log4net" version="3.0.3" targetFramework="net48" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="9.0.0" targetFramework="net48" />
<package id="Microsoft.Extensions.DependencyInjection" version="9.0.0" targetFramework="net48" />
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="9.0.0" targetFramework="net48" />
<package id="Microsoft.Extensions.Logging" version="9.0.0" targetFramework="net48" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="9.0.0" targetFramework="net48" />
<package id="Microsoft.Extensions.Options" version="9.0.0" targetFramework="net48" />
<package id="Microsoft.Extensions.Primitives" version="9.0.0" targetFramework="net48" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="9.0.1" targetFramework="net48" />
<package id="Microsoft.Extensions.DependencyInjection" version="9.0.1" targetFramework="net48" />
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="9.0.1" targetFramework="net48" />
<package id="Microsoft.Extensions.Logging" version="9.0.1" targetFramework="net48" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="9.0.1" targetFramework="net48" />
<package id="Microsoft.Extensions.Options" version="9.0.1" targetFramework="net48" />
<package id="Microsoft.Extensions.Primitives" version="9.0.1" targetFramework="net48" />
<package id="Microsoft.Office.Interop.Excel" version="15.0.4795.1001" targetFramework="net48" />
<package id="PDFsharp-MigraDoc-GDI" version="6.1.1" targetFramework="net48" />
<package id="Stub.System.Data.SQLite.Core.NetFramework" version="1.0.119.0" targetFramework="net48" />
<package id="System.Buffers" version="4.6.0" targetFramework="net48" />
<package id="System.Data.SQLite.Core" version="1.0.119.0" targetFramework="net48" />
<package id="System.Diagnostics.DiagnosticSource" version="9.0.0" targetFramework="net48" />
<package id="System.Diagnostics.DiagnosticSource" version="9.0.1" targetFramework="net48" />
<package id="System.Memory" version="4.6.0" targetFramework="net48" />
<package id="System.Numerics.Vectors" version="4.6.0" targetFramework="net48" />
<package id="System.Runtime.CompilerServices.Unsafe" version="6.1.0" targetFramework="net48" />

View File

@ -46,8 +46,8 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="log4net, Version=3.0.1.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\ENI2\packages\log4net.3.0.1\lib\net462\log4net.dll</HintPath>
<Reference Include="log4net, Version=3.0.3.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
<HintPath>..\ENI2\packages\log4net.3.0.3\lib\net462\log4net.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data.DataSetExtensions" />

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<UseIISExpress>true</UseIISExpress>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="log4net" version="3.0.1" targetFramework="net48" />
<package id="log4net" version="3.0.3" targetFramework="net48" />
</packages>

View File

@ -31,7 +31,7 @@ namespace bsmd.database
#region selection delegate definition
public delegate void MessageCoreSelectedHandler(MessageCore aMessageCore);
public delegate void MessageCoreSelectedHandler(MessageCore aMessageCore, ReportingParty.ShipcallDisplayModeEnum displayMode = ReportingParty.ShipcallDisplayModeEnum.CLASSIC);
#endregion

View File

@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.Data.SqlClient;
using System.Text;
using System.Security.Cryptography;
using System.ComponentModel;
namespace bsmd.database
{
@ -24,6 +25,14 @@ namespace bsmd.database
public enum ReportingPartyTypeEnum
{ MASTER, SHIPOWNER, CHARTERER, AGENT, PORT_AUTHORITY, CARRIER, OTHERS }
public enum ShipcallDisplayModeEnum
{
[Description("Classic display")]
CLASSIC,
[Description("New formsheet display")]
FORMSHEET
}
[Flags]
internal enum UserFlags : int
{
@ -46,7 +55,11 @@ namespace bsmd.database
/// <summary>
/// kann bestimmte Dinge (e.g. templates) im ENI bearbeiten
/// </summary>
EDITOR = 8
EDITOR = 8,
/// <summary>
/// Beim Klick auf einen Anlauf soll sich per default die "neue" Formansicht öffnen
/// </summary>
DEFAULTFORMVIEW = 16
};
#endregion
@ -166,6 +179,19 @@ namespace bsmd.database
set { this.SetUserFlag(value, UserFlags.EDITOR); }
}
public ShipcallDisplayModeEnum ShipcallDisplayMode
{
get
{
if ((this.Flags & (int)UserFlags.DEFAULTFORMVIEW) != 0) return ShipcallDisplayModeEnum.FORMSHEET;
else return ShipcallDisplayModeEnum.CLASSIC;
}
set
{
this.SetUserFlag(value != ShipcallDisplayModeEnum.CLASSIC, UserFlags.DEFAULTFORMVIEW);
}
}
#endregion
#endregion