diff --git a/misc/version.txt b/misc/version.txt
index 25be1b0..600d680 100644
--- a/misc/version.txt
+++ b/misc/version.txt
@@ -1 +1 @@
-1.1.0.0
\ No newline at end of file
+1.1.1.0
\ No newline at end of file
diff --git a/src/BreCalClient/App.config b/src/BreCalClient/App.config
index c86f39a..97e0e29 100644
--- a/src/BreCalClient/App.config
+++ b/src/BreCalClient/App.config
@@ -10,9 +10,6 @@
-
- https://brecaldevel.bsmd-emswe.eu
-
#1D751F
@@ -22,6 +19,9 @@
https://www.textbausteine.net/
+
+ https://brecaldevel.bsmd-emswe.eu
+
@@ -29,6 +29,54 @@
+
+ 800
+
+
+ 450
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
\ No newline at end of file
diff --git a/src/BreCalClient/App.xaml b/src/BreCalClient/App.xaml
index 6702ce6..e74dc10 100644
--- a/src/BreCalClient/App.xaml
+++ b/src/BreCalClient/App.xaml
@@ -2,7 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:BreCalClient"
- StartupUri="MainWindow.xaml">
+ StartupUri="MainWindow.xaml" Exit="Application_Exit">
diff --git a/src/BreCalClient/App.xaml.cs b/src/BreCalClient/App.xaml.cs
index 6c98fd5..191a183 100644
--- a/src/BreCalClient/App.xaml.cs
+++ b/src/BreCalClient/App.xaml.cs
@@ -9,5 +9,10 @@ namespace BreCalClient
public partial class App : Application
{
public static Participant Participant { get; set; } = new Participant();
+
+ private void Application_Exit(object sender, ExitEventArgs e)
+ {
+ BreCalClient.Properties.Settings.Default.Save();
+ }
}
}
diff --git a/src/BreCalClient/BreCalClient.csproj b/src/BreCalClient/BreCalClient.csproj
index 3ebb158..3d05079 100644
--- a/src/BreCalClient/BreCalClient.csproj
+++ b/src/BreCalClient/BreCalClient.csproj
@@ -8,8 +8,8 @@
True
BreCalClient.App
..\..\misc\brecal.snk
- 1.1.0.0
- 1.1.0.0
+ 1.1.1.0
+ 1.1.1.0
Bremen calling client
A Windows WPF client for the Bremen calling API.
containership.ico
diff --git a/src/BreCalClient/BreCalLists.cs b/src/BreCalClient/BreCalLists.cs
index 39746cd..3857e90 100644
--- a/src/BreCalClient/BreCalLists.cs
+++ b/src/BreCalClient/BreCalLists.cs
@@ -23,10 +23,10 @@ namespace BreCalClient
private static readonly List _berths = new();
private static List _allBerths = new();
private static List _participants = new();
- private static readonly List _ships = new();
- private static List _allShips = new();
+ private static readonly List _ships = new();
+ private static readonly List _allShips = new();
- private readonly static ConcurrentDictionary _shipLookupDict = new();
+ private readonly static ConcurrentDictionary _shipLookupDict = new();
private readonly static ConcurrentDictionary _berthLookupDict = new();
private readonly static Dictionary _participantLookupDict = new();
@@ -34,7 +34,7 @@ namespace BreCalClient
#region Properties
- public static ConcurrentDictionary ShipLookupDict { get { return _shipLookupDict; } }
+ public static ConcurrentDictionary ShipLookupDict { get { return _shipLookupDict; } }
public static ConcurrentDictionary BerthLookupDict { get { return _berthLookupDict; } }
@@ -76,19 +76,19 @@ namespace BreCalClient
public static List Berths { get { return _berths; } }
///
- /// All active berths
+ /// All berths including deleted berths
///
public static List AllBerths { get { return _allBerths; } }
///
/// All active ships
///
- public static List Ships { get { return _ships; } }
+ public static List Ships { get { return _ships; } }
///
- /// All active berths
+ /// All ships including deleted ships
///
- public static List AllShips { get { return _allShips; } }
+ public static List AllShips { get { return _allShips; } }
#endregion
@@ -130,11 +130,12 @@ namespace BreCalClient
{
foreach (var ship in ships)
{
- _shipLookupDict[ship.Id] = ship;
+ ShipModel sm = new ShipModel(ship);
+ _shipLookupDict[ship.Id] = sm;
if (!ship.Deleted)
- _ships.Add(ship);
- }
- _allShips = ships;
+ _ships.Add(sm);
+ _allShips.Add(sm);
+ }
}
#endregion
diff --git a/src/BreCalClient/EditShipcallControl.xaml b/src/BreCalClient/EditShipcallControl.xaml
index 7be23c1..6acfa9b 100644
--- a/src/BreCalClient/EditShipcallControl.xaml
+++ b/src/BreCalClient/EditShipcallControl.xaml
@@ -7,7 +7,7 @@
xmlns:p = "clr-namespace:BreCalClient.Resources"
xmlns:db="clr-namespace:BreCalClient;assembly=BreCalClient"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- mc:Ignorable="d"
+ mc:Ignorable="d" Left="{local:SettingBinding W1Left}" Top="{local:SettingBinding W1Top}"
Title="{x:Static p:Resources.textEditShipcall}" Height="242" Width="800" Loaded="Window_Loaded" ResizeMode="NoResize" Icon="Resources/containership.ico">
@@ -30,22 +30,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/src/BreCalClient/EditShipcallControl.xaml.cs b/src/BreCalClient/EditShipcallControl.xaml.cs
index e156bb1..9032c1a 100644
--- a/src/BreCalClient/EditShipcallControl.xaml.cs
+++ b/src/BreCalClient/EditShipcallControl.xaml.cs
@@ -67,11 +67,11 @@ namespace BreCalClient
{
if (this.comboBoxShip.SelectedItem != null)
{
- Ship? ship = this.comboBoxShip.SelectedItem as Ship;
- this.integerUpDownIMO.Value = ship?.Imo;
- this.textBoxCallsign.Text = ship?.Callsign;
- this.doubleUpDownLength.Value = ship?.Length;
- this.doubleUpDownWidth.Value = ship?.Width;
+ ShipModel? ship = this.comboBoxShip.SelectedItem as ShipModel;
+ this.integerUpDownIMO.Value = ship?.Ship.Imo;
+ this.textBoxCallsign.Text = ship?.Ship.Callsign;
+ this.doubleUpDownLength.Value = ship?.Ship.Length;
+ this.doubleUpDownWidth.Value = ship?.Ship.Width;
}
else
{
@@ -182,8 +182,8 @@ namespace BreCalClient
this.ShipcallModel.Shipcall.Eta = this.datePickerETA.Value;
this.ShipcallModel.Shipcall.Etd = this.datePickerETD.Value;
- this.ShipcallModel.Shipcall.ShipId = ((Ship)this.comboBoxShip.SelectedItem).Id;
- this.ShipcallModel.Ship = (Ship)this.comboBoxShip.SelectedItem;
+ this.ShipcallModel.Shipcall.ShipId = ((ShipModel)this.comboBoxShip.SelectedItem).Ship.Id;
+ this.ShipcallModel.Ship = ((ShipModel)this.comboBoxShip.SelectedItem).Ship;
this.ShipcallModel.Shipcall.Canceled = this.checkBoxCancelled.IsChecked;
if (this.ShipcallModel.Shipcall.Type != 3) // incoming, outgoing
diff --git a/src/BreCalClient/EditTimesAgencyIncomingControl.xaml b/src/BreCalClient/EditTimesAgencyIncomingControl.xaml
index 5210450..c990144 100644
--- a/src/BreCalClient/EditTimesAgencyIncomingControl.xaml
+++ b/src/BreCalClient/EditTimesAgencyIncomingControl.xaml
@@ -7,7 +7,7 @@
xmlns:p = "clr-namespace:BreCalClient.Resources"
xmlns:db="clr-namespace:BreCalClient;assembly=BreCalClient"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- mc:Ignorable="d"
+ mc:Ignorable="d" Left="{local:SettingBinding W2Left}" Top="{local:SettingBinding W2Top}"
Title="{x:Static p:Resources.textEditShipcall}" Height="403" Width="800" Loaded="Window_Loaded" ResizeMode="NoResize" Icon="Resources/containership.ico">
@@ -43,25 +43,21 @@
-
+
-
+
-
-
-
-
-
+
-
-
+
+
-
+
diff --git a/src/BreCalClient/EditTimesAgencyOutgoingControl.xaml b/src/BreCalClient/EditTimesAgencyOutgoingControl.xaml
index 1cedbe8..7984ace 100644
--- a/src/BreCalClient/EditTimesAgencyOutgoingControl.xaml
+++ b/src/BreCalClient/EditTimesAgencyOutgoingControl.xaml
@@ -7,7 +7,7 @@
xmlns:p = "clr-namespace:BreCalClient.Resources"
xmlns:db="clr-namespace:BreCalClient;assembly=BreCalClient"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- mc:Ignorable="d"
+ mc:Ignorable="d" Left="{local:SettingBinding W3Left}" Top="{local:SettingBinding W3Top}"
Title="{x:Static p:Resources.textEditShipcall}" Height="375" Width="800" Loaded="Window_Loaded" ResizeMode="NoResize" Icon="Resources/containership.ico">
@@ -39,25 +39,20 @@
-
+
-
+
-
-
-
-
-
-
-
+
+
-
+
diff --git a/src/BreCalClient/EditTimesAgencyShiftingControl.xaml b/src/BreCalClient/EditTimesAgencyShiftingControl.xaml
index 24c64a8..01e76f2 100644
--- a/src/BreCalClient/EditTimesAgencyShiftingControl.xaml
+++ b/src/BreCalClient/EditTimesAgencyShiftingControl.xaml
@@ -7,7 +7,7 @@
xmlns:p = "clr-namespace:BreCalClient.Resources"
xmlns:db="clr-namespace:BreCalClient;assembly=BreCalClient"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- mc:Ignorable="d"
+ mc:Ignorable="d" Left="{local:SettingBinding W4Left}" Top="{local:SettingBinding W4Top}"
Title="{x:Static p:Resources.textEditShipcall}" Height="490" Width="800" Loaded="Window_Loaded" ResizeMode="NoResize" Icon="Resources/containership.ico">
@@ -44,7 +44,7 @@
-
+
@@ -55,18 +55,13 @@
-
-
+
+
-
-
-
-
-
-
+
@@ -80,21 +75,16 @@
-
+
-
+
-
-
-
-
-
-
-
+
+
diff --git a/src/BreCalClient/EditTimesControl.xaml b/src/BreCalClient/EditTimesControl.xaml
index dfb6b31..f4d8724 100644
--- a/src/BreCalClient/EditTimesControl.xaml
+++ b/src/BreCalClient/EditTimesControl.xaml
@@ -7,7 +7,7 @@
xmlns:p = "clr-namespace:BreCalClient.Resources"
xmlns:db="clr-namespace:BreCalClient;assembly=BreCalClient"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
- mc:Ignorable="d"
+ mc:Ignorable="d" Left="{local:SettingBinding W5Left}" Top="{local:SettingBinding W5Top}"
Title="{x:Static p:Resources.textEditTimes}" Height="265" Width="400" Loaded="Window_Loaded" ResizeMode="NoResize" Icon="Resources/containership.ico">
@@ -25,8 +25,8 @@
-
-
+
+
diff --git a/src/BreCalClient/EditTimesControl.xaml.cs b/src/BreCalClient/EditTimesControl.xaml.cs
index 20845f1..7746904 100644
--- a/src/BreCalClient/EditTimesControl.xaml.cs
+++ b/src/BreCalClient/EditTimesControl.xaml.cs
@@ -63,11 +63,6 @@ namespace BreCalClient
this.Times.EtdBerth = this.datePickerETDBerth.Value;
this.Times.LockTime = this.datePickerLockTime.Value;
this.Times.ZoneEntry = this.datePickerZoneEntry.Value;
-
- //this.Times.EtaBerthFixed = this.checkBoxEtaBerthFixed.IsChecked;
- //this.Times.EtdBerthFixed = this.checkBoxEtDBerthFixed.IsChecked;
- //this.Times.LockTimeFixed = this.checkBoxLockTimeFixed.IsChecked;
- //this.Times.ZoneEntryFixed = this.checkBoxZoneEntryFixed.IsChecked;
}
private void CopyToControls()
@@ -77,11 +72,19 @@ namespace BreCalClient
this.datePickerETDBerth.Value = this.Times.EtdBerth;
this.datePickerLockTime.Value = this.Times.LockTime;
this.datePickerZoneEntry.Value = this.Times.ZoneEntry;
-
- //this.checkBoxEtaBerthFixed.IsChecked = this.Times.EtaBerthFixed;
- //this.checkBoxEtDBerthFixed.IsChecked = this.Times.EtdBerthFixed;
- //this.checkBoxLockTimeFixed.IsChecked = this.Times.LockTimeFixed;
- //this.checkBoxZoneEntryFixed.IsChecked = this.Times.ZoneEntryFixed;
+
+ switch (CallType)
+ {
+ case Extensions.TypeEnum.Incoming:
+ this.labelETA.FontWeight = FontWeights.Bold;
+ this.datePickerETABerth.ContextMenu.IsEnabled = false;
+ break;
+ case Extensions.TypeEnum.Outgoing:
+ case Extensions.TypeEnum.Shifting:
+ this.labelETD.FontWeight = FontWeights.Bold;
+ this.datePickerETDBerth.ContextMenu.IsEnabled = false;
+ break;
+ }
}
private void EnableControls()
diff --git a/src/BreCalClient/EditTimesTerminalControl.xaml b/src/BreCalClient/EditTimesTerminalControl.xaml
index 456cd04..81d08f5 100644
--- a/src/BreCalClient/EditTimesTerminalControl.xaml
+++ b/src/BreCalClient/EditTimesTerminalControl.xaml
@@ -6,7 +6,7 @@
xmlns:p = "clr-namespace:BreCalClient.Resources"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:local="clr-namespace:BreCalClient"
- mc:Ignorable="d"
+ mc:Ignorable="d" Left="{local:SettingBinding W6Left}" Top="{local:SettingBinding W6Top}"
Title="{x:Static p:Resources.textEditTimes}" Loaded="Window_Loaded" Height="295" Width="400" >
@@ -24,8 +24,8 @@
-
-
+
+
diff --git a/src/BreCalClient/EditTimesTerminalControl.xaml.cs b/src/BreCalClient/EditTimesTerminalControl.xaml.cs
index 4d9549f..f8c8220 100644
--- a/src/BreCalClient/EditTimesTerminalControl.xaml.cs
+++ b/src/BreCalClient/EditTimesTerminalControl.xaml.cs
@@ -90,6 +90,20 @@ namespace BreCalClient
this.comboBoxBerth.SelectedValue = this.Times.BerthId;
this.textBoxRemarks.Text = this.Times.Remarks;
this.textBoxBerthRemarks.Text = this.Times.BerthInfo;
+
+ switch (CallType)
+ {
+ case Extensions.TypeEnum.Incoming:
+ this.labelStart.FontWeight = FontWeights.Bold;
+ this.datePickerOperationStart.ContextMenu.IsEnabled = false;
+ break;
+ case Extensions.TypeEnum.Outgoing:
+ case Extensions.TypeEnum.Shifting:
+ this.labelEnd.FontWeight = FontWeights.Bold;
+ this.datePickerOperationEnd.ContextMenu.IsEnabled = false;
+ break;
+ }
+
}
private void EnableControls()
diff --git a/src/BreCalClient/MainWindow.xaml b/src/BreCalClient/MainWindow.xaml
index 3d89272..18174af 100644
--- a/src/BreCalClient/MainWindow.xaml
+++ b/src/BreCalClient/MainWindow.xaml
@@ -8,7 +8,8 @@
xmlns:sets="clr-namespace:BreCalClient.Properties"
xmlns:p = "clr-namespace:BreCalClient.Resources"
mc:Ignorable="d"
- Title="{DynamicResource textApplicationTitle}" Height="450" Width="800" Loaded="Window_Loaded" Closing="Window_Closing" Icon="Resources/containership.ico">
+ Title="{DynamicResource textApplicationTitle}" Height="{local:SettingBinding Height}" Width="{local:SettingBinding Width}"
+ Top="{local:SettingBinding Top}" Left="{local:SettingBinding Left}" Loaded="Window_Loaded" Closing="Window_Closing" Icon="Resources/containership.ico">
@@ -26,6 +27,7 @@
+
@@ -39,6 +41,11 @@
+
+ Hinweis:
+ Bei dem derzeitigen System handelt es sich um einen Testbetrieb.
+ Alle angegebenen Daten sind unverbindlich und lösen damit keinerlei Auftrag oder Bestellung aus.Bei Fragen oder Anmerkungen wenden Sie sich gern an bremencalling@bsmd.de.
+
diff --git a/src/BreCalClient/MainWindow.xaml.cs b/src/BreCalClient/MainWindow.xaml.cs
index 3a12737..355c375 100644
--- a/src/BreCalClient/MainWindow.xaml.cs
+++ b/src/BreCalClient/MainWindow.xaml.cs
@@ -107,7 +107,7 @@ namespace BreCalClient
{
if (string.IsNullOrEmpty(this.textPassword.Password) || string.IsNullOrEmpty(this.textUsername.Text))
{
- this.labelLoginResult.Content = Application.Current.FindResource("textUserNamePasswordEmpty").ToString();
+ this.labelLoginResult.Content = BreCalClient.Resources.Resources.textUserNamePasswordEmpty;
return;
}
@@ -428,7 +428,7 @@ namespace BreCalClient
Shipcall shipcall = scm.Shipcall;
if (BreCalLists.ShipLookupDict.ContainsKey(shipcall.ShipId))
- scm.Ship = BreCalLists.ShipLookupDict[shipcall.ShipId];
+ scm.Ship = BreCalLists.ShipLookupDict[shipcall.ShipId].Ship;
if (shipcall.Type == 1)
{
if (BreCalLists.BerthLookupDict.ContainsKey(shipcall.ArrivalBerthId ?? 0))
@@ -461,7 +461,7 @@ namespace BreCalClient
if(scm.Shipcall == null) return;
Shipcall shipcall = scm.Shipcall;
if (BreCalLists.ShipLookupDict.ContainsKey(shipcall.ShipId))
- scm.Ship = BreCalLists.ShipLookupDict[shipcall.ShipId];
+ scm.Ship = BreCalLists.ShipLookupDict[shipcall.ShipId].Ship;
if (shipcall.Type == 1)
{
if (BreCalLists.BerthLookupDict.ContainsKey(shipcall.ArrivalBerthId ?? 0))
@@ -815,8 +815,14 @@ namespace BreCalClient
if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.BSMD))
this.buttonNew.Visibility = Visibility.Visible;
}
+
+ private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
+ {
+ Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri) { UseShellExecute = true });
+ e.Handled = true;
+ }
#endregion
-
+
}
}
diff --git a/src/BreCalClient/Properties/Settings.Designer.cs b/src/BreCalClient/Properties/Settings.Designer.cs
index 8e2d2d1..f965487 100644
--- a/src/BreCalClient/Properties/Settings.Designer.cs
+++ b/src/BreCalClient/Properties/Settings.Designer.cs
@@ -23,15 +23,6 @@ namespace BreCalClient.Properties {
}
}
- [global::System.Configuration.ApplicationScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("https://brecal.bsmd-emswe.eu")]
- public string API_URL {
- get {
- return ((string)(this["API_URL"]));
- }
- }
-
[global::System.Configuration.ApplicationScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("#1D751F")]
@@ -70,5 +61,206 @@ namespace BreCalClient.Properties {
this["FilterCriteria"] = value;
}
}
+
+ [global::System.Configuration.ApplicationScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("https://brecaldevel.bsmd-emswe.eu")]
+ public string API_URL {
+ get {
+ return ((string)(this["API_URL"]));
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("800")]
+ public double Width {
+ get {
+ return ((double)(this["Width"]));
+ }
+ set {
+ this["Width"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("450")]
+ public double Height {
+ get {
+ return ((double)(this["Height"]));
+ }
+ set {
+ this["Height"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
+ public double Left {
+ get {
+ return ((double)(this["Left"]));
+ }
+ set {
+ this["Left"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
+ public double Top {
+ get {
+ return ((double)(this["Top"]));
+ }
+ set {
+ this["Top"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
+ public double W1Left {
+ get {
+ return ((double)(this["W1Left"]));
+ }
+ set {
+ this["W1Left"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
+ public double W1Top {
+ get {
+ return ((double)(this["W1Top"]));
+ }
+ set {
+ this["W1Top"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
+ public double W2Left {
+ get {
+ return ((double)(this["W2Left"]));
+ }
+ set {
+ this["W2Left"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
+ public double W2Top {
+ get {
+ return ((double)(this["W2Top"]));
+ }
+ set {
+ this["W2Top"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
+ public double W3Left {
+ get {
+ return ((double)(this["W3Left"]));
+ }
+ set {
+ this["W3Left"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
+ public double W3Top {
+ get {
+ return ((double)(this["W3Top"]));
+ }
+ set {
+ this["W3Top"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
+ public double W4Left {
+ get {
+ return ((double)(this["W4Left"]));
+ }
+ set {
+ this["W4Left"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
+ public double W4Top {
+ get {
+ return ((double)(this["W4Top"]));
+ }
+ set {
+ this["W4Top"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
+ public double W5Left {
+ get {
+ return ((double)(this["W5Left"]));
+ }
+ set {
+ this["W5Left"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
+ public double W5Top {
+ get {
+ return ((double)(this["W5Top"]));
+ }
+ set {
+ this["W5Top"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
+ public double W6Left {
+ get {
+ return ((double)(this["W6Left"]));
+ }
+ set {
+ this["W6Left"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
+ public double W6Top {
+ get {
+ return ((double)(this["W6Top"]));
+ }
+ set {
+ this["W6Top"] = value;
+ }
+ }
}
}
diff --git a/src/BreCalClient/Properties/Settings.settings b/src/BreCalClient/Properties/Settings.settings
index fdf2294..c5c4c3a 100644
--- a/src/BreCalClient/Properties/Settings.settings
+++ b/src/BreCalClient/Properties/Settings.settings
@@ -2,9 +2,6 @@
-
- https://brecal.bsmd-emswe.eu
-
#1D751F
@@ -17,5 +14,56 @@
+
+ https://brecaldevel.bsmd-emswe.eu
+
+
+ 800
+
+
+ 450
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
+ 0
+
\ No newline at end of file
diff --git a/src/BreCalClient/Resources/Resources.Designer.cs b/src/BreCalClient/Resources/Resources.Designer.cs
index 99a3e26..c42973c 100644
--- a/src/BreCalClient/Resources/Resources.Designer.cs
+++ b/src/BreCalClient/Resources/Resources.Designer.cs
@@ -715,6 +715,15 @@ namespace BreCalClient.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Port.
+ ///
+ public static string textPort {
+ get {
+ return ResourceManager.GetString("textPort", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Rain sensitive cargo.
///
@@ -850,6 +859,15 @@ namespace BreCalClient.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Starboard.
+ ///
+ public static string textStarboard {
+ get {
+ return ResourceManager.GetString("textStarboard", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Terminal.
///
@@ -922,6 +940,15 @@ namespace BreCalClient.Resources {
}
}
+ ///
+ /// Looks up a localized string similar to Username and/or password empty!.
+ ///
+ public static string textUserNamePasswordEmpty {
+ get {
+ return ResourceManager.GetString("textUserNamePasswordEmpty", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Voyage.
///
diff --git a/src/BreCalClient/Resources/Resources.de.resx b/src/BreCalClient/Resources/Resources.de.resx
index b3b04f0..329fceb 100644
--- a/src/BreCalClient/Resources/Resources.de.resx
+++ b/src/BreCalClient/Resources/Resources.de.resx
@@ -418,4 +418,13 @@
Benutzername / Passwort falsch
+
+ Benutzername / Password leer!
+
+
+ Backbord
+
+
+ Steuerbord
+
\ No newline at end of file
diff --git a/src/BreCalClient/Resources/Resources.resx b/src/BreCalClient/Resources/Resources.resx
index 701f0cf..81e3f80 100644
--- a/src/BreCalClient/Resources/Resources.resx
+++ b/src/BreCalClient/Resources/Resources.resx
@@ -331,6 +331,9 @@
Pilot required
+
+ Port
+
Rain sensitive cargo
@@ -376,6 +379,9 @@
Sort order
+
+ Starboard
+
Terminal
@@ -400,6 +406,9 @@
User name
+
+ Username and/or password empty!
+
Voyage
diff --git a/src/BreCalClient/Resources/StringResources.de.xaml b/src/BreCalClient/Resources/StringResources.de.xaml
index 03ed42a..329646c 100644
--- a/src/BreCalClient/Resources/StringResources.de.xaml
+++ b/src/BreCalClient/Resources/StringResources.de.xaml
@@ -5,6 +5,5 @@
Benutzername
Passwort
Anmelden
- Abbrechen
- Benutzername / Password leer!
+ Abbrechen
\ No newline at end of file
diff --git a/src/BreCalClient/Resources/StringResources.xaml b/src/BreCalClient/Resources/StringResources.xaml
index 91d9b0c..f8ee15e 100644
--- a/src/BreCalClient/Resources/StringResources.xaml
+++ b/src/BreCalClient/Resources/StringResources.xaml
@@ -7,5 +7,4 @@
Login
Exit
Bremen calling
- Username and/or password empty!
\ No newline at end of file
diff --git a/src/BreCalClient/SettingBindingExtension.cs b/src/BreCalClient/SettingBindingExtension.cs
new file mode 100644
index 0000000..51af1ee
--- /dev/null
+++ b/src/BreCalClient/SettingBindingExtension.cs
@@ -0,0 +1,30 @@
+// Copyright (c) 2023 schick Informatik
+// Description: Binding extension to allow shorter declaraction of bindings that persist
+// to the application settings
+//
+
+using System.Windows.Data;
+
+namespace BreCalClient
+{
+ public class SettingBindingExtension : Binding
+ {
+
+ public SettingBindingExtension()
+ {
+ Initialize();
+ }
+
+ public SettingBindingExtension(string path) : base(path)
+ {
+ Initialize();
+ }
+
+ private void Initialize()
+ {
+ this.Source = BreCalClient.Properties.Settings.Default;
+ this.Mode = BindingMode.TwoWay;
+ }
+
+ }
+}
diff --git a/src/BreCalClient/ShipModel.cs b/src/BreCalClient/ShipModel.cs
new file mode 100644
index 0000000..64e5330
--- /dev/null
+++ b/src/BreCalClient/ShipModel.cs
@@ -0,0 +1,24 @@
+// Copyright (c) 2023 schick Informatik
+// Description: Helper class to display/search ships
+//
+
+using BreCalClient.misc.Model;
+using System;
+
+namespace BreCalClient
+{
+ public class ShipModel
+ {
+
+ public ShipModel(Ship ship) {
+ this.Ship = ship;
+ }
+
+ public Ship Ship { get; private set; }
+
+ public override string ToString()
+ {
+ return String.Format("{0} ({1})", this.Ship.Name, this.Ship.Imo);
+ }
+ }
+}
diff --git a/src/BreCalClient/ShipcallControl.xaml b/src/BreCalClient/ShipcallControl.xaml
index c3b9155..3aee29c 100644
--- a/src/BreCalClient/ShipcallControl.xaml
+++ b/src/BreCalClient/ShipcallControl.xaml
@@ -46,7 +46,9 @@
+ HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" PreviewMouseUp="Image_PreviewMouseUp">
+
+
@@ -100,7 +102,7 @@
-
+
diff --git a/src/BreCalClient/ShipcallControl.xaml.cs b/src/BreCalClient/ShipcallControl.xaml.cs
index 79cefa9..6ce8681 100644
--- a/src/BreCalClient/ShipcallControl.xaml.cs
+++ b/src/BreCalClient/ShipcallControl.xaml.cs
@@ -131,6 +131,11 @@ namespace BreCalClient
{
this.labelTerminal.FontWeight = FontWeights.Bold;
this.labelTerminal.Foreground = Brushes.LightYellow;
+ }
+ else
+ {
+ this.labelTerminal.FontWeight = FontWeights.Normal;
+ this.labelTerminal.Foreground = Brushes.White;
}
if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.PILOT) && (App.Participant.Id == _pilot?.Id))
@@ -138,6 +143,11 @@ namespace BreCalClient
this.labelPilot.FontWeight = FontWeights.Bold;
this.labelPilot.Foreground = Brushes.LightYellow;
}
+ else
+ {
+ this.labelPilot.FontWeight = FontWeights.Normal;
+ this.labelPilot.Foreground = Brushes.White;
+ }
if ((App.Participant.IsTypeFlagSet(Extensions.ParticipantType.AGENCY) && (App.Participant.Id == _agency?.Id)) ||
(App.Participant.IsTypeFlagSet(Extensions.ParticipantType.BSMD) && (_agency != null) && _agency.IsFlagSet(Extensions.ParticipantFlag.ALLOW_BSMD)))
@@ -145,32 +155,58 @@ namespace BreCalClient
this.labelAgent.FontWeight = FontWeights.Bold;
this.labelAgent.Foreground = Brushes.LightYellow;
}
+ else
+ {
+ this.labelAgent.FontWeight = FontWeights.Normal;
+ this.labelAgent.Foreground = Brushes.White;
+ }
if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.MOORING) && (App.Participant.Id == _mooring?.Id))
{
this.labelMooring.FontWeight = FontWeights.Bold;
this.labelMooring.Foreground = Brushes.LightYellow;
}
+ else
+ {
+ this.labelMooring.FontWeight = FontWeights.Normal;
+ this.labelMooring.Foreground = Brushes.White;
+ }
if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.PORT_ADMINISTRATION) && (App.Participant.Id == _port_administration?.Id))
{
this.labelPortAuthority.FontWeight = FontWeights.Bold;
this.labelPortAuthority.Foreground = Brushes.LightYellow;
}
+ else
+ {
+ this.labelPortAuthority.FontWeight = FontWeights.Normal;
+ this.labelPortAuthority.Foreground = Brushes.White;
+ }
if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.TUG) && (App.Participant.Id == _tug?.Id))
{
this.labelTug.FontWeight = FontWeights.Bold;
this.labelTug.Foreground = Brushes.LightYellow;
}
+ else
+ {
+ this.labelTug.FontWeight = FontWeights.Normal;
+ this.labelTug.Foreground = Brushes.White;
+ }
if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.BSMD))
{
this.labelShipName.FontWeight = FontWeights.Bold;
this.labelShipName.Foreground = Brushes.LightYellow;
}
+ else
+ {
+ this.labelShipName.FontWeight = FontWeights.Normal;
+ this.labelShipName.Foreground = Brushes.White;
+ }
- this.labelShipName.Content = this.ShipcallControlModel?.Ship?.Name;
+ this.textBlockShipName.Text = this.ShipcallControlModel?.Ship?.Name;
+ // this.labelShipName.Content = this.ShipcallControlModel?.Ship?.Name;
switch (this.ShipcallControlModel?.Shipcall?.Type)
{
case 1: // incoming
@@ -201,23 +237,33 @@ namespace BreCalClient
break;
}
- if (this.ShipcallControlModel?.Shipcall?.Evaluation != null)
+ if (this.ShipcallControlModel?.Shipcall?.Canceled ?? false)
{
- ShipcallControlModel.TrafficLightMode resultColor = (ShipcallControlModel.TrafficLightMode) (this.ShipcallControlModel?.Shipcall?.Evaluation ?? 0); // der nullable Operator hier ist so doof, die VS validation blickts einfach nicht
- switch (resultColor)
+ this.Background = Brushes.LightGray;
+ //this.Foreground = Brushes.DarkGray;
+ this.labelShipName.Foreground = Brushes.LightGray;
+ this.textBlockShipName.TextDecorations.Add(TextDecorations.Strikethrough);
+ }
+ else
+ {
+ if (this.ShipcallControlModel?.Shipcall?.Evaluation != null)
{
- //case ShipcallControlModel.TrafficLightMode.GREEN:
- // this.Background = Brushes.LightGreen;
- // break;
- case ShipcallControlModel.TrafficLightMode.YELLOW:
- this.Background= Brushes.LightYellow;
- break;
- case ShipcallControlModel.TrafficLightMode.RED:
- this.Background = new SolidColorBrush(Color.FromArgb(200, 255, 100, 100));
- break;
- default:
- this.Background = Brushes.Transparent;
- break;
+ ShipcallControlModel.TrafficLightMode resultColor = (ShipcallControlModel.TrafficLightMode)(this.ShipcallControlModel?.Shipcall?.Evaluation ?? 0); // der nullable Operator hier ist so doof, die VS validation blickts einfach nicht
+ switch (resultColor)
+ {
+ //case ShipcallControlModel.TrafficLightMode.GREEN:
+ // this.Background = Brushes.LightGreen;
+ // break;
+ case ShipcallControlModel.TrafficLightMode.YELLOW:
+ this.Background = Brushes.LightYellow;
+ break;
+ case ShipcallControlModel.TrafficLightMode.RED:
+ this.Background = new SolidColorBrush(Color.FromArgb(200, 255, 100, 100));
+ break;
+ default:
+ this.Background = Brushes.Transparent;
+ break;
+ }
}
}
@@ -255,8 +301,7 @@ namespace BreCalClient
}
if (this.ShipcallControlModel != null)
- {
-
+ {
Times? agencyTimes = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.AGENCY);
if (agencyTimes != null)
@@ -361,7 +406,7 @@ namespace BreCalClient
this.labelTerminalBerth.Content = "";
this.labelOperationsStart.Content = "";
this.textBlockTerminalRemarks.Text = "";
- this.textBlockAgencyBerthRemarks.Text = "";
+ this.textBlockTerminalBerthRemarks.Text = "";
}
}
diff --git a/src/server/setup.py b/src/server/setup.py
index 9fb028c..97be9cf 100644
--- a/src/server/setup.py
+++ b/src/server/setup.py
@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
setup(
name='BreCal',
- version='1.1.0',
+ version='1.1.1',
packages=find_packages(),
include_package_data=True,
zip_safe=False,