Expanded all dialogs to include end times for eta, etd and operations
This commit is contained in:
parent
4106b9a0ef
commit
ced68b504d
@ -44,7 +44,14 @@
|
||||
</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" ValueChanged="datePickerETA_ValueChanged"/>
|
||||
<Grid Grid.Column="1" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width=".5*" />
|
||||
<ColumnDefinition Width=".5*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<xctk:DateTimePicker x:Name="datePickerETA" Grid.Column="0" Grid.Row="0" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm" ValueChanged="datePickerETA_ValueChanged"/>
|
||||
<xctk:DateTimePicker x:Name="datePickerETA_End" Grid.Column="1" Grid.Row="0" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm" ValueChanged="datePickerETA_End_ValueChanged"/>
|
||||
</Grid>
|
||||
<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" SelectionChanged="comboBoxArrivalBerth_SelectionChanged">
|
||||
|
||||
|
||||
@ -90,6 +90,7 @@ namespace BreCalClient
|
||||
if (this.ShipcallModel.Shipcall != null)
|
||||
{
|
||||
this.Times.EtaBerth = this.datePickerETA.Value;
|
||||
this.Times.EtaIntervalEnd = this.datePickerETA_End.Value;
|
||||
|
||||
if (this.comboBoxPierside.SelectedIndex >= 0)
|
||||
{
|
||||
@ -178,6 +179,8 @@ namespace BreCalClient
|
||||
if (this.ShipcallModel.Shipcall.Eta != DateTime.MinValue)
|
||||
this.datePickerETA.Value = this.ShipcallModel.Shipcall.Eta;
|
||||
}
|
||||
|
||||
this.datePickerETA_End.Value = this.Times.EtaIntervalEnd;
|
||||
|
||||
if (Times.BerthId.HasValue)
|
||||
this.comboBoxArrivalBerth.SelectedValue = Times.BerthId;
|
||||
@ -249,6 +252,7 @@ namespace BreCalClient
|
||||
private void EnableControls()
|
||||
{
|
||||
this.datePickerETA.IsEnabled = _editing;
|
||||
this.datePickerETA_End.IsEnabled = _editing;
|
||||
this.comboBoxArrivalBerth.IsEnabled = _editing;
|
||||
this.comboBoxPierside.IsEnabled = _editing;
|
||||
this.textBoxBerthRemarks.IsEnabled = _editing;
|
||||
@ -279,6 +283,10 @@ namespace BreCalClient
|
||||
bool areSet = this.datePickerETA.Value.HasValue &&
|
||||
this.doubleUpDownDraft.Value.HasValue &&
|
||||
this.comboBoxArrivalBerth.SelectedIndex >= 0;
|
||||
|
||||
if (areSet && this.datePickerETA_End.Value.HasValue)
|
||||
areSet &= (this.datePickerETA.Value < this.datePickerETA_End.Value);
|
||||
|
||||
return areSet;
|
||||
}
|
||||
|
||||
@ -337,6 +345,11 @@ namespace BreCalClient
|
||||
}
|
||||
|
||||
private void comboBoxArrivalBerth_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||
{
|
||||
this.CheckOKButton();
|
||||
}
|
||||
|
||||
private void datePickerETA_End_ValueChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
|
||||
{
|
||||
this.CheckOKButton();
|
||||
}
|
||||
|
||||
@ -40,7 +40,14 @@
|
||||
</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" ValueChanged="datePickerETD_ValueChanged"/>
|
||||
<Grid Grid.Row="1" Grid.Column="1" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width=".5*" />
|
||||
<ColumnDefinition Width=".5*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<xctk:DateTimePicker x:Name="datePickerETD" Grid.Column="0" Grid.Row="0" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm" ValueChanged="datePickerETD_ValueChanged"/>
|
||||
<xctk:DateTimePicker x:Name="datePickerETD_End" Grid.Column="1" Grid.Row="0" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm" ValueChanged="datePickerETD_ValueChanged"/>
|
||||
</Grid>
|
||||
<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" SelectionChanged="comboBoxDepartureBerth_SelectionChanged" />
|
||||
<Label Content="{x:Static p:Resources.textPierside}" Grid.Column="0" Grid.Row="3" HorizontalContentAlignment="Right" />
|
||||
|
||||
@ -90,7 +90,9 @@ namespace BreCalClient
|
||||
{
|
||||
if (this.ShipcallModel.Shipcall != null)
|
||||
{
|
||||
this.Times.EtdBerth = this.datePickerETD.Value;
|
||||
this.Times.EtdBerth = this.datePickerETD.Value;
|
||||
this.Times.EtdIntervalEnd = this.datePickerETD_End.Value;
|
||||
|
||||
if (this.comboBoxPierside.SelectedIndex >= 0)
|
||||
{
|
||||
this.ShipcallModel.Shipcall.PierSide = (this.comboBoxPierside.SelectedIndex == 0) ? true : false;
|
||||
@ -174,6 +176,8 @@ namespace BreCalClient
|
||||
if (this.ShipcallModel.Shipcall.Etd != DateTime.MinValue)
|
||||
this.datePickerETD.Value = this.ShipcallModel.Shipcall.Etd;
|
||||
}
|
||||
|
||||
this.datePickerETD_End.Value = this.Times.EtdIntervalEnd;
|
||||
|
||||
if (this.Times.BerthId.HasValue)
|
||||
this.comboBoxDepartureBerth.SelectedValue = this.Times.BerthId;
|
||||
@ -234,13 +238,13 @@ namespace BreCalClient
|
||||
this.comboBoxTug.SelectedValue = this.ShipcallModel.AssignedParticipants[ParticipantType.TUG].ParticipantId;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void EnableControls()
|
||||
{
|
||||
this.datePickerETD.IsEnabled = _editing;
|
||||
this.datePickerETD_End.IsEnabled = _editing;
|
||||
this.comboBoxDepartureBerth.IsEnabled = _editing;
|
||||
this.comboBoxPierside.IsEnabled = _editing;
|
||||
this.textBoxBerthRemarks.IsEnabled = _editing;
|
||||
@ -267,6 +271,10 @@ namespace BreCalClient
|
||||
bool areSet = this.datePickerETD.Value.HasValue &&
|
||||
this.doubleUpDownDraft.Value.HasValue &&
|
||||
this.comboBoxDepartureBerth.SelectedIndex >= 0;
|
||||
|
||||
if (areSet && this.datePickerETD_End.Value.HasValue)
|
||||
areSet &= (this.datePickerETD_End.Value > this.datePickerETD.Value);
|
||||
|
||||
return areSet;
|
||||
}
|
||||
|
||||
|
||||
@ -45,8 +45,15 @@
|
||||
<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" ValueChanged="datePickerETD_ValueChanged"/>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width=".5*" />
|
||||
<ColumnDefinition Width=".5*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<xctk:DateTimePicker x:Name="datePickerETD" Grid.Column="0" Grid.Row="0" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm" ValueChanged="datePickerETD_ValueChanged"/>
|
||||
<xctk:DateTimePicker x:Name="datePickerETD_End" Grid.Column="1" Grid.Row="0" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm" ValueChanged="datePickerETD_ValueChanged"/>
|
||||
</Grid>
|
||||
|
||||
<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">
|
||||
<ComboBox.ContextMenu>
|
||||
@ -76,7 +83,15 @@
|
||||
<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" ValueChanged="datePickerETA_ValueChanged"/>
|
||||
<Grid Grid.Column="1" Grid.Row="9">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width=".5*" />
|
||||
<ColumnDefinition Width=".5*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<xctk:DateTimePicker x:Name="datePickerETA" Grid.Column="0" Grid.Row="0" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm" ValueChanged="datePickerETA_ValueChanged"/>
|
||||
<xctk:DateTimePicker x:Name="datePickerETA_End" Grid.Column="1" Grid.Row="0" Margin="2" Format="Custom" FormatString="dd.MM. yyyy HH:mm" ValueChanged="datePickerETA_ValueChanged"/>
|
||||
</Grid>
|
||||
|
||||
|
||||
<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" SelectionChanged="comboBoxArrivalBerth_SelectionChanged" />
|
||||
|
||||
@ -92,6 +92,9 @@ namespace BreCalClient
|
||||
{
|
||||
this.Times.EtdBerth = this.datePickerETD.Value;
|
||||
this.Times.EtaBerth = this.datePickerETA.Value;
|
||||
this.Times.EtaIntervalEnd = this.datePickerETA_End.Value;
|
||||
this.Times.EtdIntervalEnd = this.datePickerETD_End.Value;
|
||||
|
||||
this.ShipcallModel.Shipcall.DepartureBerthId = (int)this.comboBoxDepartureBerth.SelectedValue;
|
||||
if (this.comboBoxPiersideArrival.SelectedIndex >= 0)
|
||||
{
|
||||
@ -187,6 +190,9 @@ namespace BreCalClient
|
||||
this.datePickerETD.Value = this.ShipcallModel.Shipcall.Etd;
|
||||
}
|
||||
|
||||
this.datePickerETA_End.Value = this.Times.EtaIntervalEnd;
|
||||
this.datePickerETD_End.Value = this.Times.EtdIntervalEnd;
|
||||
|
||||
if (this.Times.BerthId.HasValue)
|
||||
this.comboBoxArrivalBerth.SelectedValue = this.Times.BerthId;
|
||||
else if (this.ShipcallModel.Shipcall.ArrivalBerthId.HasValue)
|
||||
@ -254,6 +260,8 @@ namespace BreCalClient
|
||||
|
||||
private void EnableControls()
|
||||
{
|
||||
this.datePickerETD_End.IsEnabled = _editing;
|
||||
this.datePickerETA_End.IsEnabled = _editing;
|
||||
this.datePickerETD.IsEnabled = _editing;
|
||||
this.comboBoxArrivalBerth.IsEnabled = _editing;
|
||||
this.doubleUpDownDraft.IsEnabled = _editing;
|
||||
@ -285,6 +293,13 @@ namespace BreCalClient
|
||||
this.doubleUpDownDraft.Value.HasValue &&
|
||||
(this.comboBoxArrivalBerth.SelectedIndex >= 0) &&
|
||||
(this.comboBoxDepartureBerth.SelectedIndex >= 0);
|
||||
|
||||
if (this.datePickerETA_End.Value.HasValue)
|
||||
areSet &= (this.datePickerETA_End.Value > this.datePickerETA.Value);
|
||||
|
||||
if (this.datePickerETD_End.Value.HasValue)
|
||||
areSet &= (this.datePickerETD_End.Value > this.datePickerETD.Value);
|
||||
|
||||
return areSet;
|
||||
}
|
||||
|
||||
|
||||
@ -39,29 +39,69 @@
|
||||
|
||||
<Label Grid.Row="7" Grid.Column="0" Content="{x:Static p:Resources.textRemarks}" HorizontalContentAlignment="Right" />
|
||||
|
||||
<xctk:DateTimePicker IsEnabled="False" Grid.Row="1" Grid.Column="1" Margin="2" Name="datePickerETABerth" Format="Custom" FormatString="dd.MM. yyyy HH:mm">
|
||||
<xctk:DateTimePicker.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemClearETA" Click="contextMenuItemClearETA_Click" >
|
||||
<MenuItem.Icon>
|
||||
<Image Source="Resources\delete.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</xctk:DateTimePicker.ContextMenu>
|
||||
</xctk:DateTimePicker>
|
||||
|
||||
<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>
|
||||
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemClearETD" Click="contextMenuItemClearETD_Click" >
|
||||
<MenuItem.Icon>
|
||||
<Image Source="Resources\delete.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</xctk:DateTimePicker.ContextMenu>
|
||||
</xctk:DateTimePicker>
|
||||
<Grid Grid.Row="1" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width=".5*" />
|
||||
<ColumnDefinition Width=".5*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<xctk:DateTimePicker IsEnabled="False" Grid.Row="0" Grid.Column="0" Margin="2" Name="datePickerETABerth" Format="Custom" FormatString="dd.MM. yyyy HH:mm">
|
||||
<xctk:DateTimePicker.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemClearETA" Click="contextMenuItemClearETA_Click" >
|
||||
<MenuItem.Icon>
|
||||
<Image Source="Resources\delete.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</xctk:DateTimePicker.ContextMenu>
|
||||
</xctk:DateTimePicker>
|
||||
|
||||
<xctk:DateTimePicker IsEnabled="False" Grid.Row="0" Grid.Column="1" Margin="2" Name="datePickerETABerth_End" Format="Custom" FormatString="dd.MM. yyyy HH:mm">
|
||||
<xctk:DateTimePicker.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemClearETA_End" Click="contextMenuItemClearETA_End_Click" >
|
||||
<MenuItem.Icon>
|
||||
<Image Source="Resources\delete.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</xctk:DateTimePicker.ContextMenu>
|
||||
</xctk:DateTimePicker>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="2" Grid.Column="1" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width=".5*" />
|
||||
<ColumnDefinition Width=".5*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<xctk:DateTimePicker IsEnabled="False" Grid.Row="0" Grid.Column="0" Margin="2" Name="datePickerETDBerth" Format="Custom" FormatString="dd.MM. yyyy HH:mm">
|
||||
<xctk:DateTimePicker.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemClearETD" Click="contextMenuItemClearETD_Click" >
|
||||
<MenuItem.Icon>
|
||||
<Image Source="Resources\delete.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</xctk:DateTimePicker.ContextMenu>
|
||||
</xctk:DateTimePicker>
|
||||
|
||||
<xctk:DateTimePicker IsEnabled="False" Grid.Row="0" Grid.Column="1" Margin="2" Name="datePickerETDBerth_End" Format="Custom" FormatString="dd.MM. yyyy HH:mm">
|
||||
<xctk:DateTimePicker.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemClearETD_End" Click="contextMenuItemClearETD_End_Click" >
|
||||
<MenuItem.Icon>
|
||||
<Image Source="Resources\delete.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</xctk:DateTimePicker.ContextMenu>
|
||||
</xctk:DateTimePicker>
|
||||
|
||||
</Grid>
|
||||
|
||||
<xctk:DateTimePicker IsEnabled="False" Grid.Row="3" Grid.Column="1" Margin="2" Name="datePickerATA" Format="Custom" FormatString="dd.MM. yyyy HH:mm">
|
||||
<xctk:DateTimePicker.ContextMenu>
|
||||
|
||||
@ -71,6 +71,8 @@ namespace BreCalClient
|
||||
this.Times.Remarks = this.textBoxRemarks.Text.Trim().Truncate(512);
|
||||
this.Times.EtaBerth = this.datePickerETABerth.Value;
|
||||
this.Times.EtdBerth = this.datePickerETDBerth.Value;
|
||||
this.Times.EtaIntervalEnd = this.datePickerETABerth_End.Value;
|
||||
this.Times.EtdIntervalEnd = this.datePickerETDBerth_End.Value;
|
||||
this.Times.LockTime = this.datePickerLockTime.Value;
|
||||
this.Times.ZoneEntry = this.datePickerZoneEntry.Value;
|
||||
this.Times.Ata = this.datePickerATA.Value;
|
||||
@ -86,6 +88,8 @@ namespace BreCalClient
|
||||
this.datePickerZoneEntry.Value = this.Times.ZoneEntry;
|
||||
this.datePickerATA.Value = this.Times.Ata;
|
||||
this.datePickerATD.Value = this.Times.Atd;
|
||||
this.datePickerETABerth_End.Value = this.Times.EtaIntervalEnd;
|
||||
this.datePickerETDBerth_End.Value = this.Times.EtdIntervalEnd;
|
||||
|
||||
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]);
|
||||
@ -150,14 +154,18 @@ namespace BreCalClient
|
||||
case Extensions.ParticipantType.PORT_ADMINISTRATION:
|
||||
case Extensions.ParticipantType.TUG:
|
||||
this.datePickerETABerth.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Arrival);
|
||||
this.datePickerETABerth_End.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Arrival);
|
||||
this.datePickerETDBerth.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Departure || ShipcallModel.Shipcall?.Type == ShipcallType.Shifting);
|
||||
this.datePickerETDBerth_End.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Departure || ShipcallModel.Shipcall?.Type == ShipcallType.Shifting);
|
||||
this.datePickerLockTime.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Arrival || ShipcallModel.Shipcall?.Type == ShipcallType.Shifting);
|
||||
this.datePickerZoneEntry.IsEnabled = false;
|
||||
this.textBoxRemarks.IsEnabled = true;
|
||||
break;
|
||||
case Extensions.ParticipantType.PILOT:
|
||||
this.datePickerETABerth.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Arrival);
|
||||
this.datePickerETDBerth.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Departure || ShipcallModel.Shipcall?.Type == ShipcallType.Shifting);
|
||||
this.datePickerETABerth.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Arrival);
|
||||
this.datePickerETABerth_End.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Arrival);
|
||||
this.datePickerETDBerth.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Departure || ShipcallModel.Shipcall?.Type == ShipcallType.Shifting);
|
||||
this.datePickerETDBerth_End.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Departure || ShipcallModel.Shipcall?.Type == ShipcallType.Shifting);
|
||||
this.datePickerLockTime.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Arrival || ShipcallModel.Shipcall?.Type == ShipcallType.Shifting);
|
||||
this.datePickerZoneEntry.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Arrival);
|
||||
this.textBoxRemarks.IsEnabled = true;
|
||||
@ -214,6 +222,16 @@ namespace BreCalClient
|
||||
private void contextMenuItemClearATD_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.datePickerATD.Value = null;
|
||||
}
|
||||
|
||||
private void contextMenuItemClearETA_End_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.datePickerETABerth_End.Value = null;
|
||||
}
|
||||
|
||||
private void contextMenuItemClearETD_End_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.datePickerETDBerth_End.Value = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -32,28 +32,70 @@
|
||||
|
||||
<Label Grid.Row="5" Grid.Column="0" Content="{x:Static p:Resources.textRemarks}" HorizontalContentAlignment="Right" />
|
||||
|
||||
<xctk:DateTimePicker Grid.Row="0" Grid.Column="1" Margin="2" Name="datePickerOperationStart" Format="Custom" FormatString="dd.MM. yyyy HH:mm" IsEnabled="False">
|
||||
<xctk:DateTimePicker.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemClearOperationStart" Click="contextMenuItemClearOperationStart_Click" >
|
||||
<MenuItem.Icon>
|
||||
<Image Source="Resources\delete.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</xctk:DateTimePicker.ContextMenu>
|
||||
</xctk:DateTimePicker>
|
||||
<xctk:DateTimePicker Grid.Row="1" Grid.Column="1" Margin="2" Name="datePickerOperationEnd" Format="Custom" FormatString="dd.MM. yyyy HH:mm" IsEnabled="False">
|
||||
<xctk:DateTimePicker.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemClearOperationEnd" Click="contextMenuItemClearOperationEnd_Click" >
|
||||
<MenuItem.Icon>
|
||||
<Image Source="Resources\delete.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</xctk:DateTimePicker.ContextMenu>
|
||||
</xctk:DateTimePicker>
|
||||
<Grid Grid.Row="0" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width=".5*" />
|
||||
<ColumnDefinition Width=".5*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<xctk:DateTimePicker Grid.Row="0" Grid.Column="0" Margin="2" Name="datePickerOperationStart" Format="Custom" FormatString="dd.MM. yyyy HH:mm" IsEnabled="False">
|
||||
<xctk:DateTimePicker.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemClearOperationStart" Click="contextMenuItemClearOperationStart_Click" >
|
||||
<MenuItem.Icon>
|
||||
<Image Source="Resources\delete.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</xctk:DateTimePicker.ContextMenu>
|
||||
</xctk:DateTimePicker>
|
||||
<xctk:DateTimePicker Grid.Row="0" Grid.Column="1" Margin="2" Name="datePickerOperationStart_End" Format="Custom" FormatString="dd.MM. yyyy HH:mm" IsEnabled="False">
|
||||
<xctk:DateTimePicker.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemClearOperationStart_End" Click="contextMenuItemClearOperationStart_End_Click">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="Resources\delete.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</xctk:DateTimePicker.ContextMenu>
|
||||
</xctk:DateTimePicker>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="1" Grid.Column="1" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width=".5*" />
|
||||
<ColumnDefinition Width=".5*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<xctk:DateTimePicker Grid.Row="0" Grid.Column="0" Margin="2" Name="datePickerOperationEnd" Format="Custom" FormatString="dd.MM. yyyy HH:mm" IsEnabled="False">
|
||||
<xctk:DateTimePicker.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemClearOperationEnd" Click="contextMenuItemClearOperationEnd_Click" >
|
||||
<MenuItem.Icon>
|
||||
<Image Source="Resources\delete.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</xctk:DateTimePicker.ContextMenu>
|
||||
</xctk:DateTimePicker>
|
||||
|
||||
<xctk:DateTimePicker Grid.Row="0" Grid.Column="1" Margin="2" Name="datePickerOperationEnd_End" Format="Custom" FormatString="dd.MM. yyyy HH:mm" IsEnabled="False">
|
||||
<xctk:DateTimePicker.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem Header="{x:Static p:Resources.textClearValue}" Name="contextMenuItemClearOperationEnd_End" Click="contextMenuItemClearOperationEnd_End_Click">
|
||||
<MenuItem.Icon>
|
||||
<Image Source="Resources\delete.png" />
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</xctk:DateTimePicker.ContextMenu>
|
||||
</xctk:DateTimePicker>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
<ComboBox Name="comboBoxBerth" Grid.Column="1" Grid.Row="2" Margin="2" DisplayMemberPath="Name" SelectedValuePath="Id" IsEnabled="False">
|
||||
<ComboBox.ContextMenu>
|
||||
<ContextMenu>
|
||||
|
||||
@ -44,6 +44,16 @@ namespace BreCalClient
|
||||
this.datePickerOperationEnd.Value = null;
|
||||
}
|
||||
|
||||
private void contextMenuItemClearOperationStart_End_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.datePickerOperationStart_End.Value = null;
|
||||
}
|
||||
|
||||
private void contextMenuItemClearOperationEnd_End_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.datePickerOperationEnd_End.Value = null;
|
||||
}
|
||||
|
||||
private void contextMenuItemBerth_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.comboBoxBerth.SelectedIndex -= 1;
|
||||
@ -80,6 +90,8 @@ namespace BreCalClient
|
||||
};
|
||||
this.Times.OperationsStart = this.datePickerOperationStart.Value;
|
||||
this.Times.OperationsEnd = this.datePickerOperationEnd.Value;
|
||||
this.Times.EtaIntervalEnd = this.datePickerOperationStart_End.Value;
|
||||
this.Times.EtdIntervalEnd = this.datePickerOperationEnd_End.Value;
|
||||
this.Times.BerthId = (this.comboBoxBerth.SelectedItem != null) ? ((Berth)this.comboBoxBerth.SelectedItem).Id : null;
|
||||
this.Times.Remarks = this.textBoxRemarks.Text.Trim();
|
||||
this.Times.BerthInfo = this.textBoxBerthRemarks.Text.Trim();
|
||||
@ -89,6 +101,8 @@ namespace BreCalClient
|
||||
{
|
||||
this.datePickerOperationStart.Value = this.Times.OperationsStart;
|
||||
this.datePickerOperationEnd.Value = this.Times.OperationsEnd;
|
||||
this.datePickerOperationStart_End.Value = this.Times.EtaIntervalEnd;
|
||||
this.datePickerOperationEnd_End.Value = this.Times.EtdIntervalEnd;
|
||||
if(this.Times.PierSide == null) { this.comboBoxPierside.SelectedIndex = -1; }
|
||||
else this.comboBoxPierside.SelectedIndex = (this.Times.PierSide ?? false) ? 0 : 1;
|
||||
this.comboBoxBerth.SelectedValue = this.Times.BerthId;
|
||||
@ -115,7 +129,9 @@ namespace BreCalClient
|
||||
if (this.Times.ParticipantId != App.Participant.Id) return;
|
||||
|
||||
this.datePickerOperationStart.IsEnabled = ShipcallModel.Shipcall?.Type == ShipcallType.Arrival;
|
||||
this.datePickerOperationStart_End.IsEnabled = ShipcallModel.Shipcall?.Type == ShipcallType.Arrival;
|
||||
this.datePickerOperationEnd.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Departure) || (ShipcallModel.Shipcall?.Type == ShipcallType.Shifting);
|
||||
this.datePickerOperationEnd_End.IsEnabled = (ShipcallModel.Shipcall?.Type == ShipcallType.Departure) || (ShipcallModel.Shipcall?.Type == ShipcallType.Shifting);
|
||||
this.comboBoxBerth.IsEnabled = ShipcallModel.Shipcall?.Type == ShipcallType.Arrival;
|
||||
this.comboBoxPierside.IsEnabled = ShipcallModel.Shipcall?.Type == ShipcallType.Arrival;
|
||||
this.textBoxBerthRemarks.IsEnabled = ShipcallModel.Shipcall?.Type == ShipcallType.Arrival;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user