Merge branch 'release/1.3.0'
This commit is contained in:
commit
a2eeacde5a
@ -4842,7 +4842,7 @@ namespace BreCalClient.misc.Client
|
||||
{
|
||||
new Dictionary<string, object> {
|
||||
{"url", "https://brecal.bsmd-emswe.eu"},
|
||||
{"description", "Test server hosted on vcup"},
|
||||
{"description", "Server hosted on vcup"},
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -15,7 +15,7 @@ info:
|
||||
url: 'https://www.bsmd.de/license'
|
||||
servers:
|
||||
- url: 'https://brecal.bsmd-emswe.eu'
|
||||
description: Test server hosted on vcup
|
||||
description: Server hosted on vcup
|
||||
tags:
|
||||
- name: user
|
||||
- name: shipcall
|
||||
|
||||
14
misc/product_codes.txt
Normal file
14
misc/product_codes.txt
Normal file
@ -0,0 +1,14 @@
|
||||
Bremen calling Installer Upgrade Codes:
|
||||
======================================
|
||||
|
||||
Test: 1C7FA3E4-BAB9-4911-9348-73094357FC7C
|
||||
Prod: 81A329F1-C663-48DA-9E15-DAF19F99B5AE
|
||||
|
||||
Product codes v1.2.2.3:
|
||||
|
||||
Test: 6F89CBAA-2189-456F-A347-0C0158325B61
|
||||
Prod: 0ED342DD-DC00-4CE4-8348-96BB3AB726B1
|
||||
|
||||
Note:
|
||||
If you want the MSI to "upgrade" from one version to the other, the
|
||||
upgrade code must stay the same and the product code must change.
|
||||
@ -83,6 +83,9 @@
|
||||
<setting name="W4Top" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
<setting name="FilterCriteriaMap" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
</BreCalClient.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
@ -8,8 +8,8 @@
|
||||
<SignAssembly>True</SignAssembly>
|
||||
<StartupObject>BreCalClient.App</StartupObject>
|
||||
<AssemblyOriginatorKeyFile>..\..\misc\brecal.snk</AssemblyOriginatorKeyFile>
|
||||
<AssemblyVersion>1.2.2.3</AssemblyVersion>
|
||||
<FileVersion>1.2.2.3</FileVersion>
|
||||
<AssemblyVersion>1.3.0.4</AssemblyVersion>
|
||||
<FileVersion>1.3.0.4</FileVersion>
|
||||
<Title>Bremen calling client</Title>
|
||||
<Description>A Windows WPF client for the Bremen calling API.</Description>
|
||||
<ApplicationIcon>containership.ico</ApplicationIcon>
|
||||
|
||||
@ -144,9 +144,12 @@ namespace BreCalClient
|
||||
|
||||
internal static void InitializeShips(List<Ship> ships)
|
||||
{
|
||||
_ships.Clear();
|
||||
_allShips.Clear();
|
||||
|
||||
foreach (var ship in ships)
|
||||
{
|
||||
ShipModel sm = new ShipModel(ship);
|
||||
ShipModel sm = new(ship);
|
||||
_shipLookupDict[ship.Id] = sm;
|
||||
if (!ship.Deleted)
|
||||
_ships.Add(sm);
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
xmlns:api="clr-namespace:BreCalClient.misc.Model"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
mc:Ignorable="d" Left="{local:SettingBinding W1Left}" Top="{local:SettingBinding W1Top}"
|
||||
Title="{x:Static p:Resources.textEditShipcall}" Height="270" Width="800" Loaded="Window_Loaded" ResizeMode="NoResize" Icon="Resources/containership.ico">
|
||||
Title="{x:Static p:Resources.textEditShipcall}" Height="298" Width="800" Loaded="Window_Loaded" ResizeMode="NoResize" Icon="Resources/containership.ico">
|
||||
<Window.Resources>
|
||||
<local:BoolToIndexConverter x:Key="boolToIndexConverter" />
|
||||
<local:EnumToStringConverter x:Key="enumToStringConverter" />
|
||||
@ -29,6 +29,7 @@
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Content="{x:Static p:Resources.textShip}" Grid.Column="0" Grid.Row="0" HorizontalContentAlignment="Right"/>
|
||||
@ -64,12 +65,13 @@
|
||||
|
||||
<Label Content="Zeit Ref." Grid.Column="2" Grid.Row="2" HorizontalContentAlignment="Right" />
|
||||
|
||||
<Label Content="ETA" Grid.Column="2" Grid.Row="3" HorizontalContentAlignment="Right" Margin="0,2,0,26" Grid.RowSpan="2"/>
|
||||
<Label Content="ETD" Grid.Column="2" Grid.Row="4" HorizontalContentAlignment="Right"/>
|
||||
<Label Content="ETA" Grid.Column="2" Grid.Row="4" HorizontalContentAlignment="Right" Margin="0,2,0,26" Grid.RowSpan="2" x:Name="labelETA"/>
|
||||
<Label Content="ETD" Grid.Column="2" Grid.Row="3" HorizontalContentAlignment="Right" x:Name="labelETD"/>
|
||||
|
||||
<ComboBox x:Name="comboBoxTimeRef" Grid.Column="3" Margin="2" Grid.Row="2" />
|
||||
<local:DateTimePickerExt x:Name="datePickerETA" Grid.Column="3" Grid.Row="3" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm" IsEnabled="False" ValueChanged="datePickerETA_ValueChanged"/>
|
||||
<local:DateTimePickerExt x:Name="datePickerETD" Grid.Column="3" Grid.Row="4" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm" IsEnabled="False" ValueChanged="datePickerETD_ValueChanged"/>
|
||||
|
||||
<local:DateTimePickerExt x:Name="datePickerETD" Grid.Column="3" Grid.Row="3" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm" IsEnabled="False" ValueChanged="datePickerETD_ValueChanged"/>
|
||||
<local:DateTimePickerExt x:Name="datePickerETA" Grid.Column="3" Grid.Row="4" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm" IsEnabled="False" ValueChanged="datePickerETA_ValueChanged"/>
|
||||
|
||||
<Label Content="{x:Static p:Resources.textAgency}" Grid.Column="2" Grid.Row="5" HorizontalContentAlignment="Right"/>
|
||||
<ComboBox Name="comboBoxAgency" Grid.Column="3" Grid.Row="5" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id" SelectionChanged="comboBoxAgency_SelectionChanged">
|
||||
@ -80,8 +82,12 @@
|
||||
</ComboBox.ContextMenu>
|
||||
</ComboBox>
|
||||
|
||||
<Label x:Name="labelBSMDGranted" Grid.Row="6" Grid.Column="3" Grid.ColumnSpan="1" Content="{x:Static p:Resources.textBSMDGranted}" Visibility="Hidden" FontWeight="DemiBold" />
|
||||
<StackPanel Grid.Row="7" Grid.Column="3" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Label x:Name="labelBSMDGranted" Grid.Row="7" Grid.Column="3" Grid.ColumnSpan="1" Content="{x:Static p:Resources.textBSMDGranted}" Visibility="Hidden" FontWeight="DemiBold" />
|
||||
|
||||
<Label x:Name="labelShiftingCount" Grid.Row="6" Grid.Column="2" HorizontalAlignment="Right" Content="{x:Static p:Resources.textShiftingSequence}" />
|
||||
<xctk:IntegerUpDown x:Name="integerUpDownShiftingCount" Grid.Row="6" Grid.Column="3" Margin="2" Minimum="0" Maximum="255" />
|
||||
|
||||
<StackPanel Grid.Row="8" Grid.Column="3" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
<Button Width= "80" Margin="2" Content="{x:Static p:Resources.textOK}" x:Name="buttonOK" Click="buttonOK_Click" IsEnabled="False" />
|
||||
<Button Width="80" Margin="2" Content="{x:Static p:Resources.textCancel}" x:Name="buttonCancel" Click="buttonCancel_Click"/>
|
||||
</StackPanel>
|
||||
|
||||
@ -64,6 +64,8 @@ namespace BreCalClient
|
||||
|
||||
this.comboBoxTimeRef.ItemsSource = BreCalLists.TimeRefs;
|
||||
|
||||
this.integerUpDownShiftingCount.Value = this.ShipcallModel.ShiftSequence;
|
||||
|
||||
if (this.ShipcallModel.Shipcall == null) this.ShipcallModel.Shipcall = new();
|
||||
this.CopyToControls();
|
||||
|
||||
@ -116,32 +118,48 @@ namespace BreCalClient
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case ShipcallType.Arrival:
|
||||
this.datePickerETA.IsEnabled = true;
|
||||
this.datePickerETD.IsEnabled = false;
|
||||
case ShipcallType.Arrival:
|
||||
this.datePickerETD.Visibility = Visibility.Hidden;
|
||||
this.labelETD.Visibility = Visibility.Hidden;
|
||||
this.datePickerETA.Visibility = Visibility.Visible;
|
||||
this.labelETA.Visibility = Visibility.Visible;
|
||||
Grid.SetRow(datePickerETA, 3);
|
||||
Grid.SetRow(labelETA, 3);
|
||||
this.datePickerETD.Value = null;
|
||||
this.comboBoxDepartureBerth.SelectedIndex = -1;
|
||||
this.comboBoxDepartureBerth.IsEnabled = false;
|
||||
this.comboBoxArrivalBerth.IsEnabled = true;
|
||||
this.comboBoxTimeRef.IsEnabled = true;
|
||||
this.labelShiftingCount.Visibility = Visibility.Hidden;
|
||||
this.integerUpDownShiftingCount.Visibility = Visibility.Hidden;
|
||||
break;
|
||||
case ShipcallType.Departure:
|
||||
this.datePickerETA.IsEnabled = false;
|
||||
this.datePickerETD.IsEnabled = true;
|
||||
this.datePickerETD.Visibility = Visibility.Visible;
|
||||
this.labelETD.Visibility = Visibility.Visible;
|
||||
this.datePickerETA.Visibility = Visibility.Hidden;
|
||||
this.labelETA.Visibility = Visibility.Hidden;
|
||||
this.datePickerETA.Value = null;
|
||||
this.comboBoxArrivalBerth.SelectedIndex = -1;
|
||||
this.comboBoxArrivalBerth.IsEnabled = false;
|
||||
this.comboBoxDepartureBerth.IsEnabled = true;
|
||||
this.comboBoxTimeRef.IsEnabled = false;
|
||||
this.comboBoxTimeRef.SelectedIndex = 0;
|
||||
this.labelShiftingCount.Visibility = Visibility.Hidden;
|
||||
this.integerUpDownShiftingCount.Visibility = Visibility.Hidden;
|
||||
break;
|
||||
case ShipcallType.Shifting:
|
||||
this.datePickerETA.IsEnabled = true;
|
||||
this.datePickerETD.IsEnabled = true;
|
||||
Grid.SetRow(datePickerETA, 4);
|
||||
Grid.SetRow(labelETA, 4);
|
||||
this.datePickerETA.Visibility = Visibility.Visible;
|
||||
this.labelETA.Visibility = Visibility.Visible;
|
||||
this.datePickerETD.Visibility = Visibility.Visible;
|
||||
this.labelETD.Visibility = Visibility.Visible;
|
||||
this.comboBoxArrivalBerth.IsEnabled = true;
|
||||
this.comboBoxDepartureBerth.IsEnabled = true;
|
||||
this.comboBoxTimeRef.IsEnabled = false;
|
||||
this.comboBoxTimeRef.SelectedIndex = 0;
|
||||
this.labelShiftingCount.Visibility = Visibility.Visible;
|
||||
this.integerUpDownShiftingCount.Visibility = Visibility.Visible;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -226,6 +244,7 @@ namespace BreCalClient
|
||||
{
|
||||
this.ShipcallModel.Shipcall.DepartureBerthId = (this.comboBoxArrivalBerth.SelectedItem != null) ? ((Berth)this.comboBoxArrivalBerth.SelectedItem).Id : null;
|
||||
this.ShipcallModel.Shipcall.ArrivalBerthId = (this.comboBoxDepartureBerth.SelectedItem != null) ? ((Berth)this.comboBoxDepartureBerth.SelectedItem).Id : null;
|
||||
this.ShipcallModel.ShiftSequence = (byte?) this.integerUpDownShiftingCount.Value;
|
||||
}
|
||||
|
||||
Participant? participant;
|
||||
@ -289,7 +308,7 @@ namespace BreCalClient
|
||||
if (this.ShipcallModel == null) return;
|
||||
if (this.ShipcallModel.Shipcall != null)
|
||||
{
|
||||
this.comboBoxTimeRef.SelectedIndex = this.ShipcallModel.Shipcall.TimeRefPoint ?? 0;
|
||||
this.comboBoxTimeRef.SelectedIndex = this.ShipcallModel.Shipcall.TimeRefPoint ?? 1;
|
||||
this.comboBoxCategories.SelectedItem = new EnumToStringConverter().Convert(this.ShipcallModel.Shipcall.Type, typeof(ShipcallType), new object(), System.Globalization.CultureInfo.CurrentCulture);
|
||||
if (this.ShipcallModel.Shipcall.Eta != DateTime.MinValue)
|
||||
this.datePickerETA.Value = this.ShipcallModel.Shipcall.Eta;
|
||||
|
||||
@ -209,7 +209,10 @@ namespace BreCalClient
|
||||
this.checkBoxReplenishingLock.IsChecked = this.ShipcallModel.Shipcall.ReplenishingLock ?? false;
|
||||
this.checkBoxReplenishingTerminal.IsChecked = this.ShipcallModel.Shipcall.ReplenishingTerminal ?? false;
|
||||
|
||||
this.labelETA.Content = string.Format("ETA {0}", BreCalLists.TimeRefs[this.ShipcallModel.Shipcall.TimeRefPoint ?? 0]);
|
||||
if ((this.ShipcallModel.Shipcall.TimeRefPoint ?? 0) == 0)
|
||||
this.labelETA.Content = BreCalClient.Resources.Resources.textETABerth;
|
||||
else
|
||||
this.labelETA.Content = string.Format("ETA {0}", BreCalLists.TimeRefs[this.ShipcallModel.Shipcall.TimeRefPoint ?? 0]);
|
||||
|
||||
if(!string.IsNullOrEmpty(this.Times.Remarks))
|
||||
this.textBoxRemarks.Text = this.Times.Remarks;
|
||||
|
||||
@ -211,7 +211,10 @@ namespace BreCalClient
|
||||
this.checkBoxMooredLock.IsChecked = this.ShipcallModel.Shipcall.MooredLock ?? false;
|
||||
this.checkBoxRainsensitiveCargo.IsChecked = this.ShipcallModel.Shipcall.RainSensitiveCargo ?? false;
|
||||
|
||||
this.labelETD.Content = string.Format("ETD {0}", BreCalLists.TimeRefs[this.ShipcallModel.Shipcall.TimeRefPoint ?? 0]);
|
||||
if ((this.ShipcallModel.Shipcall.TimeRefPoint ?? 0) == 0)
|
||||
this.labelETD.Content = BreCalClient.Resources.Resources.textETDBerth;
|
||||
else
|
||||
this.labelETD.Content = string.Format("ETD {0}", BreCalLists.TimeRefs[this.ShipcallModel.Shipcall.TimeRefPoint ?? 0]);
|
||||
|
||||
if (!string.IsNullOrEmpty(this.Times.Remarks))
|
||||
this.textBoxRemarks.Text = this.Times.Remarks;
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="{x:Static p:Resources.textShiftingFrom}" FontWeight="DemiBold"/>
|
||||
<Image Margin="2" Grid.Column="1" Source="Resources/arrow_right_green.png" />
|
||||
</Grid>
|
||||
<Label Content="ETD" x:Name="labelETD" Grid.Column="0" Grid.Row="1" HorizontalContentAlignment="Right" FontWeight="Bold"/>
|
||||
<Label Content="{x:Static p:Resources.textETDBerth}" Grid.Column="0" Grid.Row="1" HorizontalContentAlignment="Right" FontWeight="Bold"/>
|
||||
<Grid Grid.Column="1" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width=".5*" />
|
||||
@ -81,7 +81,7 @@
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="{x:Static p:Resources.textShiftingTo}" FontWeight="DemiBold"/>
|
||||
<Image Margin="2" Grid.Column="1" Source="Resources/arrow_right_green.png" />
|
||||
</Grid>
|
||||
<Label Content="ETA" x:Name="labelETA" Grid.Column="0" Grid.Row="9" HorizontalContentAlignment="Right" FontWeight="Bold"/>
|
||||
<Label Content="{x:Static p:Resources.textETABerth}" Grid.Column="0" Grid.Row="9" HorizontalContentAlignment="Right" FontWeight="Bold"/>
|
||||
<Grid Grid.Column="1" Grid.Row="9">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width=".5*" />
|
||||
|
||||
@ -217,10 +217,7 @@ namespace BreCalClient
|
||||
|
||||
this.checkBoxMooredLock.IsChecked = this.ShipcallModel.Shipcall.MooredLock ?? false;
|
||||
this.checkBoxRainsensitiveCargo.IsChecked = this.ShipcallModel.Shipcall.RainSensitiveCargo ?? false;
|
||||
|
||||
this.labelETA.Content = string.Format("ETA {0}", BreCalLists.TimeRefs[this.ShipcallModel.Shipcall.TimeRefPoint ?? 0]);
|
||||
this.labelETD.Content = string.Format("ETD {0}", BreCalLists.TimeRefs[this.ShipcallModel.Shipcall.TimeRefPoint ?? 0]);
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(this.Times.Remarks))
|
||||
this.textBoxRemarks.Text = this.Times.Remarks;
|
||||
|
||||
|
||||
@ -16,8 +16,8 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" x:Name="rowETA" />
|
||||
<RowDefinition Height="28" x:Name="rowETD" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
|
||||
@ -99,13 +99,15 @@ namespace BreCalClient
|
||||
if(this.datePickerETABerth.IsEnabled && (this.Times.EtaBerth == null) && (this.AgencyTimes?.EtaBerth != null) && (ShipcallModel.Shipcall?.Type == ShipcallType.Arrival))
|
||||
{
|
||||
this.datePickerETABerth.Value = this.AgencyTimes.EtaBerth;
|
||||
if (this.datePickerETABerth.Template.FindName("PART_TextBox", this.datePickerETABerth) is WatermarkTextBox tb) { tb.Focus(); tb.SelectAll(); }
|
||||
WatermarkTextBox? tb = this.datePickerETABerth.Template.FindName("PART_TextBox", this.datePickerETABerth) as WatermarkTextBox;
|
||||
if (tb != null) { tb.Focus(); tb.SelectAll(); }
|
||||
}
|
||||
this.datePickerETDBerth.Value = this.Times.EtdBerth;
|
||||
if(this.datePickerETDBerth.IsEnabled && (this.Times.EtdBerth == null) && (this.AgencyTimes?.EtdBerth != null) && ((ShipcallModel.Shipcall?.Type == ShipcallType.Departure) || (ShipcallModel.Shipcall?.Type == ShipcallType.Shifting)))
|
||||
{
|
||||
this.datePickerETDBerth.Value = this.AgencyTimes.EtdBerth;
|
||||
if (this.datePickerETDBerth.Template.FindName("PART_TextBox", this.datePickerETDBerth) is WatermarkTextBox tb) { tb.Focus(); tb.SelectAll(); }
|
||||
WatermarkTextBox? tb = this.datePickerETDBerth.Template.FindName("PART_TextBox", this.datePickerETDBerth) as WatermarkTextBox;
|
||||
if (tb != null) tb.SelectAll();
|
||||
}
|
||||
|
||||
this.datePickerLockTime.Value = this.Times.LockTime;
|
||||
@ -126,8 +128,20 @@ namespace BreCalClient
|
||||
//if (this.datePickerETDBerth_End.Template.FindName("PART_TextBox", this.datePickerETDBerth_End) is WatermarkTextBox tb) { tb.Focus(); tb.SelectAll(); }
|
||||
}
|
||||
|
||||
this.labelETA.Content = string.Format("ETA {0}", BreCalLists.TimeRefs[this.ShipcallModel.Shipcall?.TimeRefPoint ?? 0]);
|
||||
this.labelETD.Content = string.Format("ETD {0}", BreCalLists.TimeRefs[this.ShipcallModel.Shipcall?.TimeRefPoint ?? 0]);
|
||||
if (this.ShipcallModel.Shipcall?.Type != ShipcallType.Shifting)
|
||||
{
|
||||
int displayIndex = this.ShipcallModel.Shipcall?.TimeRefPoint ?? 0;
|
||||
if (displayIndex > 0)
|
||||
{
|
||||
this.labelETA.Content = string.Format("ETA {0}", BreCalLists.TimeRefs[displayIndex]);
|
||||
this.labelETD.Content = string.Format("ETD {0}", BreCalLists.TimeRefs[displayIndex]);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.labelETA.Content = BreCalClient.Resources.Resources.textETABerth;
|
||||
this.labelETD.Content = BreCalClient.Resources.Resources.textETDBerth;
|
||||
}
|
||||
}
|
||||
|
||||
switch (ShipcallModel.Shipcall?.Type)
|
||||
{
|
||||
@ -172,6 +186,15 @@ namespace BreCalClient
|
||||
}
|
||||
}
|
||||
|
||||
if (ShipcallModel.Shipcall?.Type != ShipcallType.Arrival)
|
||||
{
|
||||
this.rowETA.Height = new(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.rowETD.Height = new(0);
|
||||
}
|
||||
|
||||
// setting en/dis-abled
|
||||
|
||||
if (this.Times.ParticipantId != App.Participant.Id)
|
||||
|
||||
@ -15,8 +15,8 @@
|
||||
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" x:Name="rowStart"/>
|
||||
<RowDefinition Height="28" x:Name="rowEnd"/>
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="56" />
|
||||
@ -26,9 +26,9 @@
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textOperationsStart}" HorizontalContentAlignment="Right" x:Name="labelStart" />
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textOperationsEnd}" HorizontalContentAlignment="Right" x:Name="labelEnd" />
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textBerth}" HorizontalAlignment="Right" />
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textPierside}" HorizontalContentAlignment="Right" />
|
||||
<Label Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textBerthRemarks}" HorizontalContentAlignment="Right" />
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textBerth}" HorizontalAlignment="Right" x:Name="labelBerth"/>
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textPierside}" HorizontalContentAlignment="Right" x:Name="labelPierside" />
|
||||
<Label Grid.Row="4" Grid.Column="0" Content="{x:Static p:Resources.textBerthRemarks}" HorizontalContentAlignment="Right" x:Name="labelBerthRemarks"/>
|
||||
|
||||
<Label Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textRemarks}" HorizontalContentAlignment="Right" />
|
||||
|
||||
|
||||
@ -124,11 +124,31 @@ namespace BreCalClient
|
||||
case ShipcallType.Arrival:
|
||||
this.labelStart.FontWeight = FontWeights.Bold;
|
||||
this.datePickerOperationStart.ContextMenu.IsEnabled = false;
|
||||
this.labelEnd.Visibility = Visibility.Hidden;
|
||||
this.datePickerOperationEnd.Visibility = Visibility.Hidden;
|
||||
this.datePickerOperationEnd_End.Visibility = Visibility.Hidden;
|
||||
this.rowEnd.Height = new(0);
|
||||
break;
|
||||
case ShipcallType.Departure:
|
||||
this.rowStart.Height = new(0);
|
||||
this.labelEnd.FontWeight = FontWeights.Bold;
|
||||
this.labelBerth.Visibility = Visibility.Hidden;
|
||||
this.comboBoxBerth.Visibility= Visibility.Hidden;
|
||||
this.labelPierside.Visibility = Visibility.Hidden;
|
||||
this.comboBoxPierside.Visibility = Visibility.Hidden;
|
||||
this.labelBerthRemarks.Visibility = Visibility.Hidden;
|
||||
this.textBoxBerthRemarks.Visibility = Visibility.Hidden;
|
||||
break;
|
||||
case ShipcallType.Shifting:
|
||||
this.rowStart.Height = new(0);
|
||||
this.labelEnd.FontWeight = FontWeights.Bold;
|
||||
this.datePickerOperationEnd.ContextMenu.IsEnabled = false;
|
||||
this.datePickerOperationEnd.ContextMenu.IsEnabled = false;
|
||||
this.labelBerth.Visibility = Visibility.Hidden;
|
||||
this.comboBoxBerth.Visibility = Visibility.Hidden;
|
||||
this.labelPierside.Visibility = Visibility.Hidden;
|
||||
this.comboBoxPierside.Visibility = Visibility.Hidden;
|
||||
this.labelBerthRemarks.Visibility = Visibility.Hidden;
|
||||
this.textBoxBerthRemarks.Visibility = Visibility.Hidden;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -146,6 +166,7 @@ namespace BreCalClient
|
||||
this.comboBoxPierside.IsEnabled = ShipcallModel.Shipcall?.Type == ShipcallType.Arrival;
|
||||
this.textBoxBerthRemarks.IsReadOnly = ShipcallModel.Shipcall?.Type != ShipcallType.Arrival;
|
||||
this.textBoxRemarks.IsReadOnly = false;
|
||||
|
||||
this.CheckOKButton();
|
||||
}
|
||||
|
||||
|
||||
@ -34,6 +34,7 @@ namespace BreCalClient
|
||||
{
|
||||
private readonly ILog _log = LogManager.GetLogger(typeof(MainWindow));
|
||||
private const int SHIPCALL_UPDATE_INTERVAL_SECONDS = 30;
|
||||
private const int SHIPS_UPDATE_INTERVAL_SECONDS = 120;
|
||||
private const int PROGRESS_STEPS = 50;
|
||||
|
||||
#region Fields
|
||||
@ -142,7 +143,7 @@ namespace BreCalClient
|
||||
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
// serialize filter settings
|
||||
Properties.Settings.Default.FilterCriteria = this.searchFilterControl.SearchFilter.Serialize();
|
||||
Properties.Settings.Default.FilterCriteriaMap = SearchFilterModel.Serialize();
|
||||
Properties.Settings.Default.Save();
|
||||
_tokenSource.Cancel();
|
||||
}
|
||||
@ -404,6 +405,8 @@ namespace BreCalClient
|
||||
|
||||
private async void LoadStaticLists()
|
||||
{
|
||||
if (_loginResult == null) return;
|
||||
|
||||
BreCalLists.InitializeBerths(await _staticApi.BerthsGetAsync());
|
||||
BreCalLists.InitializeShips(await _shipApi.ShipsGetAsync());
|
||||
BreCalLists.InitializeParticipants(await _staticApi.ParticipantsGetAsync());
|
||||
@ -421,14 +424,43 @@ namespace BreCalClient
|
||||
|
||||
this.searchFilterControl.SetAgencies(BreCalLists.Participants_Agent);
|
||||
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.FilterCriteria))
|
||||
if (!string.IsNullOrEmpty(Properties.Settings.Default.FilterCriteriaMap))
|
||||
{
|
||||
SearchFilterModel? sfm = SearchFilterModel.Deserialize(Properties.Settings.Default.FilterCriteria);
|
||||
if (sfm != null)
|
||||
this.searchFilterControl.SetFilterFromModel(sfm);
|
||||
SearchFilterModel.Deserialize(Properties.Settings.Default.FilterCriteriaMap);
|
||||
SearchFilterModel? currentFilter = null;
|
||||
if (SearchFilterModel.filterMap != null)
|
||||
{
|
||||
if((_loginResult != null) && SearchFilterModel.filterMap.ContainsKey(_loginResult.Id))
|
||||
{
|
||||
currentFilter = SearchFilterModel.filterMap[_loginResult.Id];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SearchFilterModel.filterMap = new();
|
||||
}
|
||||
if (currentFilter == null)
|
||||
{
|
||||
currentFilter = new();
|
||||
if(_loginResult != null)
|
||||
SearchFilterModel.filterMap[_loginResult.Id] = currentFilter;
|
||||
}
|
||||
this.searchFilterControl.SetFilterFromModel(currentFilter);
|
||||
}
|
||||
|
||||
_ = Task.Run(() => RefreshShipcalls());
|
||||
_ = Task.Run(() => RefreshShips());
|
||||
|
||||
}
|
||||
|
||||
|
||||
public async Task RefreshShips()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
Thread.Sleep(SHIPS_UPDATE_INTERVAL_SECONDS * 1000);
|
||||
BreCalLists.InitializeShips(await _shipApi.ShipsGetAsync());
|
||||
}
|
||||
}
|
||||
|
||||
public async Task RefreshShipcalls()
|
||||
|
||||
@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<ApplicationRevision>1</ApplicationRevision>
|
||||
<ApplicationVersion>1.3.0.0</ApplicationVersion>
|
||||
<ApplicationVersion>1.3.0.4</ApplicationVersion>
|
||||
<BootstrapperEnabled>True</BootstrapperEnabled>
|
||||
<Configuration>Debug</Configuration>
|
||||
<CreateDesktopShortcut>True</CreateDesktopShortcut>
|
||||
|
||||
@ -4,8 +4,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<ApplicationRevision>3</ApplicationRevision>
|
||||
<ApplicationVersion>1.2.2.3</ApplicationVersion>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.3.0.4</ApplicationVersion>
|
||||
<BootstrapperEnabled>False</BootstrapperEnabled>
|
||||
<Configuration>Release</Configuration>
|
||||
<CreateWebPageOnPublish>True</CreateWebPageOnPublish>
|
||||
|
||||
@ -5,7 +5,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.2.2.3</ApplicationVersion>
|
||||
<ApplicationVersion>1.3.0.4</ApplicationVersion>
|
||||
<BootstrapperEnabled>True</BootstrapperEnabled>
|
||||
<Configuration>Debug</Configuration>
|
||||
<CreateDesktopShortcut>True</CreateDesktopShortcut>
|
||||
|
||||
14
src/BreCalClient/Properties/Settings.Designer.cs
generated
14
src/BreCalClient/Properties/Settings.Designer.cs
generated
@ -12,7 +12,7 @@ namespace BreCalClient.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.10.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
@ -214,5 +214,17 @@ namespace BreCalClient.Properties {
|
||||
this["W4Top"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string FilterCriteriaMap {
|
||||
get {
|
||||
return ((string)(this["FilterCriteriaMap"]));
|
||||
}
|
||||
set {
|
||||
this["FilterCriteriaMap"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="API_URL" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">https://brecal.tbsmd-emswe.eu</Value>
|
||||
<Value Profile="(Default)">https://brecal.bsmd-emswe.eu</Value>
|
||||
</Setting>
|
||||
<Setting Name="Width" Type="System.Double" Scope="User">
|
||||
<Value Profile="(Default)">800</Value>
|
||||
@ -53,5 +53,8 @@
|
||||
<Setting Name="W4Top" Type="System.Double" Scope="User">
|
||||
<Value Profile="(Default)">0</Value>
|
||||
</Setting>
|
||||
<Setting Name="FilterCriteriaMap" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
9
src/BreCalClient/Resources/Resources.Designer.cs
generated
9
src/BreCalClient/Resources/Resources.Designer.cs
generated
@ -1027,6 +1027,15 @@ namespace BreCalClient.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Shift. number.
|
||||
/// </summary>
|
||||
public static string textShiftingSequence {
|
||||
get {
|
||||
return ResourceManager.GetString("textShiftingSequence", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Shifting to.
|
||||
/// </summary>
|
||||
|
||||
@ -502,4 +502,7 @@
|
||||
<data name="textPortAuthority" xml:space="preserve">
|
||||
<value>Hafenamt</value>
|
||||
</data>
|
||||
<data name="textShiftingSequence" xml:space="preserve">
|
||||
<value>Verhol. Nr.</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -427,6 +427,9 @@
|
||||
<data name="textShiftingFrom" xml:space="preserve">
|
||||
<value>Shifting from</value>
|
||||
</data>
|
||||
<data name="textShiftingSequence" xml:space="preserve">
|
||||
<value>Shift. number</value>
|
||||
</data>
|
||||
<data name="textShiftingTo" xml:space="preserve">
|
||||
<value>Shifting to</value>
|
||||
</data>
|
||||
|
||||
@ -33,18 +33,21 @@ namespace BreCalClient
|
||||
|
||||
public bool? MineOnly { get; set; }
|
||||
|
||||
public static Dictionary<int, SearchFilterModel>? filterMap = new();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Serialisation
|
||||
|
||||
public static SearchFilterModel? Deserialize(string json)
|
||||
public static bool Deserialize(string json)
|
||||
{
|
||||
return (SearchFilterModel?) JsonConvert.DeserializeObject(json, typeof(SearchFilterModel));
|
||||
filterMap = (Dictionary<int, SearchFilterModel>?) JsonConvert.DeserializeObject(json, typeof(Dictionary<int, SearchFilterModel>));
|
||||
return (filterMap != null);
|
||||
}
|
||||
|
||||
public string Serialize()
|
||||
public static string Serialize()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
return JsonConvert.SerializeObject(filterMap, Formatting.Indented);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -5,8 +5,8 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:p = "clr-namespace:BreCalClient.Resources"
|
||||
xmlns:sets="clr-namespace:BreCalClient.Properties"
|
||||
xmlns:db="clr-namespace:BreCalClient;assembly=BreCalClient"
|
||||
mc:Ignorable="d"
|
||||
xmlns:db="clr-namespace:BreCalClient;assembly=BreCalClient"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="135" d:DesignWidth="800">
|
||||
<Border BorderBrush="LightGray" Margin="1" BorderThickness="1">
|
||||
<Grid>
|
||||
@ -41,15 +41,19 @@
|
||||
<Grid Grid.Row="0" Grid.Column="0" Grid.RowSpan="1" Grid.ColumnSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="30" />
|
||||
<ColumnDefinition Width="20" x:Name="columnDefinitionShiftingSequence"/>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="32" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Margin="2" Grid.Column="0" PreviewMouseUp="Image_PreviewMouseUp" x:Name="imageShipcallType" />
|
||||
<Label Grid.Column="1" FontSize="12" x:Name="labelShipName" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
|
||||
<Viewbox Grid.Column="1">
|
||||
<TextBlock x:Name="textBlockShiftingSequence"></TextBlock>
|
||||
</Viewbox>
|
||||
<Label Grid.Column="2" FontSize="12" x:Name="labelShipName" Foreground="White" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" VerticalAlignment="Stretch"
|
||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" PreviewMouseUp="Image_PreviewMouseUp">
|
||||
<TextBlock Name="textBlockShipName" />
|
||||
</Label>
|
||||
<Grid Grid.Column="2" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}">
|
||||
<Grid Grid.Column="3" Background="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}">
|
||||
<Image Grid.Column="3" Margin="2" x:Name="imageEvaluation" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
@ -123,12 +127,12 @@
|
||||
<Label Grid.Row="0" Grid.Column="0" Content = "ETA" x:Name="labelETAETDAgent" Padding="0" VerticalContentAlignment="Center" />
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textRemarks}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
|
||||
<Border Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" BorderThickness="0,1,0,0" BorderBrush="Gray" >
|
||||
<Label Content="{x:Static p:Resources.textBerth}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
|
||||
<Label Content="{x:Static p:Resources.textBerth}" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
|
||||
</Border>
|
||||
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelAgencyETAETDValue" FontWeight="DemiBold"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Grid.RowSpan="1" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockAgencyRemarks" FontSize="10"/>
|
||||
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="1" HorizontalContentAlignment="Left" x:Name="labelAgencyBerth" Padding="0" VerticalContentAlignment="Center" FontSize="11" FontWeight="SemiBold" />
|
||||
<TextBlock Grid.Row="3" Grid.Column="0" Text="{x:Static p:Resources.textRemarks}" Padding="0" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="9"/>
|
||||
<TextBlock Grid.Row="3" Grid.Column="1" Grid.RowSpan="1" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockAgencyBerthRemarks" FontSize="10"/>
|
||||
@ -226,8 +230,8 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="20" />
|
||||
<RowDefinition Height=".5*" />
|
||||
<RowDefinition Height="14" />
|
||||
<RowDefinition Height=".5*" />
|
||||
<RowDefinition Height="14" x:Name="rowDefinitionTerminalBerth"/>
|
||||
<RowDefinition Height=".5*" x:Name="rowDefinitionTerminalBerthRemarks"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="{x:Static p:Resources.textOperationsStart}" x:Name="labelETAETDTerminal" Padding="0" VerticalContentAlignment="Center" FontSize="9"/>
|
||||
<Label Grid.Row="0" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelOperationsStart" FontWeight="DemiBold"/>
|
||||
|
||||
@ -68,6 +68,11 @@ namespace BreCalClient
|
||||
{
|
||||
if (this.ShipcallControlModel != null)
|
||||
{
|
||||
|
||||
bool shiftingNoVisible = ((this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Shifting) && this.ShipcallControlModel.ShiftSequence.HasValue);
|
||||
this.textBlockShiftingSequence.Text = shiftingNoVisible ? this.ShipcallControlModel?.ShiftSequence.ToString() : "";
|
||||
this.columnDefinitionShiftingSequence.Width = shiftingNoVisible ? new(20) : new(0);
|
||||
|
||||
string agentName = "";
|
||||
string? name;
|
||||
_agency = this.ShipcallControlModel.GetParticipantForType(Extensions.ParticipantType.AGENCY);
|
||||
@ -267,7 +272,12 @@ namespace BreCalClient
|
||||
else
|
||||
this.imageEvaluation.ToolTip = null;
|
||||
|
||||
this.textBlockBerth.Text = this.ShipcallControlModel?.Berth;
|
||||
//Times? bsmdTimes = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.BSMD);
|
||||
//if (bsmdTimes != null)
|
||||
this.textBlockBerth.Text = this.ShipcallControlModel?.GetBerthText(null);
|
||||
//else
|
||||
// this.textBlockBerth.Text = this.ShipcallControlModel?.Berth;
|
||||
|
||||
this.textBlockCallsign.Text = this.ShipcallControlModel?.Ship?.Callsign;
|
||||
if (this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival)
|
||||
{
|
||||
@ -377,9 +387,9 @@ namespace BreCalClient
|
||||
if(!lockTimeAdded)
|
||||
{
|
||||
lockTimeRowDefinition.Height = new GridLength(15);
|
||||
labelPortAuthorityLockTime.Content = portAuthorityTimes.LockTime.Value.ToString("dd.MM.yyyy HH:mm");
|
||||
lockTimeAdded = true;
|
||||
}
|
||||
labelPortAuthorityLockTime.Content = portAuthorityTimes.LockTime.Value.ToString("dd.MM.yyyy HH:mm");
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -417,9 +427,13 @@ namespace BreCalClient
|
||||
this.imageTugLocked.Visibility = Visibility.Hidden;
|
||||
}
|
||||
|
||||
Times? terminalTimes = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.TERMINAL);
|
||||
this.rowDefinitionTerminalBerth.Height = (this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival) ? new(14) : new(0);
|
||||
this.rowDefinitionTerminalBerthRemarks.Height = (this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival) ? new GridLength(.5, GridUnitType.Star) : new(0);
|
||||
|
||||
Times ? terminalTimes = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.TERMINAL);
|
||||
if (terminalTimes != null)
|
||||
{
|
||||
this.labelTerminalBerth.Visibility = (this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival) ? Visibility.Visible : Visibility.Hidden;
|
||||
this.labelTerminalBerth.Content = this.ShipcallControlModel?.GetBerthText(terminalTimes);
|
||||
this.labelOperationsStart.Content = terminalTimes.DisplayTime(this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival);
|
||||
this.textBlockTerminalRemarks.Text = terminalTimes.Remarks.TruncateDots(40);
|
||||
|
||||
@ -16,7 +16,7 @@ namespace BreCalClient
|
||||
public class ShipcallControlModel
|
||||
{
|
||||
|
||||
#region Enumerations
|
||||
#region Enumerations
|
||||
|
||||
[Flags]
|
||||
public enum StatusFlags
|
||||
@ -90,6 +90,31 @@ namespace BreCalClient
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This property attempts to store the (hopefully short) shifting sequence in the topmost
|
||||
/// byte of the "flags" integer which will not be used for the forseeable future
|
||||
///
|
||||
/// This is a workaround to avoid adding another field to the interface and is only used in the
|
||||
/// client display anyway. You could say hack as well.
|
||||
/// </summary>
|
||||
public byte? ShiftSequence
|
||||
{
|
||||
get
|
||||
{
|
||||
if((this.Shipcall == null) || (this.Shipcall.Flags == null)) return null;
|
||||
return (byte?) (this.Shipcall?.Flags >> 24);
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((value != null) && (this.Shipcall != null))
|
||||
{
|
||||
int currentFlag = this.Shipcall.Flags ?? 0;
|
||||
int moveUp = ((value ?? 0) << 24);
|
||||
this.Shipcall.Flags = (currentFlag & 0xffffff) | moveUp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public methods
|
||||
@ -146,28 +171,45 @@ namespace BreCalClient
|
||||
return false;
|
||||
}
|
||||
|
||||
public string? GetBerthText(Times times)
|
||||
/// <summary>
|
||||
/// Get berth display text for columns AGENT and TERMINAL
|
||||
/// </summary>
|
||||
public string? GetBerthText(Times? times)
|
||||
{
|
||||
string? timesBerthText = null;
|
||||
string? scArrivalBerthText = null;
|
||||
string? scDepartureBerthText = null;
|
||||
string? berthText = null;
|
||||
if ((BreCalLists.Berths != null) && times.BerthId.HasValue && (this.Shipcall?.Type != ShipcallType.Shifting))
|
||||
Berth? berth;
|
||||
|
||||
if((times != null) && times.BerthId.HasValue)
|
||||
{
|
||||
Berth? berth = BreCalLists.AllBerths.Find((x) => x.Id == times.BerthId);
|
||||
berthText = berth?.Name;
|
||||
berth = BreCalLists.AllBerths.Find((x) => x.Id == times.BerthId.Value);
|
||||
timesBerthText = berth?.Name;
|
||||
}
|
||||
|
||||
if ((berthText == null) && (times.ParticipantType != (int) Extensions.ParticipantType.TERMINAL))
|
||||
berth = BreCalLists.AllBerths?.Find((x) => x.Id == this.Shipcall?.ArrivalBerthId);
|
||||
scArrivalBerthText = berth?.Name;
|
||||
|
||||
berth = BreCalLists.AllBerths?.Find((x) => x.Id == this.Shipcall?.DepartureBerthId);
|
||||
scDepartureBerthText= berth?.Name;
|
||||
|
||||
switch(this.Shipcall?.Type)
|
||||
{
|
||||
if (this.Shipcall?.Type == ShipcallType.Arrival)
|
||||
{
|
||||
Berth? berth = BreCalLists.AllBerths?.Find((x) => x.Id == this.Shipcall?.ArrivalBerthId);
|
||||
berthText = berth?.Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
Berth? berth = BreCalLists.AllBerths?.Find((x) => x.Id == this.Shipcall?.DepartureBerthId);
|
||||
berthText = berth?.Name;
|
||||
}
|
||||
}
|
||||
case ShipcallType.Arrival:
|
||||
berthText = timesBerthText ?? scArrivalBerthText;
|
||||
break;
|
||||
case ShipcallType.Departure:
|
||||
berthText = timesBerthText ?? scDepartureBerthText;
|
||||
break;
|
||||
case ShipcallType.Shifting:
|
||||
if (times?.ParticipantType != (int)Extensions.ParticipantType.TERMINAL)
|
||||
berthText = (scDepartureBerthText ?? "") + " / " + (timesBerthText ?? scArrivalBerthText);
|
||||
else
|
||||
berthText = scDepartureBerthText ?? "";
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return berthText;
|
||||
}
|
||||
@ -194,7 +236,7 @@ namespace BreCalClient
|
||||
{
|
||||
if (agentTimes.EtdBerth != null)
|
||||
theDate = agentTimes.EtdBerth.Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return theDate.ToString();
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
<applicationSettings>
|
||||
<RoleEditor.Properties.Settings>
|
||||
<setting name="ConnectionString" serializeAs="String">
|
||||
<value>Server=localhost;User ID=ds;Password=HalloWach_2323XXL!!;Database=bremen_calling_test;Port=33306</value>
|
||||
<value>Server=localhost;User ID=ds;Password=HalloWach_2323XXL!!;Database=bremen_calling;Port=33306</value>
|
||||
</setting>
|
||||
</RoleEditor.Properties.Settings>
|
||||
</applicationSettings>
|
||||
|
||||
@ -50,14 +50,6 @@
|
||||
"PrerequisitesLocation" = "2:1"
|
||||
"Url" = "8:"
|
||||
"ComponentsUrl" = "8:"
|
||||
"Items"
|
||||
{
|
||||
"{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.7.2"
|
||||
{
|
||||
"Name" = "8:Microsoft .NET Framework 4.7.2 (x86 and x64)"
|
||||
"ProductCode" = "8:.NETFramework,Version=v4.7.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"Release"
|
||||
@ -82,14 +74,6 @@
|
||||
"PrerequisitesLocation" = "2:1"
|
||||
"Url" = "8:"
|
||||
"ComponentsUrl" = "8:"
|
||||
"Items"
|
||||
{
|
||||
"{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.7.2"
|
||||
{
|
||||
"Name" = "8:Microsoft .NET Framework 4.7.2 (x86 and x64)"
|
||||
"ProductCode" = "8:.NETFramework,Version=v4.7.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -198,15 +182,15 @@
|
||||
{
|
||||
"Name" = "8:Microsoft Visual Studio"
|
||||
"ProductName" = "8:Bremen calling"
|
||||
"ProductCode" = "8:{0ED342DD-DC00-4CE4-8348-96BB3AB726B1}"
|
||||
"PackageCode" = "8:{8E55F30F-A9C8-41E9-BCE8-431770A951ED}"
|
||||
"UpgradeCode" = "8:{81A329F1-C663-48DA-9E15-DAF19F99B5AE}"
|
||||
"ProductCode" = "8:{D83D737A-BDC1-4D36-9D23-71EF58C7137B}"
|
||||
"PackageCode" = "8:{D7E747A8-7492-47E9-9D4F-B7F955AD8313}"
|
||||
"UpgradeCode" = "8:{1C7FA3E4-BAB9-4911-9348-73094357FC7C}"
|
||||
"AspNetVersion" = "8:"
|
||||
"RestartWWWService" = "11:FALSE"
|
||||
"RemovePreviousVersions" = "11:TRUE"
|
||||
"DetectNewerInstalledVersion" = "11:TRUE"
|
||||
"InstallAllUsers" = "11:FALSE"
|
||||
"ProductVersion" = "8:1.2.2"
|
||||
"ProductVersion" = "8:1.3.0"
|
||||
"Manufacturer" = "8:Informatikbüro Daniel Schick"
|
||||
"ARPHELPTELEPHONE" = "8:+49 (0) 421 - 38 48 27"
|
||||
"ARPHELPLINK" = "8:https://www.bsmd.de/"
|
||||
|
||||
@ -62,7 +62,7 @@ def create_app(test_config=None):
|
||||
app.register_blueprint(user.bp)
|
||||
app.register_blueprint(history.bp)
|
||||
|
||||
logging.basicConfig(filename='brecal.log', level=logging.DEBUG, format='%(asctime)s | %(name)s | %(levelname)s | %(message)s')
|
||||
logging.basicConfig(filename='brecaltest.log', level=logging.DEBUG, format='%(asctime)s | %(name)s | %(levelname)s | %(message)s')
|
||||
local_db.initPool(os.path.dirname(app.instance_path))
|
||||
logging.info('App started')
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user