bugfixes and small improvements for 0.9.5 test results
This commit is contained in:
parent
f0fa9285af
commit
09623f1442
@ -46,7 +46,8 @@ namespace BreCalClient
|
||||
|
||||
this.comboBoxArrivalBerth.ItemsSource = BreCalLists.Berths;
|
||||
this.CopyToControls();
|
||||
|
||||
|
||||
this.Title = this.ShipcallModel.Title;
|
||||
|
||||
Participant? p = null;
|
||||
if(this.ShipcallModel.AssignedParticipants.ContainsKey(ParticipantType.AGENCY))
|
||||
|
||||
@ -46,6 +46,8 @@ namespace BreCalClient
|
||||
this.comboBoxDepartureBerth.ItemsSource = BreCalLists.Berths;
|
||||
this.CopyToControls();
|
||||
|
||||
this.Title = this.ShipcallModel.Title;
|
||||
|
||||
Participant? p = null;
|
||||
if (this.ShipcallModel.AssignedParticipants.ContainsKey(ParticipantType.AGENCY))
|
||||
p = BreCalLists.Participants.Find(x => x.Id == this.ShipcallModel.AssignedParticipants[ParticipantType.AGENCY].ParticipantId);
|
||||
|
||||
@ -47,6 +47,8 @@ namespace BreCalClient
|
||||
this.comboBoxArrivalBerth.ItemsSource = BreCalLists.Berths;
|
||||
this.CopyToControls();
|
||||
|
||||
this.Title = this.ShipcallModel.Title;
|
||||
|
||||
Participant? p = null;
|
||||
if (this.ShipcallModel.AssignedParticipants.ContainsKey(ParticipantType.AGENCY))
|
||||
p = BreCalLists.Participants.Find(x => x.Id == this.ShipcallModel.AssignedParticipants[ParticipantType.AGENCY].ParticipantId);
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width=".25*" />
|
||||
<ColumnDefinition Width=".75*" />
|
||||
<ColumnDefinition Width="40" />
|
||||
<!--ColumnDefinition Width="40" /-->
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="28" />
|
||||
@ -24,7 +24,7 @@
|
||||
<RowDefinition Height="56" />
|
||||
<RowDefinition Height="28" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="2" Content="{x:Static p:Resources.textFixed}" />
|
||||
<!-- 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" />
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="{x:Static p:Resources.textETDBerth}" HorizontalContentAlignment="Right" />
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="{x:Static p:Resources.textLockTime}" HorizontalContentAlignment="Right" />
|
||||
@ -43,7 +43,7 @@
|
||||
</ContextMenu>
|
||||
</xctk:DateTimePicker.ContextMenu>
|
||||
</xctk:DateTimePicker>
|
||||
<CheckBox IsEnabled="False" Grid.Row="1" Grid.Column="2" Margin="4,0,0,0" Name="checkBoxEtaBerthFixed" VerticalAlignment="Center" />
|
||||
<!--CheckBox IsEnabled="False" Grid.Row="1" Grid.Column="2" Margin="4,0,0,0" Name="checkBoxEtaBerthFixed" VerticalAlignment="Center" /-->
|
||||
<xctk:DateTimePicker IsEnabled="False" Grid.Row="2" Grid.Column="1" Margin="2" Name="datePickerETDBerth" Format="Custom" FormatString="dd.MM. yyyy HH:mm">
|
||||
<xctk:DateTimePicker.ContextMenu>
|
||||
<ContextMenu>
|
||||
@ -55,7 +55,7 @@
|
||||
</ContextMenu>
|
||||
</xctk:DateTimePicker.ContextMenu>
|
||||
</xctk:DateTimePicker>
|
||||
<CheckBox IsEnabled="False" Grid.Row="2" Grid.Column="2" Margin="4,0,0,0" Name="checkBoxEtDBerthFixed" VerticalAlignment="Center" />
|
||||
<!--CheckBox IsEnabled="False" Grid.Row="2" Grid.Column="2" Margin="4,0,0,0" Name="checkBoxEtDBerthFixed" VerticalAlignment="Center" /-->
|
||||
<xctk:DateTimePicker IsEnabled="False" Grid.Row="3" Grid.Column="1" Margin="2" Name="datePickerLockTime" Format="Custom" FormatString="dd.MM. yyyy HH:mm">
|
||||
<xctk:DateTimePicker.ContextMenu>
|
||||
<ContextMenu>
|
||||
@ -67,7 +67,7 @@
|
||||
</ContextMenu>
|
||||
</xctk:DateTimePicker.ContextMenu>
|
||||
</xctk:DateTimePicker>
|
||||
<CheckBox IsEnabled="False" Grid.Row="3" Grid.Column="2" Margin="4,0,0,0" Name="checkBoxLockTimeFixed" VerticalAlignment="Center" />
|
||||
<!--CheckBox IsEnabled="False" Grid.Row="3" Grid.Column="2" Margin="4,0,0,0" Name="checkBoxLockTimeFixed" VerticalAlignment="Center" /-->
|
||||
<xctk:DateTimePicker IsEnabled="False" Grid.Row="4" Grid.Column="1" Margin="2" Name="datePickerZoneEntry" Format="Custom" FormatString="dd.MM. yyyy HH:mm">
|
||||
<xctk:DateTimePicker.ContextMenu>
|
||||
<ContextMenu>
|
||||
@ -79,7 +79,7 @@
|
||||
</ContextMenu>
|
||||
</xctk:DateTimePicker.ContextMenu>
|
||||
</xctk:DateTimePicker>
|
||||
<CheckBox IsEnabled="False" Grid.Row="4" Grid.Column="2" Margin="4,0,0,0" Name="checkBoxZoneEntryFixed" VerticalAlignment="Center" />
|
||||
<!--CheckBox IsEnabled="False" Grid.Row="4" Grid.Column="2" Margin="4,0,0,0" Name="checkBoxZoneEntryFixed" VerticalAlignment="Center" /-->
|
||||
|
||||
<TextBox Grid.Row="5" Grid.Column="1" Margin="2" Name="textBoxRemarks" TextWrapping="Wrap" AcceptsReturn="True" SpellCheck.IsEnabled="True" AcceptsTab="True" IsEnabled="False"/>
|
||||
<StackPanel Grid.Row="6" Grid.Column="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||
|
||||
@ -25,7 +25,7 @@ namespace BreCalClient
|
||||
|
||||
#region Properties
|
||||
|
||||
public Times Times { get; set; } = new();
|
||||
public Times Times { get; set; } = new();
|
||||
|
||||
public Extensions.TypeEnum CallType { get; set; }
|
||||
|
||||
@ -34,7 +34,7 @@ namespace BreCalClient
|
||||
#region event handler
|
||||
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
{
|
||||
this.CopyToControls();
|
||||
this.EnableControls();
|
||||
}
|
||||
@ -64,10 +64,10 @@ namespace BreCalClient
|
||||
this.Times.LockTime = this.datePickerLockTime.Value;
|
||||
this.Times.ZoneEntry = this.datePickerZoneEntry.Value;
|
||||
|
||||
this.Times.EtaBerthFixed = this.checkBoxEtaBerthFixed.IsChecked;
|
||||
this.Times.EtdBerthFixed = this.checkBoxEtDBerthFixed.IsChecked;
|
||||
this.Times.LockTimeFixed = this.checkBoxLockTimeFixed.IsChecked;
|
||||
this.Times.ZoneEntryFixed = this.checkBoxZoneEntryFixed.IsChecked;
|
||||
//this.Times.EtaBerthFixed = this.checkBoxEtaBerthFixed.IsChecked;
|
||||
//this.Times.EtdBerthFixed = this.checkBoxEtDBerthFixed.IsChecked;
|
||||
//this.Times.LockTimeFixed = this.checkBoxLockTimeFixed.IsChecked;
|
||||
//this.Times.ZoneEntryFixed = this.checkBoxZoneEntryFixed.IsChecked;
|
||||
}
|
||||
|
||||
private void CopyToControls()
|
||||
@ -78,10 +78,10 @@ namespace BreCalClient
|
||||
this.datePickerLockTime.Value = this.Times.LockTime;
|
||||
this.datePickerZoneEntry.Value = this.Times.ZoneEntry;
|
||||
|
||||
this.checkBoxEtaBerthFixed.IsChecked = this.Times.EtaBerthFixed;
|
||||
this.checkBoxEtDBerthFixed.IsChecked = this.Times.EtdBerthFixed;
|
||||
this.checkBoxLockTimeFixed.IsChecked = this.Times.LockTimeFixed;
|
||||
this.checkBoxZoneEntryFixed.IsChecked = this.Times.ZoneEntryFixed;
|
||||
//this.checkBoxEtaBerthFixed.IsChecked = this.Times.EtaBerthFixed;
|
||||
//this.checkBoxEtDBerthFixed.IsChecked = this.Times.EtdBerthFixed;
|
||||
//this.checkBoxLockTimeFixed.IsChecked = this.Times.LockTimeFixed;
|
||||
//this.checkBoxZoneEntryFixed.IsChecked = this.Times.ZoneEntryFixed;
|
||||
}
|
||||
|
||||
private void EnableControls()
|
||||
@ -94,25 +94,25 @@ namespace BreCalClient
|
||||
case Extensions.ParticipantType.MOORING:
|
||||
case Extensions.ParticipantType.PORT_ADMINISTRATION:
|
||||
case Extensions.ParticipantType.TUG:
|
||||
this.datePickerETABerth.IsEnabled = (CallType == Extensions.TypeEnum.Incoming || CallType == Extensions.TypeEnum.Shifting);
|
||||
this.checkBoxEtaBerthFixed.IsEnabled = (CallType == Extensions.TypeEnum.Incoming || CallType == Extensions.TypeEnum.Shifting);
|
||||
this.datePickerETABerth.IsEnabled = (CallType == Extensions.TypeEnum.Incoming);
|
||||
//this.checkBoxEtaBerthFixed.IsEnabled = (CallType == Extensions.TypeEnum.Incoming || CallType == Extensions.TypeEnum.Shifting);
|
||||
this.datePickerETDBerth.IsEnabled = (CallType == Extensions.TypeEnum.Outgoing || CallType == Extensions.TypeEnum.Shifting);
|
||||
this.checkBoxEtDBerthFixed.IsEnabled = (CallType == Extensions.TypeEnum.Outgoing || CallType == Extensions.TypeEnum.Shifting);
|
||||
//this.checkBoxEtDBerthFixed.IsEnabled = (CallType == Extensions.TypeEnum.Outgoing || CallType == Extensions.TypeEnum.Shifting);
|
||||
this.datePickerLockTime.IsEnabled = (CallType == Extensions.TypeEnum.Incoming || CallType == Extensions.TypeEnum.Shifting);
|
||||
this.checkBoxLockTimeFixed.IsEnabled = (CallType == Extensions.TypeEnum.Incoming || CallType == Extensions.TypeEnum.Shifting);
|
||||
//this.checkBoxLockTimeFixed.IsEnabled = (CallType == Extensions.TypeEnum.Incoming || CallType == Extensions.TypeEnum.Shifting);
|
||||
this.datePickerZoneEntry.IsEnabled = false;
|
||||
this.checkBoxZoneEntryFixed.IsEnabled = false;
|
||||
//this.checkBoxZoneEntryFixed.IsEnabled = false;
|
||||
this.textBoxRemarks.IsEnabled = true;
|
||||
break;
|
||||
case Extensions.ParticipantType.PILOT:
|
||||
this.datePickerETABerth.IsEnabled = (CallType == Extensions.TypeEnum.Incoming || CallType == Extensions.TypeEnum.Shifting);
|
||||
this.checkBoxEtaBerthFixed.IsEnabled = (CallType == Extensions.TypeEnum.Incoming || CallType == Extensions.TypeEnum.Shifting);
|
||||
this.datePickerETABerth.IsEnabled = (CallType == Extensions.TypeEnum.Incoming);
|
||||
//this.checkBoxEtaBerthFixed.IsEnabled = (CallType == Extensions.TypeEnum.Incoming || CallType == Extensions.TypeEnum.Shifting);
|
||||
this.datePickerETDBerth.IsEnabled = (CallType == Extensions.TypeEnum.Outgoing || CallType == Extensions.TypeEnum.Shifting);
|
||||
this.checkBoxEtDBerthFixed.IsEnabled = (CallType == Extensions.TypeEnum.Outgoing || CallType == Extensions.TypeEnum.Shifting);
|
||||
//this.checkBoxEtDBerthFixed.IsEnabled = (CallType == Extensions.TypeEnum.Outgoing || CallType == Extensions.TypeEnum.Shifting);
|
||||
this.datePickerLockTime.IsEnabled = (CallType == Extensions.TypeEnum.Incoming || CallType == Extensions.TypeEnum.Shifting);
|
||||
this.checkBoxLockTimeFixed.IsEnabled = (CallType == Extensions.TypeEnum.Incoming || CallType == Extensions.TypeEnum.Shifting);
|
||||
//this.checkBoxLockTimeFixed.IsEnabled = (CallType == Extensions.TypeEnum.Incoming || CallType == Extensions.TypeEnum.Shifting);
|
||||
this.datePickerZoneEntry.IsEnabled = (CallType == Extensions.TypeEnum.Incoming);
|
||||
this.checkBoxZoneEntryFixed.IsEnabled = (CallType == Extensions.TypeEnum.Incoming);
|
||||
//this.checkBoxZoneEntryFixed.IsEnabled = (CallType == Extensions.TypeEnum.Incoming);
|
||||
this.textBoxRemarks.IsEnabled = true;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -96,11 +96,11 @@ namespace BreCalClient
|
||||
{
|
||||
if (this.Times.ParticipantId != App.Participant.Id) return;
|
||||
|
||||
this.datePickerOperationStart.IsEnabled = (CallType == Extensions.TypeEnum.Incoming) || (CallType == Extensions.TypeEnum.Shifting);
|
||||
this.datePickerOperationStart.IsEnabled = (CallType == Extensions.TypeEnum.Incoming);
|
||||
this.datePickerOperationEnd.IsEnabled = (CallType == Extensions.TypeEnum.Outgoing) || (CallType == Extensions.TypeEnum.Shifting);
|
||||
this.comboBoxBerth.IsEnabled = (CallType == Extensions.TypeEnum.Incoming) || (CallType == Extensions.TypeEnum.Shifting);
|
||||
this.comboBoxPierside.IsEnabled = (CallType == Extensions.TypeEnum.Incoming) || (CallType == Extensions.TypeEnum.Shifting);
|
||||
this.textBoxBerthRemarks.IsEnabled = (CallType == Extensions.TypeEnum.Incoming) || (CallType == Extensions.TypeEnum.Shifting);
|
||||
this.comboBoxBerth.IsEnabled = (CallType == Extensions.TypeEnum.Incoming);
|
||||
this.comboBoxPierside.IsEnabled = (CallType == Extensions.TypeEnum.Incoming);
|
||||
this.textBoxBerthRemarks.IsEnabled = (CallType == Extensions.TypeEnum.Incoming);
|
||||
this.textBoxRemarks.IsEnabled = true;
|
||||
this.buttonOK.IsEnabled = true;
|
||||
}
|
||||
|
||||
@ -11,6 +11,8 @@ namespace BreCalClient
|
||||
{
|
||||
Times Times { get; set; }
|
||||
|
||||
string Title { get; set; }
|
||||
|
||||
Extensions.TypeEnum CallType { get; set; }
|
||||
|
||||
bool? ShowDialog();
|
||||
|
||||
@ -623,6 +623,7 @@ namespace BreCalClient
|
||||
|
||||
// show a dialog that lets the user create / update times for the given shipcall
|
||||
IEditTimesControl etc = (participantType == ParticipantType.TERMINAL) ? new EditTimesTerminalControl() : new EditTimesControl();
|
||||
etc.Title = obj.ShipcallControlModel.Title;
|
||||
|
||||
if(obj.ShipcallControlModel.Shipcall != null)
|
||||
etc.CallType = (TypeEnum) obj.ShipcallControlModel.Shipcall.Type;
|
||||
|
||||
@ -262,7 +262,8 @@ namespace BreCalClient
|
||||
Berth? berth = BreCalLists.Berths.Find((x) => x.Id == times.BerthId);
|
||||
berthText = berth?.Name;
|
||||
}
|
||||
if (berthText == null)
|
||||
|
||||
if ((berthText == null) && (times.ParticipantType != (int) Extensions.ParticipantType.TERMINAL))
|
||||
{
|
||||
if (this.ShipcallControlModel?.Shipcall?.Type == (int)Extensions.TypeEnum.Incoming)
|
||||
{
|
||||
|
||||
@ -91,6 +91,16 @@ namespace BreCalClient
|
||||
}
|
||||
}
|
||||
|
||||
public string Title
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.Shipcall == null) return "";
|
||||
Extensions.TypeEnum callType = (Extensions.TypeEnum) this.Shipcall.Type;
|
||||
return string.Format("{0} {1}", callType, this.Ship?.Name);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region public methods
|
||||
|
||||
Loading…
Reference in New Issue
Block a user