fixed merge
This commit is contained in:
commit
1dfa4e7b5e
@ -1,7 +1,7 @@
|
||||
|
||||
//----------------------
|
||||
// <auto-generated>
|
||||
// Generated REST API Client Code Generator v1.9.8.0 on 31.03.2024 21:55:59
|
||||
// Generated REST API Client Code Generator v1.9.8.0 on 28.03.2024 17:58:20
|
||||
// Using the tool OpenAPI Generator v7.4.0
|
||||
// </auto-generated>
|
||||
//----------------------
|
||||
@ -1544,9 +1544,10 @@ namespace BreCalClient.misc.Api
|
||||
/// This endpoint returns a list of changes made to the specific shipcall
|
||||
/// </remarks>
|
||||
/// <exception cref="BreCalClient.misc.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="shipcallId">**Id of ship call**. *Example: 52*. Id given in ship call list</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>List<History></returns>
|
||||
List<History> HistoryGet(int operationIndex = 0);
|
||||
List<History> HistoryGet(int shipcallId, int operationIndex = 0);
|
||||
/// <summary>
|
||||
/// History data
|
||||
/// </summary>
|
||||
@ -1554,9 +1555,10 @@ namespace BreCalClient.misc.Api
|
||||
/// This endpoint returns a list of changes made to the specific shipcall
|
||||
/// </remarks>
|
||||
/// <exception cref="BreCalClient.misc.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="shipcallId">**Id of ship call**. *Example: 52*. Id given in ship call list</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of List<History></returns>
|
||||
ApiResponse<List<History>> HistoryGetWithHttpInfo(int operationIndex = 0);
|
||||
ApiResponse<List<History>> HistoryGetWithHttpInfo(int shipcallId, int operationIndex = 0);
|
||||
/// <summary>
|
||||
/// Gets a list of notifications pursuant to a specified participant and ship call
|
||||
/// </summary>
|
||||
@ -1638,10 +1640,11 @@ namespace BreCalClient.misc.Api
|
||||
/// This endpoint returns a list of changes made to the specific shipcall
|
||||
/// </remarks>
|
||||
/// <exception cref="BreCalClient.misc.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="shipcallId">**Id of ship call**. *Example: 52*. Id given in ship call list</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of List<History></returns>
|
||||
System.Threading.Tasks.Task<List<History>> HistoryGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
System.Threading.Tasks.Task<List<History>> HistoryGetAsync(int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// History data
|
||||
/// </summary>
|
||||
@ -1649,10 +1652,11 @@ namespace BreCalClient.misc.Api
|
||||
/// This endpoint returns a list of changes made to the specific shipcall
|
||||
/// </remarks>
|
||||
/// <exception cref="BreCalClient.misc.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="shipcallId">**Id of ship call**. *Example: 52*. Id given in ship call list</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (List<History>)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<List<History>>> HistoryGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
System.Threading.Tasks.Task<ApiResponse<List<History>>> HistoryGetWithHttpInfoAsync(int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// Gets a list of notifications pursuant to a specified participant and ship call
|
||||
/// </summary>
|
||||
@ -1922,20 +1926,22 @@ namespace BreCalClient.misc.Api
|
||||
/// History data This endpoint returns a list of changes made to the specific shipcall
|
||||
/// </summary>
|
||||
/// <exception cref="BreCalClient.misc.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="shipcallId">**Id of ship call**. *Example: 52*. Id given in ship call list</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>List<History></returns>
|
||||
public List<History> HistoryGet(int operationIndex = 0)
|
||||
public List<History> HistoryGet(int shipcallId, int operationIndex = 0)
|
||||
{
|
||||
BreCalClient.misc.Client.ApiResponse<List<History>> localVarResponse = HistoryGetWithHttpInfo();
|
||||
BreCalClient.misc.Client.ApiResponse<List<History>> localVarResponse = HistoryGetWithHttpInfo(shipcallId);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
/// <summary>
|
||||
/// History data This endpoint returns a list of changes made to the specific shipcall
|
||||
/// </summary>
|
||||
/// <exception cref="BreCalClient.misc.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="shipcallId">**Id of ship call**. *Example: 52*. Id given in ship call list</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of List<History></returns>
|
||||
public BreCalClient.misc.Client.ApiResponse<List<History>> HistoryGetWithHttpInfo(int operationIndex = 0)
|
||||
public BreCalClient.misc.Client.ApiResponse<List<History>> HistoryGetWithHttpInfo(int shipcallId, int operationIndex = 0)
|
||||
{
|
||||
BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions();
|
||||
string[] _contentTypes = new string[] {
|
||||
@ -1954,6 +1960,7 @@ namespace BreCalClient.misc.Api
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "shipcall_id", shipcallId));
|
||||
localVarRequestOptions.Operation = "StaticApi.HistoryGet";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
// authentication (ApiKey) required
|
||||
@ -1977,22 +1984,24 @@ namespace BreCalClient.misc.Api
|
||||
/// History data This endpoint returns a list of changes made to the specific shipcall
|
||||
/// </summary>
|
||||
/// <exception cref="BreCalClient.misc.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="shipcallId">**Id of ship call**. *Example: 52*. Id given in ship call list</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of List<History></returns>
|
||||
public async System.Threading.Tasks.Task<List<History>> HistoryGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
public async System.Threading.Tasks.Task<List<History>> HistoryGetAsync(int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
BreCalClient.misc.Client.ApiResponse<List<History>> localVarResponse = await HistoryGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
BreCalClient.misc.Client.ApiResponse<List<History>> localVarResponse = await HistoryGetWithHttpInfoAsync(shipcallId, operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
/// <summary>
|
||||
/// History data This endpoint returns a list of changes made to the specific shipcall
|
||||
/// </summary>
|
||||
/// <exception cref="BreCalClient.misc.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="shipcallId">**Id of ship call**. *Example: 52*. Id given in ship call list</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (List<History>)</returns>
|
||||
public async System.Threading.Tasks.Task<BreCalClient.misc.Client.ApiResponse<List<History>>> HistoryGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
public async System.Threading.Tasks.Task<BreCalClient.misc.Client.ApiResponse<List<History>>> HistoryGetWithHttpInfoAsync(int shipcallId, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
BreCalClient.misc.Client.RequestOptions localVarRequestOptions = new BreCalClient.misc.Client.RequestOptions();
|
||||
string[] _contentTypes = new string[] {
|
||||
@ -2011,6 +2020,7 @@ namespace BreCalClient.misc.Api
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
localVarRequestOptions.QueryParameters.Add(BreCalClient.misc.Client.ClientUtils.ParameterToMultiMap("", "shipcall_id", shipcallId));
|
||||
localVarRequestOptions.Operation = "StaticApi.HistoryGet";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
// authentication (ApiKey) required
|
||||
@ -9242,13 +9252,9 @@ namespace BreCalClient.misc.Model
|
||||
hashCode = (hashCode * 59) + this.PierSide.GetHashCode();
|
||||
}
|
||||
hashCode = (hashCode * 59) + this.ParticipantType.GetHashCode();
|
||||
if (this.Ata != null)
|
||||
if (this.AtaAtd != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.Ata.GetHashCode();
|
||||
}
|
||||
if (this.Atd != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.Atd.GetHashCode();
|
||||
hashCode = (hashCode * 59) + this.AtaAtd.GetHashCode();
|
||||
}
|
||||
if (this.IntervalEnd != null)
|
||||
{
|
||||
|
||||
@ -435,6 +435,13 @@ paths:
|
||||
tags:
|
||||
- static
|
||||
operationId: historyGet
|
||||
parameters:
|
||||
- name: shipcall_id
|
||||
in: query
|
||||
required: true
|
||||
description: '**Id of ship call**. *Example: 52*. Id given in ship call list'
|
||||
schema:
|
||||
$ref: '#/components/schemas/shipcallId'
|
||||
responses:
|
||||
'200':
|
||||
description: list of history entries
|
||||
|
||||
@ -34,6 +34,8 @@
|
||||
<None Remove="Resources\delete2.png" />
|
||||
<None Remove="Resources\edit.png" />
|
||||
<None Remove="Resources\emergency_stop_button.png" />
|
||||
<None Remove="Resources\lock.png" />
|
||||
<None Remove="Resources\lock_open.png" />
|
||||
<None Remove="Resources\logo_bremen_calling.png" />
|
||||
<None Remove="Resources\ship2.png" />
|
||||
<None Remove="Resources\sign_warning.png" />
|
||||
@ -87,6 +89,8 @@
|
||||
<Resource Include="Resources\delete2.png" />
|
||||
<Resource Include="Resources\edit.png" />
|
||||
<Resource Include="Resources\emergency_stop_button.png" />
|
||||
<Resource Include="Resources\lock.png" />
|
||||
<Resource Include="Resources\lock_open.png" />
|
||||
<Resource Include="Resources\logo_bremen_calling.png" />
|
||||
<Resource Include="Resources\ship2.png" />
|
||||
<Resource Include="Resources\sign_warning.png" />
|
||||
@ -106,11 +110,11 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Extended.Wpf.Toolkit" Version="4.5.1" />
|
||||
<PackageReference Include="Extended.Wpf.Toolkit" Version="4.6.0" />
|
||||
<PackageReference Include="JsonSubTypes" Version="2.0.1" />
|
||||
<PackageReference Include="log4net" Version="2.0.15" />
|
||||
<PackageReference Include="log4net" Version="2.0.17" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="Polly" Version="8.2.0" />
|
||||
<PackageReference Include="Polly" Version="8.3.1" />
|
||||
<PackageReference Include="RestSharp" Version="110.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
extensions: designer.cs generated.cs
|
||||
extensions: .cs .cpp .h
|
||||
// Copyright (c) 2023 schick Informatik
|
||||
// Copyright (c) 2024- schick Informatik
|
||||
// Description:
|
||||
//
|
||||
|
||||
extensions: .aspx .ascx
|
||||
<%--
|
||||
Copyright (c) 2023 schick Informatik
|
||||
Copyright (c) 2024- schick Informatik
|
||||
--%>
|
||||
extensions: .vb
|
||||
'Sample license text.
|
||||
|
||||
@ -44,9 +44,9 @@
|
||||
</Grid>
|
||||
|
||||
<Label Content="ETA" x:Name="labelETA" Grid.Column="0" Grid.Row="1" HorizontalContentAlignment="Right" FontWeight="Bold"/>
|
||||
<xctk:DateTimePicker x:Name="datePickerETA" Grid.Column="1" Grid.Row="1" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm"/>
|
||||
<xctk:DateTimePicker x:Name="datePickerETA" Grid.Column="1" Grid.Row="1" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm" ValueChanged="datePickerETA_ValueChanged"/>
|
||||
<Label Content="{x:Static p:Resources.textBerth}" Grid.Column="0" Grid.Row="2" HorizontalContentAlignment="Right" FontWeight="Bold"/>
|
||||
<ComboBox Name="comboBoxArrivalBerth" Grid.Column="1" Grid.Row="2" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id">
|
||||
<ComboBox Name="comboBoxArrivalBerth" Grid.Column="1" Grid.Row="2" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id" SelectionChanged="comboBoxArrivalBerth_SelectionChanged">
|
||||
|
||||
</ComboBox>
|
||||
<Label Content="{x:Static p:Resources.textPierside}" Grid.Column="0" Grid.Row="3" HorizontalContentAlignment="Right" />
|
||||
@ -61,8 +61,8 @@
|
||||
</ComboBox>
|
||||
<Label Content="{x:Static p:Resources.textBerthRemarks}" Grid.Column="0" Grid.Row="4" HorizontalContentAlignment="Right" />
|
||||
<TextBox x:Name="textBoxBerthRemarks" Grid.Column="1" Grid.Row="4" Margin="2" Grid.RowSpan="2" VerticalContentAlignment="Top" AcceptsReturn="True" MaxLength="512"/>
|
||||
<Label Content="{x:Static p:Resources.textDraft}" Grid.Column="0" Grid.Row="6" HorizontalContentAlignment="Right" />
|
||||
<xctk:DoubleUpDown x:Name="doubleUpDownDraft" Grid.Column="1" Grid.Row="6" Margin="2" FormatString="N2" Minimum="0" Maximum="50" MaxLength="5"/>
|
||||
<Label Content="{x:Static p:Resources.textDraft}" Grid.Column="0" Grid.Row="6" HorizontalContentAlignment="Right" FontWeight="Bold" />
|
||||
<xctk:DoubleUpDown x:Name="doubleUpDownDraft" Grid.Column="1" Grid.Row="6" Margin="2" FormatString="N2" Minimum="0" Maximum="50" MaxLength="5" ValueChanged="doubleUpDownDraft_ValueChanged"/>
|
||||
<Label Content="{x:Static p:Resources.textTidalWindow}" FontWeight="DemiBold" Grid.Column="0" Grid.Row="7" HorizontalContentAlignment="Right"/>
|
||||
<Label Content="{x:Static p:Resources.textFrom}" Grid.Column="0" Grid.Row="8" HorizontalContentAlignment="Right"/>
|
||||
<Label Content="{x:Static p:Resources.textTo}" Grid.Column="0" Grid.Row="9" HorizontalContentAlignment="Right"/>
|
||||
|
||||
@ -14,6 +14,12 @@ namespace BreCalClient
|
||||
/// </summary>
|
||||
public partial class EditTimesAgencyIncomingControl : Window, IEditTimesControl
|
||||
{
|
||||
#region Fields
|
||||
|
||||
bool _editing = false;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Construction
|
||||
|
||||
public EditTimesAgencyIncomingControl()
|
||||
@ -55,10 +61,10 @@ namespace BreCalClient
|
||||
allowBSMD = p.IsFlagSet(ParticipantFlag.ALLOW_BSMD);
|
||||
}
|
||||
|
||||
bool enableControls = (this.Times.ParticipantId == App.Participant.Id) ||
|
||||
_editing = (this.Times.ParticipantId == App.Participant.Id) ||
|
||||
(App.Participant.IsTypeFlagSet(ParticipantType.BSMD) && allowBSMD);
|
||||
|
||||
this.EnableControls(enableControls);
|
||||
this.EnableControls();
|
||||
|
||||
}
|
||||
|
||||
@ -240,37 +246,50 @@ namespace BreCalClient
|
||||
}
|
||||
}
|
||||
|
||||
private void EnableControls(bool isEnabled)
|
||||
private void EnableControls()
|
||||
{
|
||||
this.datePickerETA.IsEnabled = isEnabled;
|
||||
this.comboBoxArrivalBerth.IsEnabled = isEnabled;
|
||||
this.comboBoxPierside.IsEnabled = isEnabled;
|
||||
this.textBoxBerthRemarks.IsEnabled = isEnabled;
|
||||
this.doubleUpDownDraft.IsEnabled = isEnabled;
|
||||
this.datePickerTidalWindowFrom.IsEnabled = isEnabled;
|
||||
this.datePickerTidalWindowTo.IsEnabled = isEnabled;
|
||||
this.checkBoxCanceled.IsEnabled = isEnabled;
|
||||
this.datePickerETA.IsEnabled = _editing;
|
||||
this.comboBoxArrivalBerth.IsEnabled = _editing;
|
||||
this.comboBoxPierside.IsEnabled = _editing;
|
||||
this.textBoxBerthRemarks.IsEnabled = _editing;
|
||||
this.doubleUpDownDraft.IsEnabled = _editing;
|
||||
this.datePickerTidalWindowFrom.IsEnabled = _editing;
|
||||
this.datePickerTidalWindowTo.IsEnabled = _editing;
|
||||
this.checkBoxCanceled.IsEnabled = _editing;
|
||||
|
||||
this.checkBoxAnchored.IsEnabled = isEnabled;
|
||||
this.checkBoxAnchored.IsEnabled = _editing;
|
||||
|
||||
this.comboBoxTug.IsEnabled = isEnabled;
|
||||
this.integerUpDownRecommendedTugs.IsEnabled = isEnabled;
|
||||
this.comboBoxTug.IsEnabled = _editing;
|
||||
this.integerUpDownRecommendedTugs.IsEnabled = _editing;
|
||||
|
||||
this.comboBoxPilot.IsEnabled = isEnabled;
|
||||
this.comboBoxMooring.IsEnabled = isEnabled;
|
||||
this.checkBoxMooredLock.IsEnabled = isEnabled;
|
||||
this.comboBoxTerminal.IsEnabled = isEnabled;
|
||||
this.checkBoxBunkering.IsEnabled = isEnabled;
|
||||
this.checkBoxReplenishingTerminal.IsEnabled = isEnabled;
|
||||
this.checkBoxReplenishingLock.IsEnabled = isEnabled;
|
||||
this.textBoxRemarks.IsEnabled = isEnabled;
|
||||
this.comboBoxPilot.IsEnabled = _editing;
|
||||
this.comboBoxMooring.IsEnabled = _editing;
|
||||
this.checkBoxMooredLock.IsEnabled = _editing;
|
||||
this.comboBoxTerminal.IsEnabled = _editing;
|
||||
this.checkBoxBunkering.IsEnabled = _editing;
|
||||
this.checkBoxReplenishingTerminal.IsEnabled = _editing;
|
||||
this.checkBoxReplenishingLock.IsEnabled = _editing;
|
||||
this.textBoxRemarks.IsEnabled = _editing;
|
||||
|
||||
this.buttonOK.IsEnabled = isEnabled;
|
||||
CheckOKButton();
|
||||
}
|
||||
|
||||
private bool RequiredFieldsSet()
|
||||
{
|
||||
bool areSet = this.datePickerETA.Value.HasValue &&
|
||||
this.doubleUpDownDraft.Value.HasValue &&
|
||||
this.comboBoxArrivalBerth.SelectedIndex >= 0;
|
||||
return areSet;
|
||||
}
|
||||
|
||||
private void CheckOKButton()
|
||||
{
|
||||
this.buttonOK.IsEnabled = _editing && RequiredFieldsSet();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region context menu handlers
|
||||
#region event handlers
|
||||
|
||||
private void contextMenuItemArrivalBerth_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
@ -307,6 +326,21 @@ namespace BreCalClient
|
||||
this.comboBoxPierside.SelectedIndex = -1;
|
||||
}
|
||||
|
||||
private void doubleUpDownDraft_ValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
||||
{
|
||||
this.CheckOKButton();
|
||||
}
|
||||
|
||||
private void datePickerETA_ValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
||||
{
|
||||
this.CheckOKButton();
|
||||
}
|
||||
|
||||
private void comboBoxArrivalBerth_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||
{
|
||||
this.CheckOKButton();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
@ -40,10 +40,9 @@
|
||||
</Grid>
|
||||
|
||||
<Label Content="ETD" x:Name="labelETD" Grid.Column="0" Grid.Row="1" HorizontalContentAlignment="Right" FontWeight="Bold"/>
|
||||
<xctk:DateTimePicker x:Name="datePickerETD" Grid.Column="1" Grid.Row="1" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm"/>
|
||||
<xctk:DateTimePicker x:Name="datePickerETD" Grid.Column="1" Grid.Row="1" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm" ValueChanged="datePickerETD_ValueChanged"/>
|
||||
<Label Content="{x:Static p:Resources.textBerth}" Grid.Column="0" Grid.Row="2" HorizontalContentAlignment="Right" FontWeight="Bold"/>
|
||||
<ComboBox Name="comboBoxDepartureBerth" Grid.Column="1" Grid.Row="2" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id">
|
||||
</ComboBox>
|
||||
<ComboBox Name="comboBoxDepartureBerth" Grid.Column="1" Grid.Row="2" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id" SelectionChanged="comboBoxDepartureBerth_SelectionChanged" />
|
||||
<Label Content="{x:Static p:Resources.textPierside}" Grid.Column="0" Grid.Row="3" HorizontalContentAlignment="Right" />
|
||||
<ComboBox x:Name="comboBoxPierside" Grid.Column="1" Grid.Row="3" Margin="2" >
|
||||
<ComboBoxItem Content="{x:Static p:Resources.textPort}" />
|
||||
@ -56,8 +55,8 @@
|
||||
</ComboBox>
|
||||
<Label Content="{x:Static p:Resources.textBerthRemarks}" Grid.Column="0" Grid.Row="4" HorizontalContentAlignment="Right" />
|
||||
<TextBox x:Name="textBoxBerthRemarks" Grid.Column="1" Grid.Row="4" Margin="2" Grid.RowSpan="2" VerticalContentAlignment="Top" AcceptsReturn="True" MaxLength="512"/>
|
||||
<Label Content="{x:Static p:Resources.textDraft}" Grid.Column="0" Grid.Row="6" HorizontalContentAlignment="Right" />
|
||||
<xctk:DoubleUpDown x:Name="doubleUpDownDraft" Grid.Column="1" Grid.Row="6" Margin="2" FormatString="N2" Minimum="0" Maximum="50" MaxLength="5"/>
|
||||
<Label Content="{x:Static p:Resources.textDraft}" Grid.Column="0" Grid.Row="6" HorizontalContentAlignment="Right" FontWeight="Bold"/>
|
||||
<xctk:DoubleUpDown x:Name="doubleUpDownDraft" Grid.Column="1" Grid.Row="6" Margin="2" FormatString="N2" Minimum="0" Maximum="50" MaxLength="5" ValueChanged="doubleUpDownDraft_ValueChanged"/>
|
||||
<Label Content="{x:Static p:Resources.textTidalWindow}" FontWeight="DemiBold" Grid.Column="0" Grid.Row="7" HorizontalContentAlignment="Right"/>
|
||||
<Label Content="{x:Static p:Resources.textFrom}" Grid.Column="0" Grid.Row="8" HorizontalContentAlignment="Right"/>
|
||||
<Label Content="{x:Static p:Resources.textTo}" Grid.Column="0" Grid.Row="9" HorizontalContentAlignment="Right"/>
|
||||
|
||||
@ -15,6 +15,12 @@ namespace BreCalClient
|
||||
public partial class EditTimesAgencyOutgoingControl : Window, IEditTimesControl
|
||||
{
|
||||
|
||||
#region Fields
|
||||
|
||||
bool _editing = false;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Construction
|
||||
|
||||
public EditTimesAgencyOutgoingControl()
|
||||
@ -56,10 +62,10 @@ namespace BreCalClient
|
||||
allowBSMD = p.IsFlagSet(ParticipantFlag.ALLOW_BSMD);
|
||||
}
|
||||
|
||||
bool enableControls = (this.Times.ParticipantId == App.Participant.Id) ||
|
||||
_editing = (this.Times.ParticipantId == App.Participant.Id) ||
|
||||
(App.Participant.IsTypeFlagSet(ParticipantType.BSMD) && allowBSMD);
|
||||
|
||||
this.EnableControls(enableControls);
|
||||
this.EnableControls();
|
||||
|
||||
}
|
||||
|
||||
@ -232,33 +238,46 @@ namespace BreCalClient
|
||||
}
|
||||
}
|
||||
|
||||
private void EnableControls(bool isEnabled)
|
||||
private void EnableControls()
|
||||
{
|
||||
this.datePickerETD.IsEnabled = isEnabled;
|
||||
this.comboBoxDepartureBerth.IsEnabled = isEnabled;
|
||||
this.comboBoxPierside.IsEnabled = isEnabled;
|
||||
this.textBoxBerthRemarks.IsEnabled = isEnabled;
|
||||
this.doubleUpDownDraft.IsEnabled = isEnabled;
|
||||
this.datePickerTidalWindowFrom.IsEnabled = isEnabled;
|
||||
this.datePickerTidalWindowTo.IsEnabled = isEnabled;
|
||||
this.checkBoxCanceled.IsEnabled = isEnabled;
|
||||
this.datePickerETD.IsEnabled = _editing;
|
||||
this.comboBoxDepartureBerth.IsEnabled = _editing;
|
||||
this.comboBoxPierside.IsEnabled = _editing;
|
||||
this.textBoxBerthRemarks.IsEnabled = _editing;
|
||||
this.doubleUpDownDraft.IsEnabled = _editing;
|
||||
this.datePickerTidalWindowFrom.IsEnabled = _editing;
|
||||
this.datePickerTidalWindowTo.IsEnabled = _editing;
|
||||
this.checkBoxCanceled.IsEnabled = _editing;
|
||||
|
||||
|
||||
this.comboBoxTug.IsEnabled = isEnabled;
|
||||
this.integerUpDownRecommendedTugs.IsEnabled = isEnabled;
|
||||
this.comboBoxPilot.IsEnabled = isEnabled;
|
||||
this.comboBoxMooring.IsEnabled = isEnabled;
|
||||
this.checkBoxMooredLock.IsEnabled = isEnabled;
|
||||
this.comboBoxTerminal.IsEnabled = isEnabled;
|
||||
this.checkBoxRainsensitiveCargo.IsEnabled = isEnabled;
|
||||
this.textBoxRemarks.IsEnabled = isEnabled;
|
||||
this.comboBoxTug.IsEnabled = _editing;
|
||||
this.integerUpDownRecommendedTugs.IsEnabled = _editing;
|
||||
this.comboBoxPilot.IsEnabled = _editing;
|
||||
this.comboBoxMooring.IsEnabled = _editing;
|
||||
this.checkBoxMooredLock.IsEnabled = _editing;
|
||||
this.comboBoxTerminal.IsEnabled = _editing;
|
||||
this.checkBoxRainsensitiveCargo.IsEnabled = _editing;
|
||||
this.textBoxRemarks.IsEnabled = _editing;
|
||||
|
||||
this.buttonOK.IsEnabled = isEnabled;
|
||||
CheckOKButton();
|
||||
}
|
||||
|
||||
private bool RequiredFieldsSet()
|
||||
{
|
||||
bool areSet = this.datePickerETD.Value.HasValue &&
|
||||
this.doubleUpDownDraft.Value.HasValue &&
|
||||
this.comboBoxDepartureBerth.SelectedIndex >= 0;
|
||||
return areSet;
|
||||
}
|
||||
|
||||
private void CheckOKButton()
|
||||
{
|
||||
this.buttonOK.IsEnabled = _editing && RequiredFieldsSet();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region context menu handlers
|
||||
#region event handlers
|
||||
|
||||
private void contextMenuItemClearTug_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
@ -295,6 +314,21 @@ namespace BreCalClient
|
||||
this.comboBoxPierside.SelectedIndex = -1;
|
||||
}
|
||||
|
||||
private void datePickerETD_ValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
||||
{
|
||||
CheckOKButton();
|
||||
}
|
||||
|
||||
private void comboBoxDepartureBerth_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||
{
|
||||
CheckOKButton();
|
||||
}
|
||||
|
||||
private void doubleUpDownDraft_ValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
||||
{
|
||||
CheckOKButton();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
<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"/>
|
||||
<xctk:DateTimePicker x:Name="datePickerETD" Grid.Column="1" Grid.Row="1" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm"/>
|
||||
<xctk:DateTimePicker x:Name="datePickerETD" Grid.Column="1" Grid.Row="1" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm" ValueChanged="datePickerETD_ValueChanged"/>
|
||||
|
||||
<Label Content="{x:Static p:Resources.textTerminal}" Grid.Column="0" Grid.Row="2" HorizontalContentAlignment="Right"/>
|
||||
<ComboBox Name="comboBoxTerminal" Grid.Column="1" Grid.Row="2" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id">
|
||||
@ -57,11 +57,11 @@
|
||||
</ComboBox>
|
||||
|
||||
<Label Content="{x:Static p:Resources.textBerth}" Grid.Column="0" Grid.Row="3" HorizontalContentAlignment="Right" FontWeight="Bold"/>
|
||||
<ComboBox Name="comboBoxDepartureBerth" Grid.Column="1" Grid.Row="3" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id">
|
||||
<ComboBox Name="comboBoxDepartureBerth" Grid.Column="1" Grid.Row="3" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id" SelectionChanged="comboBoxDepartureBerth_SelectionChanged">
|
||||
</ComboBox>
|
||||
|
||||
<Label Content="{x:Static p:Resources.textDraft}" Grid.Column="0" Grid.Row="4" HorizontalContentAlignment="Right" />
|
||||
<xctk:DoubleUpDown x:Name="doubleUpDownDraft" Grid.Column="1" Grid.Row="4" Margin="2" FormatString="N2" Minimum="0" Maximum="50" MaxLength="5"/>
|
||||
<Label Content="{x:Static p:Resources.textDraft}" Grid.Column="0" Grid.Row="4" HorizontalContentAlignment="Right" FontWeight="Bold"/>
|
||||
<xctk:DoubleUpDown x:Name="doubleUpDownDraft" Grid.Column="1" Grid.Row="4" Margin="2" FormatString="N2" Minimum="0" Maximum="50" MaxLength="5" ValueChanged="doubleUpDownDraft_ValueChanged"/>
|
||||
<Label Content="{x:Static p:Resources.textTidalWindow}" FontWeight="DemiBold" Grid.Column="0" Grid.Row="5" HorizontalContentAlignment="Right"/>
|
||||
<Label Content="{x:Static p:Resources.textFrom}" Grid.Column="0" Grid.Row="6" HorizontalContentAlignment="Right"/>
|
||||
<Label Content="{x:Static p:Resources.textTo}" Grid.Column="0" Grid.Row="7" HorizontalContentAlignment="Right"/>
|
||||
@ -76,11 +76,10 @@
|
||||
<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"/>
|
||||
<xctk:DateTimePicker x:Name="datePickerETA" Grid.Column="1" Grid.Row="9" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm"/>
|
||||
<xctk:DateTimePicker x:Name="datePickerETA" Grid.Column="1" Grid.Row="9" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm" ValueChanged="datePickerETA_ValueChanged"/>
|
||||
|
||||
<Label Content="{x:Static p:Resources.textBerth}" Grid.Column="0" Grid.Row="10" HorizontalContentAlignment="Right" FontWeight="Bold"/>
|
||||
<ComboBox Name="comboBoxArrivalBerth" Grid.Column="1" Grid.Row="10" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id">
|
||||
</ComboBox>
|
||||
<ComboBox Name="comboBoxArrivalBerth" Grid.Column="1" Grid.Row="10" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id" SelectionChanged="comboBoxArrivalBerth_SelectionChanged" />
|
||||
<Label Content="{x:Static p:Resources.textPierside}" Grid.Column="0" Grid.Row="11" HorizontalContentAlignment="Right" />
|
||||
<ComboBox x:Name="comboBoxPiersideArrival" Grid.Column="1" Grid.Row="11" Margin="2" >
|
||||
<ComboBoxItem Content="{x:Static p:Resources.textPort}" />
|
||||
|
||||
@ -14,6 +14,11 @@ namespace BreCalClient
|
||||
/// </summary>
|
||||
public partial class EditTimesAgencyShiftingControl : Window, IEditTimesControl
|
||||
{
|
||||
#region Fields
|
||||
|
||||
bool _editing = false;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Construction
|
||||
|
||||
@ -57,10 +62,10 @@ namespace BreCalClient
|
||||
allowBSMD = p.IsFlagSet(ParticipantFlag.ALLOW_BSMD);
|
||||
}
|
||||
|
||||
bool enableControls = (this.Times.ParticipantId == App.Participant.Id) ||
|
||||
_editing = (this.Times.ParticipantId == App.Participant.Id) ||
|
||||
(App.Participant.IsTypeFlagSet(ParticipantType.BSMD) && allowBSMD);
|
||||
|
||||
this.EnableControls(enableControls);
|
||||
this.EnableControls();
|
||||
|
||||
}
|
||||
|
||||
@ -247,35 +252,50 @@ namespace BreCalClient
|
||||
}
|
||||
}
|
||||
|
||||
private void EnableControls(bool isEnabled)
|
||||
private void EnableControls()
|
||||
{
|
||||
this.datePickerETD.IsEnabled = isEnabled;
|
||||
this.comboBoxArrivalBerth.IsEnabled = isEnabled;
|
||||
this.doubleUpDownDraft.IsEnabled = isEnabled;
|
||||
this.datePickerTidalWindowFrom.IsEnabled = isEnabled;
|
||||
this.datePickerTidalWindowTo.IsEnabled = isEnabled;
|
||||
this.datePickerETA.IsEnabled = isEnabled;
|
||||
this.comboBoxDepartureBerth.IsEnabled = isEnabled;
|
||||
this.comboBoxPiersideArrival.IsEnabled = isEnabled;
|
||||
this.textBoxBerthRemarksArrival.IsEnabled = isEnabled;
|
||||
this.checkBoxCanceled.IsEnabled = isEnabled;
|
||||
this.datePickerETD.IsEnabled = _editing;
|
||||
this.comboBoxArrivalBerth.IsEnabled = _editing;
|
||||
this.doubleUpDownDraft.IsEnabled = _editing;
|
||||
this.datePickerTidalWindowFrom.IsEnabled = _editing;
|
||||
this.datePickerTidalWindowTo.IsEnabled = _editing;
|
||||
this.datePickerETA.IsEnabled = _editing;
|
||||
this.comboBoxDepartureBerth.IsEnabled = _editing;
|
||||
this.comboBoxPiersideArrival.IsEnabled = _editing;
|
||||
this.textBoxBerthRemarksArrival.IsEnabled = _editing;
|
||||
this.checkBoxCanceled.IsEnabled = _editing;
|
||||
|
||||
|
||||
this.comboBoxTug.IsEnabled = isEnabled;
|
||||
this.integerUpDownRecommendedTugs.IsEnabled = isEnabled;
|
||||
this.comboBoxPilot.IsEnabled = isEnabled;
|
||||
this.comboBoxMooring.IsEnabled = isEnabled;
|
||||
this.checkBoxMooredLock.IsEnabled = isEnabled;
|
||||
this.comboBoxTerminal.IsEnabled = isEnabled;
|
||||
this.checkBoxRainsensitiveCargo.IsEnabled = isEnabled;
|
||||
this.textBoxRemarks.IsEnabled = isEnabled;
|
||||
this.comboBoxTug.IsEnabled = _editing;
|
||||
this.integerUpDownRecommendedTugs.IsEnabled = _editing;
|
||||
this.comboBoxPilot.IsEnabled = _editing;
|
||||
this.comboBoxMooring.IsEnabled = _editing;
|
||||
this.checkBoxMooredLock.IsEnabled = _editing;
|
||||
this.comboBoxTerminal.IsEnabled = _editing;
|
||||
this.checkBoxRainsensitiveCargo.IsEnabled = _editing;
|
||||
this.textBoxRemarks.IsEnabled = _editing;
|
||||
|
||||
this.buttonOK.IsEnabled = isEnabled;
|
||||
CheckOKButton();
|
||||
}
|
||||
|
||||
private bool RequiredFieldsSet()
|
||||
{
|
||||
bool areSet = this.datePickerETA.Value.HasValue &&
|
||||
this.datePickerETD.Value.HasValue &&
|
||||
this.doubleUpDownDraft.Value.HasValue &&
|
||||
(this.comboBoxArrivalBerth.SelectedIndex >= 0) &&
|
||||
(this.comboBoxDepartureBerth.SelectedIndex >= 0);
|
||||
return areSet;
|
||||
}
|
||||
|
||||
private void CheckOKButton()
|
||||
{
|
||||
this.buttonOK.IsEnabled = _editing && RequiredFieldsSet();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region context menu handlers
|
||||
#region event handlers
|
||||
|
||||
private void contextMenuItemDepartureBerth_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
@ -318,6 +338,31 @@ namespace BreCalClient
|
||||
this.comboBoxPiersideArrival.SelectedIndex = -1;
|
||||
}
|
||||
|
||||
private void datePickerETD_ValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
||||
{
|
||||
CheckOKButton();
|
||||
}
|
||||
|
||||
private void comboBoxDepartureBerth_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||
{
|
||||
CheckOKButton();
|
||||
}
|
||||
|
||||
private void doubleUpDownDraft_ValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
||||
{
|
||||
CheckOKButton();
|
||||
}
|
||||
|
||||
private void datePickerETA_ValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
||||
{
|
||||
CheckOKButton();
|
||||
}
|
||||
|
||||
private void comboBoxArrivalBerth_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||
{
|
||||
CheckOKButton();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
@ -24,6 +24,9 @@
|
||||
<RowDefinition Height="56" />
|
||||
<RowDefinition Height="28" />
|
||||
</Grid.RowDefinitions>
|
||||
<Button x:Name="buttonFixedOrder" Grid.Row="0" Grid.Column="1" Margin="2" Click="buttonFixedOrder_Click" Width="28" HorizontalAlignment="Left">
|
||||
<Image x:Name="imageFixedOrder" Source="Resources\lock_open.png" />
|
||||
</Button>
|
||||
<!-- Label Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textFixed}" /-->
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="{x:Static p:Resources.textETABerth}" HorizontalContentAlignment="Right" x:Name="labelETA" />
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textETDBerth}" HorizontalContentAlignment="Right" x:Name="labelETD" />
|
||||
|
||||
@ -4,7 +4,9 @@
|
||||
//
|
||||
|
||||
using BreCalClient.misc.Model;
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace BreCalClient
|
||||
{
|
||||
@ -52,6 +54,14 @@ namespace BreCalClient
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void buttonFixedOrder_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
bool newValue = true;
|
||||
if (this.Times.EtaBerthFixed ?? false)
|
||||
newValue = false;
|
||||
SetLockButton(newValue);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private methods
|
||||
@ -88,12 +98,18 @@ namespace BreCalClient
|
||||
this.datePickerETDBerth.ContextMenu.IsEnabled = false;
|
||||
break;
|
||||
}
|
||||
|
||||
this.SetLockButton(this.Times.EtaBerthFixed ?? false);
|
||||
}
|
||||
|
||||
private void EnableControls()
|
||||
{
|
||||
Extensions.ParticipantType pType = (Extensions.ParticipantType) this.Times.ParticipantType;
|
||||
if (this.Times.ParticipantId != App.Participant.Id) return; // if this is not "my" entry, there is no editing!
|
||||
if (this.Times.ParticipantId != App.Participant.Id)
|
||||
{
|
||||
this.buttonFixedOrder.IsEnabled = false;
|
||||
return; // if this is not "my" entry, there is no editing!
|
||||
}
|
||||
|
||||
switch (pType)
|
||||
{
|
||||
@ -117,6 +133,20 @@ namespace BreCalClient
|
||||
this.buttonOK.IsEnabled = true;
|
||||
}
|
||||
|
||||
private void SetLockButton(bool newValue)
|
||||
{
|
||||
if (newValue)
|
||||
{
|
||||
this.Times.EtaBerthFixed = true;
|
||||
this.imageFixedOrder.Source = new BitmapImage(new Uri(@"pack://application:,,,/Resources/lock.png", UriKind.RelativeOrAbsolute));
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Times.EtaBerthFixed = false;
|
||||
this.imageFixedOrder.Source = new BitmapImage(new Uri(@"pack://application:,,,/Resources/lock_open.png", UriKind.RelativeOrAbsolute));
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region clear value event handler
|
||||
@ -143,5 +173,6 @@ namespace BreCalClient
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
32
src/BreCalClient/HistoryControl.xaml
Normal file
32
src/BreCalClient/HistoryControl.xaml
Normal file
@ -0,0 +1,32 @@
|
||||
<UserControl x:Class="BreCalClient.HistoryControl"
|
||||
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:local="clr-namespace:BreCalClient"
|
||||
xmlns:p = "clr-namespace:BreCalClient.Resources"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="46" d:DesignWidth="800">
|
||||
<Border BorderBrush="Black" BorderThickness="0 0 0 .5">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="14" />
|
||||
<RowDefinition Height="25" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width=".25*" />
|
||||
<ColumnDefinition Width=".25*" />
|
||||
<ColumnDefinition Width=".25*" />
|
||||
<ColumnDefinition Width=".25*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Row="0" Grid.Column="0" FontSize="10" FontWeight="DemiBold" Text="{x:Static p:Resources.textShip}" VerticalAlignment="Center" Foreground="Gray" />
|
||||
<TextBlock Grid.Row="0" Grid.Column="1" FontSize="10" FontWeight="DemiBold" Text="{x:Static p:Resources.textTimestamp}" VerticalAlignment="Center" Foreground="Gray"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="2" FontSize="10" FontWeight="DemiBold" Text="{x:Static p:Resources.textOperation}" VerticalAlignment="Center" Foreground="Gray"/>
|
||||
<TextBlock Grid.Row="0" Grid.Column="3" FontSize="10" FontWeight="DemiBold" Text="{x:Static p:Resources.textParticipant}" VerticalAlignment="Center" Foreground="Gray"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="0" x:Name="textBlockShip" FontWeight="DemiBold" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" x:Name="textBlockTimestamp" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="2" x:Name="textBlockOperation" />
|
||||
<TextBlock Grid.Row="1" Grid.Column="3" x:Name="textBlockParticipant" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</UserControl>
|
||||
27
src/BreCalClient/HistoryControl.xaml.cs
Normal file
27
src/BreCalClient/HistoryControl.xaml.cs
Normal file
@ -0,0 +1,27 @@
|
||||
// Copyright (c) 2024- schick Informatik
|
||||
// Description: display single history element (later shown in a list)
|
||||
//
|
||||
|
||||
using BreCalClient.misc.Model;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace BreCalClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for HistoryControl.xaml
|
||||
/// </summary>
|
||||
public partial class HistoryControl : UserControl
|
||||
{
|
||||
public HistoryControl(string ship, History history)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.textBlockOperation.Text = $"{history.Operation} on {history.Type}";
|
||||
this.textBlockShip.Text = ship;
|
||||
if(BreCalLists.ParticipantLookupDict.ContainsKey(history.ParticipantId))
|
||||
this.textBlockParticipant.Text = BreCalLists.ParticipantLookupDict[history.ParticipantId].Name;
|
||||
this.textBlockTimestamp.Text = history.Timestamp.ToString();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
21
src/BreCalClient/HistoryDialog.xaml
Normal file
21
src/BreCalClient/HistoryDialog.xaml
Normal file
@ -0,0 +1,21 @@
|
||||
<Window x:Class="BreCalClient.HistoryDialog"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:BreCalClient"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
|
||||
xmlns:p = "clr-namespace:BreCalClient.Resources"
|
||||
mc:Ignorable="d" Left="{local:SettingBinding W1Left}" Top="{local:SettingBinding W1Top}"
|
||||
Title="{x:Static p:Resources.textChangeHistory}" Height="450" Width="800" Loaded="Window_Loaded">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="28" />
|
||||
</Grid.RowDefinitions>
|
||||
<ScrollViewer Grid.Row="0" VerticalScrollBarVisibility="Auto" Margin="2">
|
||||
<StackPanel x:Name="stackPanel"/>
|
||||
</ScrollViewer>
|
||||
<Button x:Name="buttonClose" Click="buttonClose_Click" Content="{x:Static p:Resources.textClose}" Width="80" Margin="2" Grid.Row="1" HorizontalAlignment="Right" />
|
||||
</Grid>
|
||||
</Window>
|
||||
81
src/BreCalClient/HistoryDialog.xaml.cs
Normal file
81
src/BreCalClient/HistoryDialog.xaml.cs
Normal file
@ -0,0 +1,81 @@
|
||||
// Copyright (c) 2024- schick Informatik
|
||||
// Description: Window to show (complete) list of current shipcall histories
|
||||
//
|
||||
|
||||
using BreCalClient.misc.Api;
|
||||
using BreCalClient.misc.Model;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows;
|
||||
|
||||
namespace BreCalClient
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for HistoryDialog.xaml
|
||||
/// </summary>
|
||||
public partial class HistoryDialog : Window
|
||||
{
|
||||
#region Fields
|
||||
|
||||
private readonly ConcurrentDictionary<int, ShipcallControlModel> _shipcalls;
|
||||
private readonly StaticApi _staticApi;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Construction
|
||||
|
||||
public HistoryDialog(ConcurrentDictionary<int, ShipcallControlModel> shipcalls, StaticApi staticApi)
|
||||
{
|
||||
InitializeComponent();
|
||||
_shipcalls = shipcalls;
|
||||
_staticApi = staticApi;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region event handler
|
||||
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
RefreshHistory();
|
||||
}
|
||||
|
||||
private void buttonClose_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region private methods
|
||||
|
||||
private async void RefreshHistory()
|
||||
{
|
||||
List<History> allHistories = new();
|
||||
foreach (int shipcall_id in _shipcalls.Keys)
|
||||
{
|
||||
List<History> shipcallHistory = await _staticApi.HistoryGetAsync(shipcall_id);
|
||||
System.Diagnostics.Trace.WriteLine($"{shipcallHistory.Count} history elements loaded for shipcall {shipcall_id}");
|
||||
allHistories.AddRange( shipcallHistory );
|
||||
}
|
||||
|
||||
// sort all entries
|
||||
allHistories.Sort((x, y) => { return y.Timestamp.CompareTo(x.Timestamp); });
|
||||
|
||||
// create controls for all entries
|
||||
foreach (History history in allHistories)
|
||||
{
|
||||
string shipname = "";
|
||||
Ship? ship = this._shipcalls[history.ShipcallId].Ship;
|
||||
if (ship != null)
|
||||
shipname = ship.Name;
|
||||
HistoryControl hc = new(shipname, history);
|
||||
this.stackPanel.Children.Add(hc);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -106,14 +106,18 @@
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="120" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="100" />
|
||||
<ColumnDefinition Width="80" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="120" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="30" />
|
||||
<ColumnDefinition Width="26" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="26" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="100" />
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid>
|
||||
@ -132,15 +136,25 @@
|
||||
</StatusBarItem>
|
||||
<Separator Grid.Column="5"/>
|
||||
<StatusBarItem Grid.Column="6">
|
||||
<Button x:Name="buttonInfo" Content="?" Click="buttonInfo_Click" Width="20" />
|
||||
<Button x:Name="buttonInfo" Content="?" Click="buttonInfo_Click" Width="20" ToolTip="{x:Static p:Resources.textInfoChangePW}"/>
|
||||
</StatusBarItem>
|
||||
<Separator Grid.Column="7"/>
|
||||
<StatusBarItem Grid.Column="8">
|
||||
<TextBlock Name="labelStatusBar"></TextBlock>
|
||||
<Button x:Name="buttonHistory" Click="buttonHistory_Click" Width="20" ToolTip="{x:Static p:Resources.textShowHistory}">
|
||||
<Image Source="./Resources/clock.png"/>
|
||||
</Button>
|
||||
</StatusBarItem>
|
||||
<Separator Grid.Column="9"/>
|
||||
<StatusBarItem Grid.Column="10">
|
||||
<ProgressBar Name="generalProgressStatus" Width="90" Height="16"/>
|
||||
<TextBlock Name="labelStatusBar"></TextBlock>
|
||||
</StatusBarItem>
|
||||
<Separator Grid.Column="11"/>
|
||||
<StatusBarItem Grid.Column="12">
|
||||
<TextBlock x:Name="labelLatestUpdate" />
|
||||
</StatusBarItem>
|
||||
<Separator Grid.Column="13"/>
|
||||
<StatusBarItem Grid.Column="14">
|
||||
<ProgressBar Name="generalProgressStatus" Width="90" Height="16" Foreground="LightGray"/>
|
||||
</StatusBarItem>
|
||||
</StatusBar>
|
||||
</Grid>
|
||||
|
||||
@ -32,8 +32,8 @@ namespace BreCalClient
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
private readonly ILog _log = LogManager.GetLogger(typeof(MainWindow));
|
||||
|
||||
private const int SHIPCALL_UPDATE_INTERVAL_SECONDS = 30;
|
||||
private const int PROGRESS_STEPS = 50;
|
||||
|
||||
#region Fields
|
||||
|
||||
@ -61,6 +61,7 @@ namespace BreCalClient
|
||||
|
||||
// private bool _filterChanged = false;
|
||||
// private bool _sequenceChanged = false;
|
||||
private HistoryDialog? _historyDialog;
|
||||
|
||||
#endregion
|
||||
|
||||
@ -112,6 +113,7 @@ namespace BreCalClient
|
||||
Trace.WriteLine("token refreshed");
|
||||
});
|
||||
RetryConfiguration.AsyncRetryPolicy = retryPolicy;
|
||||
this.generalProgressStatus.Maximum = PROGRESS_STEPS;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -349,6 +351,20 @@ namespace BreCalClient
|
||||
this.UpdateUI();
|
||||
}
|
||||
|
||||
private void buttonHistory_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if(_historyDialog == null)
|
||||
{
|
||||
_historyDialog = new HistoryDialog(_allShipcallsDict, _staticApi);
|
||||
_historyDialog.Closed += (sender, e) => { this._historyDialog = null; };
|
||||
_historyDialog.Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
_historyDialog.Activate();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region network operations
|
||||
@ -404,7 +420,8 @@ namespace BreCalClient
|
||||
this.Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
labelGeneralStatus.Text = $"Connection {ConnectionStatus.SUCCESSFUL}";
|
||||
labelGeneralStatus.Text = $"Ok";
|
||||
labelLatestUpdate.Text = $"Last update: {DateTime.Now.ToLongTimeString()}";
|
||||
generalProgressStatus.Value = 0;
|
||||
}));
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -463,7 +480,15 @@ namespace BreCalClient
|
||||
|
||||
try
|
||||
{
|
||||
await Task.Delay(TimeSpan.FromSeconds(SHIPCALL_UPDATE_INTERVAL_SECONDS), _tokenSource.Token);
|
||||
double interval = (double) SHIPCALL_UPDATE_INTERVAL_SECONDS / PROGRESS_STEPS;
|
||||
for (int i = 0; i < PROGRESS_STEPS; i++)
|
||||
{
|
||||
await Task.Delay(TimeSpan.FromSeconds(interval), _tokenSource.Token);
|
||||
this.Dispatcher.Invoke(new Action(() =>
|
||||
{
|
||||
this.generalProgressStatus.Value = i;
|
||||
}));
|
||||
}
|
||||
}
|
||||
catch(TaskCanceledException) { }
|
||||
}
|
||||
@ -498,7 +523,7 @@ namespace BreCalClient
|
||||
{
|
||||
ShipcallControl sc = new()
|
||||
{
|
||||
Height = 120,
|
||||
Height = 135,
|
||||
ShipcallControlModel = scm
|
||||
};
|
||||
sc.EditTimesRequested += Sc_EditTimesRequested;
|
||||
@ -650,6 +675,22 @@ namespace BreCalClient
|
||||
});
|
||||
}
|
||||
|
||||
if(sfm.MineOnly ?? false)
|
||||
{
|
||||
_ = _visibleControlModels.RemoveAll(x =>
|
||||
{
|
||||
bool contained = false;
|
||||
foreach(ParticipantAssignment p in x.AssignedParticipants.Values)
|
||||
{
|
||||
if(p.ParticipantId.Equals(App.Participant.Id))
|
||||
{
|
||||
contained = true; break;
|
||||
}
|
||||
}
|
||||
return !contained;
|
||||
});
|
||||
}
|
||||
|
||||
if(!_showCanceled ?? true) // canceled calls are filtered by default
|
||||
{
|
||||
_ = this._visibleControlModels.RemoveAll(x => x.Shipcall?.Canceled ?? false);
|
||||
|
||||
92
src/BreCalClient/Resources/Resources.Designer.cs
generated
92
src/BreCalClient/Resources/Resources.Designer.cs
generated
@ -60,6 +60,16 @@ namespace BreCalClient.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Byte[].
|
||||
/// </summary>
|
||||
public static byte[] _lock {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("_lock", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Byte[].
|
||||
/// </summary>
|
||||
@ -210,6 +220,16 @@ namespace BreCalClient.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Byte[].
|
||||
/// </summary>
|
||||
public static byte[] lock_open {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("lock_open", resourceCulture);
|
||||
return ((byte[])(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Byte[].
|
||||
/// </summary>
|
||||
@ -384,6 +404,15 @@ namespace BreCalClient.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Change history.
|
||||
/// </summary>
|
||||
public static string textChangeHistory {
|
||||
get {
|
||||
return ResourceManager.GetString("textChangeHistory", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Change password.
|
||||
/// </summary>
|
||||
@ -573,6 +602,15 @@ namespace BreCalClient.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Marked as a fixed order.
|
||||
/// </summary>
|
||||
public static string textFixedOrder {
|
||||
get {
|
||||
return ResourceManager.GetString("textFixedOrder", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to from.
|
||||
/// </summary>
|
||||
@ -591,6 +629,15 @@ namespace BreCalClient.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show app info and change user password.
|
||||
/// </summary>
|
||||
public static string textInfoChangePW {
|
||||
get {
|
||||
return ResourceManager.GetString("textInfoChangePW", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Interval.
|
||||
/// </summary>
|
||||
@ -636,6 +683,15 @@ namespace BreCalClient.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to mine only.
|
||||
/// </summary>
|
||||
public static string textMineOnly {
|
||||
get {
|
||||
return ResourceManager.GetString("textMineOnly", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Moored in lock.
|
||||
/// </summary>
|
||||
@ -699,6 +755,15 @@ namespace BreCalClient.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Operation.
|
||||
/// </summary>
|
||||
public static string textOperation {
|
||||
get {
|
||||
return ResourceManager.GetString("textOperation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Operations end.
|
||||
/// </summary>
|
||||
@ -726,6 +791,15 @@ namespace BreCalClient.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Participant.
|
||||
/// </summary>
|
||||
public static string textParticipant {
|
||||
get {
|
||||
return ResourceManager.GetString("textParticipant", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Participants.
|
||||
/// </summary>
|
||||
@ -924,6 +998,15 @@ namespace BreCalClient.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Show shipcall change history.
|
||||
/// </summary>
|
||||
public static string textShowHistory {
|
||||
get {
|
||||
return ResourceManager.GetString("textShowHistory", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Sort order.
|
||||
/// </summary>
|
||||
@ -960,6 +1043,15 @@ namespace BreCalClient.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Timestamp.
|
||||
/// </summary>
|
||||
public static string textTimestamp {
|
||||
get {
|
||||
return ResourceManager.GetString("textTimestamp", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to to.
|
||||
/// </summary>
|
||||
|
||||
@ -218,7 +218,7 @@
|
||||
<value>Zeitraum</value>
|
||||
</data>
|
||||
<data name="textLengthWidth" xml:space="preserve">
|
||||
<value>L/B</value>
|
||||
<value>L/B (m)</value>
|
||||
</data>
|
||||
<data name="textLogin" xml:space="preserve">
|
||||
<value>Anmelden</value>
|
||||
@ -448,4 +448,28 @@
|
||||
<data name="textTugCompany" xml:space="preserve">
|
||||
<value>Schlepper-Reederei</value>
|
||||
</data>
|
||||
<data name="textChangeHistory" xml:space="preserve">
|
||||
<value>Verlauf</value>
|
||||
</data>
|
||||
<data name="textInfoChangePW" xml:space="preserve">
|
||||
<value>App Info anzeigen und Passwort ändern</value>
|
||||
</data>
|
||||
<data name="textShowHistory" xml:space="preserve">
|
||||
<value>Änderungshistorie der Anläufe anzeigen</value>
|
||||
</data>
|
||||
<data name="textMineOnly" xml:space="preserve">
|
||||
<value>nur eigene</value>
|
||||
</data>
|
||||
<data name="textOperation" xml:space="preserve">
|
||||
<value>Vorgang</value>
|
||||
</data>
|
||||
<data name="textParticipant" xml:space="preserve">
|
||||
<value>Teilnehmer</value>
|
||||
</data>
|
||||
<data name="textTimestamp" xml:space="preserve">
|
||||
<value>Zeitpunkt</value>
|
||||
</data>
|
||||
<data name="textFixedOrder" xml:space="preserve">
|
||||
<value>Als feste Bestellung vermerkt</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -163,6 +163,9 @@
|
||||
<data name="emergency_stop_button" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>emergency_stop_button.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="lock_open" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>lock_open.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="logo_bremen_calling" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>logo_bremen_calling.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
@ -220,6 +223,9 @@
|
||||
<data name="textChangeContactInfo" xml:space="preserve">
|
||||
<value>Update contact info</value>
|
||||
</data>
|
||||
<data name="textChangeHistory" xml:space="preserve">
|
||||
<value>Change history</value>
|
||||
</data>
|
||||
<data name="textChangePassword" xml:space="preserve">
|
||||
<value>Change password</value>
|
||||
</data>
|
||||
@ -283,12 +289,18 @@
|
||||
<data name="textFixed" xml:space="preserve">
|
||||
<value>Fixed</value>
|
||||
</data>
|
||||
<data name="textFixedOrder" xml:space="preserve">
|
||||
<value>Marked as a fixed order</value>
|
||||
</data>
|
||||
<data name="textFrom" xml:space="preserve">
|
||||
<value>from</value>
|
||||
</data>
|
||||
<data name="textIncoming" xml:space="preserve">
|
||||
<value>Incoming</value>
|
||||
</data>
|
||||
<data name="textInfoChangePW" xml:space="preserve">
|
||||
<value>Show app info and change user password</value>
|
||||
</data>
|
||||
<data name="textInterval" xml:space="preserve">
|
||||
<value>Interval</value>
|
||||
</data>
|
||||
@ -304,6 +316,9 @@
|
||||
<data name="textLogin" xml:space="preserve">
|
||||
<value>Login</value>
|
||||
</data>
|
||||
<data name="textMineOnly" xml:space="preserve">
|
||||
<value>mine only</value>
|
||||
</data>
|
||||
<data name="textMooredLock" xml:space="preserve">
|
||||
<value>Moored in lock</value>
|
||||
</data>
|
||||
@ -325,6 +340,9 @@
|
||||
<data name="textOldPassword" xml:space="preserve">
|
||||
<value>Old password</value>
|
||||
</data>
|
||||
<data name="textOperation" xml:space="preserve">
|
||||
<value>Operation</value>
|
||||
</data>
|
||||
<data name="textOperationsEnd" xml:space="preserve">
|
||||
<value>Operations end</value>
|
||||
</data>
|
||||
@ -334,6 +352,9 @@
|
||||
<data name="textOutgoing" xml:space="preserve">
|
||||
<value>Outgoing</value>
|
||||
</data>
|
||||
<data name="textParticipant" xml:space="preserve">
|
||||
<value>Participant</value>
|
||||
</data>
|
||||
<data name="textParticipants" xml:space="preserve">
|
||||
<value>Participants</value>
|
||||
</data>
|
||||
@ -400,6 +421,9 @@
|
||||
<data name="textShowCancelledShipcalls" xml:space="preserve">
|
||||
<value>Show cancelled calls</value>
|
||||
</data>
|
||||
<data name="textShowHistory" xml:space="preserve">
|
||||
<value>Show shipcall change history</value>
|
||||
</data>
|
||||
<data name="textSortOrder" xml:space="preserve">
|
||||
<value>Sort order</value>
|
||||
</data>
|
||||
@ -412,6 +436,9 @@
|
||||
<data name="textTidalWindow" xml:space="preserve">
|
||||
<value>Tidal window</value>
|
||||
</data>
|
||||
<data name="textTimestamp" xml:space="preserve">
|
||||
<value>Timestamp</value>
|
||||
</data>
|
||||
<data name="textTo" xml:space="preserve">
|
||||
<value>to</value>
|
||||
</data>
|
||||
@ -475,4 +502,7 @@
|
||||
<data name="worker2" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>worker2.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="_lock" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>lock.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
BIN
src/BreCalClient/Resources/lock.png
Normal file
BIN
src/BreCalClient/Resources/lock.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
src/BreCalClient/Resources/lock_open.png
Normal file
BIN
src/BreCalClient/Resources/lock_open.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@ -74,8 +74,17 @@
|
||||
<Label Grid.Column="1" Content="{x:Static p:Resources.textTo}" />
|
||||
<xctk:DoubleUpDown x:Name="upDownShiplengthTo" Grid.Column="2" Margin="2" Minimum="0" Maximum="1000" ValueChanged="upDownShiplengthTo_ValueChanged" Value="{Binding Path=ShipLengthTo}"/>
|
||||
</Grid>
|
||||
<xctk:WatermarkTextBox x:Name="textBoxSearch" Grid.Column="2" Grid.Row="1" Margin="2" Watermark="{x:Static p:Resources.textEnterKeyword}" PreviewTextInput="textBoxSearch_PreviewTextInput"
|
||||
<Grid Grid.Column="2" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width=".5*" />
|
||||
<ColumnDefinition Width="30" />
|
||||
<ColumnDefinition Width=".5*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<xctk:WatermarkTextBox x:Name="textBoxSearch" Grid.Column="0" Margin="2" Watermark="{x:Static p:Resources.textEnterKeyword}" PreviewTextInput="textBoxSearch_PreviewTextInput"
|
||||
DataObject.Pasting="textBoxSearch_Pasting" TextChanged="textBoxSearch_TextChanged" />
|
||||
<CheckBox x:Name="checkBoxOwn" VerticalAlignment="Center" Grid.Column="1" HorizontalAlignment="Right" Margin="2" Checked="checkBoxOwn_Checked" Unchecked="checkBoxOwn_Checked" />
|
||||
<Label Content="{x:Static p:Resources.textMineOnly}" Grid.Column="2" />
|
||||
</Grid>
|
||||
<xctk:CheckComboBox x:Name="comboBoxBerths" DisplayMemberPath="Name" Grid.Column="4" Grid.Row="1" Margin="2" ItemSelectionChanged="comboBoxBerths_ItemSelectionChanged" />
|
||||
<xctk:CheckComboBox x:Name="comboBoxAgencies" DisplayMemberPath="Name" Grid.Column="6" Grid.Row="1" Margin="2" ItemSelectionChanged="comboBoxAgencies_ItemSelectionChanged" />
|
||||
</Grid>
|
||||
|
||||
@ -77,6 +77,7 @@ namespace BreCalClient
|
||||
this.textBoxSearch.Clear();
|
||||
this.upDownShiplengthFrom.Value = null;
|
||||
this.upDownShiplengthTo.Value = null;
|
||||
this.checkBoxOwn.IsChecked = false;
|
||||
}
|
||||
|
||||
|
||||
@ -108,6 +109,7 @@ namespace BreCalClient
|
||||
this.upDownShiplengthTo.Value = sfm.ShipLengthTo;
|
||||
this.datePickerETAFrom.SelectedDate = sfm.EtaFrom;
|
||||
this.datePickerETATo.SelectedDate = sfm.EtaTo;
|
||||
this.checkBoxOwn.IsChecked = sfm.MineOnly;
|
||||
|
||||
this._model = sfm;
|
||||
SearchFilterChanged?.Invoke();
|
||||
@ -194,6 +196,12 @@ namespace BreCalClient
|
||||
SearchFilterChanged?.Invoke();
|
||||
}
|
||||
|
||||
private void checkBoxOwn_Checked(object sender, System.Windows.RoutedEventArgs e)
|
||||
{
|
||||
this._model.MineOnly = this.checkBoxOwn.IsChecked;
|
||||
SearchFilterChanged?.Invoke();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
||||
@ -31,8 +31,12 @@ namespace BreCalClient
|
||||
|
||||
public double? ShipLengthTo { get; set; }
|
||||
|
||||
public bool? MineOnly { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Serialisation
|
||||
|
||||
public static SearchFilterModel? Deserialize(string json)
|
||||
{
|
||||
return (SearchFilterModel?) JsonConvert.DeserializeObject(json, typeof(SearchFilterModel));
|
||||
@ -43,5 +47,7 @@ namespace BreCalClient
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
xmlns:sets="clr-namespace:BreCalClient.Properties"
|
||||
xmlns:db="clr-namespace:BreCalClient;assembly=BreCalDevelClient"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="120" d:DesignWidth="800" Loaded="UserControl_Loaded">
|
||||
d:DesignHeight="135" d:DesignWidth="800" Loaded="UserControl_Loaded">
|
||||
<Border BorderBrush="LightGray" Margin="1" BorderThickness="1">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@ -30,7 +30,7 @@
|
||||
<RowDefinition Height=".125*"/>
|
||||
<RowDefinition Height=".125*"/>
|
||||
|
||||
<RowDefinition Height=".05*"/>
|
||||
<RowDefinition Height=".125*"/>
|
||||
<RowDefinition Height=".125*"/>
|
||||
<RowDefinition Height=".125*"/>
|
||||
</Grid.RowDefinitions>
|
||||
@ -71,6 +71,12 @@
|
||||
<Viewbox Grid.Row="3" Grid.Column="1" HorizontalAlignment="Left">
|
||||
<TextBlock x:Name="textBlockLengthWidth" Padding="0"/>
|
||||
</Viewbox>
|
||||
<Viewbox Grid.Row="4" Grid.Column="0" HorizontalAlignment="Left">
|
||||
<TextBlock Text="{x:Static p:Resources.textDraft}" Padding="0" />
|
||||
</Viewbox>
|
||||
<Viewbox Grid.Row="4" Grid.Column="1" HorizontalAlignment="Left">
|
||||
<TextBlock x:Name="textBlockDraft" Padding="0"/>
|
||||
</Viewbox>
|
||||
<Viewbox Grid.Row="5" Grid.Column="0" HorizontalAlignment="Left">
|
||||
<TextBlock Text="ETA" x:Name="labelETA"/>
|
||||
</Viewbox>
|
||||
@ -126,7 +132,7 @@
|
||||
</Border>
|
||||
<!-- MOORING -->
|
||||
<Border Grid.Row="2" Grid.Column="2" BorderThickness="1, 0, 0, 0" BorderBrush="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" Padding="3,0,0,0">
|
||||
<Grid>
|
||||
<Grid x:Name="gridMooring">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.3*" />
|
||||
<ColumnDefinition Width="0.7*" />
|
||||
@ -138,13 +144,14 @@
|
||||
<Label Grid.Row="0" x:Name="labelETAETDMooring" Grid.Column="0" Content="ETA" Padding="0" VerticalContentAlignment="Center" />
|
||||
<Label Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textRemarks}" Padding="0" VerticalContentAlignment="Top" FontSize="9"/>
|
||||
<Label Grid.Row="0" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelMooringETAETDValue" FontWeight="DemiBold"/>
|
||||
<Image Grid.Row="1" Grid.Column="0" x:Name="imageMooringLocked" VerticalAlignment="Top" Margin="0 20 0 0" HorizontalAlignment="Left" Source="./Resources/lock.png" Width="16" Height="16" ToolTip="{x:Static p:Resources.textFixedOrder}"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockMooringRemarks"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- PORT AUTHORITY -->
|
||||
<Border Grid.Row="2" Grid.Column="3" BorderThickness="1, 0, 0, 0" BorderBrush="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" Padding="3,0,0,0">
|
||||
<Grid >
|
||||
<Grid x:Name="gridPortAuthority">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.3*" />
|
||||
<ColumnDefinition Width="0.7*" />
|
||||
@ -156,12 +163,13 @@
|
||||
<Label Grid.Row="0" Grid.Column="0" x:Name="labelETAETDPortAuthority" Content="ETA" Padding="0" VerticalContentAlignment="Center" />
|
||||
<Label Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textRemarks}" Padding="0" VerticalContentAlignment="Top" FontSize="9"/>
|
||||
<Label Grid.Row="0" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelPortAuthorityETAETDValue" FontWeight="DemiBold"/>
|
||||
<Image Grid.Row="1" Grid.Column="0" x:Name="imagePortAuthorityLocked" VerticalAlignment="Top" Margin="0 20 0 0" HorizontalAlignment="Left" Source="./Resources/lock.png" Width="16" Height="16" ToolTip="{x:Static p:Resources.textFixedOrder}"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockPortAuthorityRemarks"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<!-- PILOT -->
|
||||
<Border Grid.Row="2" Grid.Column="4" BorderThickness="1, 0, 0, 0" BorderBrush="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" Padding="3,0,0,0">
|
||||
<Grid >
|
||||
<Grid x:Name="gridPilot">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.3*" />
|
||||
<ColumnDefinition Width="0.7*" />
|
||||
@ -173,12 +181,13 @@
|
||||
<Label Grid.Row="0" Grid.Column="0" x:Name="labelETAETDPilot" Content="ETA" Padding="0" VerticalContentAlignment="Center" />
|
||||
<Label Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textRemarks}" Padding="0" VerticalContentAlignment="Top" FontSize="9"/>
|
||||
<Label Grid.Row="0" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelPilotETAETDValue" FontWeight="DemiBold"/>
|
||||
<Image Grid.Row="1" Grid.Column="0" x:Name="imagePilotLocked" VerticalAlignment="Top" Margin="0 20 0 0" HorizontalAlignment="Left" Source="./Resources/lock.png" Width="16" Height="16" ToolTip="{x:Static p:Resources.textFixedOrder}"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockPilotRemarks"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
<!-- TUG -->
|
||||
<Border Grid.Row="2" Grid.Column="5" BorderThickness="1, 0, 0, 0" BorderBrush="{Binding Source={x:Static sets:Settings.Default}, Path=BG_COLOR}" Padding="3,0,0,0">
|
||||
<Grid>
|
||||
<Grid x:Name="gridTug">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.3*" />
|
||||
<ColumnDefinition Width="0.7*" />
|
||||
@ -190,6 +199,7 @@
|
||||
<Label Grid.Row="0" Grid.Column="0" x:Name="labelETAETDTug" Content="ETA" Padding="0" VerticalContentAlignment="Center" />
|
||||
<Label Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Content="{x:Static p:Resources.textRemarks}" Padding="0" VerticalContentAlignment="Top" FontSize="9"/>
|
||||
<Label Grid.Row="0" Grid.Column="1" Padding="0" VerticalContentAlignment="Center" x:Name="labelTugETAETDValue" FontWeight="DemiBold"/>
|
||||
<Image Grid.Row="1" Grid.Column="0" x:Name="imageTugLocked" VerticalAlignment="Top" Margin="0 20 0 0" HorizontalAlignment="Left" Source="./Resources/lock.png" Width="16" Height="16" ToolTip="{x:Static p:Resources.textFixedOrder}"/>
|
||||
<TextBlock Grid.Row="1" Grid.Column="1" Padding="0" TextWrapping="Wrap" VerticalAlignment="Top" x:Name="textBlockTugRemarks"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
@ -78,6 +78,7 @@ namespace BreCalClient
|
||||
this.labelAgencyETAETDValue.Content = "";
|
||||
this.textBlockAgencyRemarks.Text = "";
|
||||
this.textBlockAgencyBerthRemarks.Text = "";
|
||||
this.textBlockDraft.Text = "";
|
||||
}
|
||||
|
||||
_mooring = this.ShipcallControlModel.GetParticipantForType(Extensions.ParticipantType.MOORING);
|
||||
@ -314,6 +315,7 @@ namespace BreCalClient
|
||||
{
|
||||
this.labelAgencyETAETDValue.Content = agencyTimes.EtdBerth.HasValue ? agencyTimes.EtdBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -";
|
||||
}
|
||||
this.textBlockDraft.Text = ShipcallControlModel?.Shipcall?.Draft?.ToString("N2");
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -322,9 +324,11 @@ namespace BreCalClient
|
||||
this.labelAgencyETAETDValue.Content = "- / -";
|
||||
this.textBlockAgencyRemarks.Text = "";
|
||||
this.textBlockAgencyBerthRemarks.Text = "";
|
||||
this.textBlockDraft.Text = "";
|
||||
}
|
||||
|
||||
Times? mooringTimes = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.MOORING);
|
||||
|
||||
if (mooringTimes != null)
|
||||
{
|
||||
|
||||
@ -334,11 +338,13 @@ namespace BreCalClient
|
||||
{
|
||||
this.labelMooringETAETDValue.Content = mooringTimes.EtdBerth.HasValue ? mooringTimes.EtdBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -";
|
||||
}
|
||||
this.imageMooringLocked.Visibility = (mooringTimes.EtaBerthFixed ?? false) ? Visibility.Visible : Visibility.Hidden;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.labelMooringETAETDValue.Content = "- / ";
|
||||
this.textBlockMooringRemarks.Text = "";
|
||||
this.imageMooringLocked.Visibility = Visibility.Hidden;
|
||||
}
|
||||
|
||||
Times? portAuthorityTimes = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.PORT_ADMINISTRATION);
|
||||
@ -350,11 +356,13 @@ namespace BreCalClient
|
||||
{
|
||||
this.labelPortAuthorityETAETDValue.Content = portAuthorityTimes.EtdBerth.HasValue ? portAuthorityTimes.EtdBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -";
|
||||
}
|
||||
this.imagePortAuthorityLocked.Visibility = (portAuthorityTimes.EtaBerthFixed ?? false) ? Visibility.Visible : Visibility.Hidden;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.labelPortAuthorityETAETDValue.Content = "- / -";
|
||||
this.textBlockPortAuthorityRemarks.Text = "";
|
||||
this.imagePortAuthorityLocked.Visibility = Visibility.Hidden;
|
||||
}
|
||||
|
||||
Times? pilotTimes = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.PILOT);
|
||||
@ -366,11 +374,13 @@ namespace BreCalClient
|
||||
{
|
||||
this.labelPilotETAETDValue.Content = pilotTimes.EtdBerth.HasValue ? pilotTimes.EtdBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -";
|
||||
}
|
||||
this.imagePilotLocked.Visibility = (pilotTimes.EtaBerthFixed ?? false) ? Visibility.Visible : Visibility.Hidden;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.labelPilotETAETDValue.Content = "- / -";
|
||||
this.textBlockPilotRemarks.Text = "";
|
||||
this.imagePilotLocked.Visibility = Visibility.Hidden;
|
||||
}
|
||||
|
||||
Times? tugTimes = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.TUG);
|
||||
@ -382,11 +392,13 @@ namespace BreCalClient
|
||||
{
|
||||
this.labelTugETAETDValue.Content = tugTimes.EtdBerth.HasValue ? tugTimes.EtdBerth.Value.ToString("dd.MM.yyyy HH:mm") : "- / -";
|
||||
}
|
||||
this.imageTugLocked.Visibility = (tugTimes.EtaBerthFixed ?? false) ? Visibility.Visible : Visibility.Hidden;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.labelTugETAETDValue.Content = "- / -";
|
||||
this.textBlockTugRemarks.Text = "";
|
||||
this.imageTugLocked.Visibility = Visibility.Hidden;
|
||||
}
|
||||
|
||||
Times? terminalTimes = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.TERMINAL);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user