515 lines
26 KiB
C#
515 lines
26 KiB
C#
// Copyright (c) 2023 schick Informatik
|
|
// Description: Show general shipcall info
|
|
//
|
|
|
|
using BreCalClient.misc.Model;
|
|
using log4net;
|
|
using System;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
|
|
namespace BreCalClient
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for ShipcallControl.xaml
|
|
/// </summary>
|
|
public partial class ShipcallControl : UserControl
|
|
{
|
|
#region Fields
|
|
|
|
Participant? _agency;
|
|
Participant? _pilot;
|
|
Participant? _mooring;
|
|
Participant? _terminal;
|
|
Participant? _tug;
|
|
Participant? _port_administration;
|
|
private static readonly ILog _log = LogManager.GetLogger(typeof(ShipcallControl));
|
|
bool ataAdded = false;
|
|
bool atdAdded = false;
|
|
bool lockTimeAdded = false;
|
|
|
|
#endregion
|
|
|
|
#region Construction
|
|
|
|
public ShipcallControl()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region events
|
|
|
|
public event Action<ShipcallControl>? EditRequested;
|
|
|
|
public event Action<ShipcallControl, Times?>? EditAgencyRequested;
|
|
|
|
internal event Action<ShipcallControl, Times?, Extensions.ParticipantType>? EditTimesRequested;
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
/// <summary>
|
|
/// this is our datasource
|
|
/// </summary>
|
|
public ShipcallControlModel? ShipcallControlModel { get; set; }
|
|
|
|
#endregion
|
|
|
|
#region public methods
|
|
|
|
public void RefreshData()
|
|
{
|
|
try
|
|
{
|
|
if (this.ShipcallControlModel != null)
|
|
{
|
|
|
|
bool shiftingNoVisible = ((this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Shifting) && this.ShipcallControlModel.ShiftSequence.HasValue);
|
|
this.textBlockShiftingSequence.Text = shiftingNoVisible ? this.ShipcallControlModel?.ShiftSequence.ToString() : "";
|
|
this.columnDefinitionShiftingSequence.Width = shiftingNoVisible ? new(20) : new(0);
|
|
|
|
string agentName = "";
|
|
string? name;
|
|
_agency = this.ShipcallControlModel.GetParticipantForType(Extensions.ParticipantType.AGENCY);
|
|
name = _agency?.Name;
|
|
if (name != null) agentName = name;
|
|
this.labelAgent.Content = name ?? "- / -";
|
|
if(_agency == null)
|
|
{
|
|
// clear agency display controls
|
|
this.labelAgencyBerth.Content = "";
|
|
this.labelAgencyETAETDValue.Content = "";
|
|
this.textBlockAgencyRemarks.Text = "";
|
|
this.textBlockAgencyBerthRemarks.Text = "";
|
|
this.textBlockDraft.Text = "";
|
|
}
|
|
|
|
_mooring = this.ShipcallControlModel.GetParticipantForType(Extensions.ParticipantType.MOORING);
|
|
name = _mooring?.Name;
|
|
this.labelMooring.Content = name ?? "- / -";
|
|
if(_mooring == null)
|
|
{
|
|
this.labelMooringETAETDValue.Content = "";
|
|
this.textBlockMooringRemarks.Text = "";
|
|
}
|
|
|
|
_pilot = this.ShipcallControlModel.GetParticipantForType(Extensions.ParticipantType.PILOT);
|
|
name = _pilot?.Name;
|
|
this.labelPilot.Content = name ?? "- / - ";
|
|
if(_pilot == null)
|
|
{
|
|
this.labelPilotETAETDValue.Content = "";
|
|
this.textBlockPilotRemarks.Text = "";
|
|
}
|
|
|
|
_tug = this.ShipcallControlModel.GetParticipantForType(Extensions.ParticipantType.TUG);
|
|
name = _tug?.Name;
|
|
this.labelTug.Content = name ?? "- / - ";
|
|
if(_tug == null)
|
|
{
|
|
this.labelTugETAETDValue.Content = "";
|
|
this.textBlockTugRemarks.Text = "";
|
|
}
|
|
|
|
_port_administration = this.ShipcallControlModel.GetParticipantForType(Extensions.ParticipantType.PORT_ADMINISTRATION);
|
|
name = _port_administration?.Name;
|
|
this.labelPortAuthority.Content = name ?? "- / - ";
|
|
if(_port_administration == null)
|
|
{
|
|
this.labelPortAuthorityETAETDValue.Content = "";
|
|
this.textBlockPortAuthorityRemarks.Text = "";
|
|
}
|
|
|
|
_terminal = this.ShipcallControlModel.GetParticipantForType(Extensions.ParticipantType.TERMINAL);
|
|
name = _terminal?.Name;
|
|
this.labelTerminal.Content = name ?? "- / - ";
|
|
if(_terminal == null)
|
|
{
|
|
this.textBlockTerminalRemarks.Text = "";
|
|
this.textBlockTerminalBerthRemarks.Text = "";
|
|
this.labelTerminalBerth.Content = "";
|
|
this.labelOperationsStart.Content = "";
|
|
}
|
|
|
|
if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.TERMINAL) && (App.Participant.Id == _terminal?.Id))
|
|
{
|
|
this.labelTerminal.FontWeight = FontWeights.Bold;
|
|
this.labelTerminal.Foreground = Brushes.LightYellow;
|
|
}
|
|
else
|
|
{
|
|
this.labelTerminal.FontWeight = FontWeights.Normal;
|
|
this.labelTerminal.Foreground = Brushes.White;
|
|
}
|
|
|
|
if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.PILOT) && (App.Participant.Id == _pilot?.Id))
|
|
{
|
|
this.labelPilot.FontWeight = FontWeights.Bold;
|
|
this.labelPilot.Foreground = Brushes.LightYellow;
|
|
}
|
|
else
|
|
{
|
|
this.labelPilot.FontWeight = FontWeights.Normal;
|
|
this.labelPilot.Foreground = Brushes.White;
|
|
}
|
|
|
|
if ((App.Participant.IsTypeFlagSet(Extensions.ParticipantType.AGENCY) && (App.Participant.Id == _agency?.Id)) ||
|
|
(App.Participant.IsTypeFlagSet(Extensions.ParticipantType.BSMD) && (_agency != null) && _agency.IsFlagSet(Extensions.ParticipantFlag.ALLOW_BSMD)))
|
|
{
|
|
this.labelAgent.FontWeight = FontWeights.Bold;
|
|
this.labelAgent.Foreground = Brushes.LightYellow;
|
|
}
|
|
else
|
|
{
|
|
this.labelAgent.FontWeight = FontWeights.Normal;
|
|
this.labelAgent.Foreground = Brushes.White;
|
|
}
|
|
|
|
if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.MOORING) && (App.Participant.Id == _mooring?.Id))
|
|
{
|
|
this.labelMooring.FontWeight = FontWeights.Bold;
|
|
this.labelMooring.Foreground = Brushes.LightYellow;
|
|
}
|
|
else
|
|
{
|
|
this.labelMooring.FontWeight = FontWeights.Normal;
|
|
this.labelMooring.Foreground = Brushes.White;
|
|
}
|
|
|
|
if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.PORT_ADMINISTRATION) && (App.Participant.Id == _port_administration?.Id))
|
|
{
|
|
this.labelPortAuthority.FontWeight = FontWeights.Bold;
|
|
this.labelPortAuthority.Foreground = Brushes.LightYellow;
|
|
}
|
|
else
|
|
{
|
|
this.labelPortAuthority.FontWeight = FontWeights.Normal;
|
|
this.labelPortAuthority.Foreground = Brushes.White;
|
|
}
|
|
|
|
if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.TUG) && (App.Participant.Id == _tug?.Id))
|
|
{
|
|
this.labelTug.FontWeight = FontWeights.Bold;
|
|
this.labelTug.Foreground = Brushes.LightYellow;
|
|
}
|
|
else
|
|
{
|
|
this.labelTug.FontWeight = FontWeights.Normal;
|
|
this.labelTug.Foreground = Brushes.White;
|
|
}
|
|
|
|
if (App.Participant.IsTypeFlagSet(Extensions.ParticipantType.BSMD))
|
|
{
|
|
this.labelShipName.FontWeight = FontWeights.Bold;
|
|
this.labelShipName.Foreground = Brushes.LightYellow;
|
|
}
|
|
else
|
|
{
|
|
this.labelShipName.FontWeight = FontWeights.Normal;
|
|
this.labelShipName.Foreground = Brushes.White;
|
|
}
|
|
|
|
this.textBlockShipName.Text = this.ShipcallControlModel?.Ship?.Name;
|
|
// this.labelShipName.Content = this.ShipcallControlModel?.Ship?.Name;
|
|
switch (this.ShipcallControlModel?.Shipcall?.Type)
|
|
{
|
|
case ShipcallType.Arrival: // incoming
|
|
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalDevelClient;component/Resources/arrow_down_red.png"));
|
|
break;
|
|
case ShipcallType.Departure: // outgoing
|
|
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalDevelClient;component/Resources/arrow_up_blue.png"));
|
|
break;
|
|
case ShipcallType.Shifting: // shifting
|
|
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalDevelClient;component/Resources/arrow_right_green.png"));
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
|
|
switch(this.ShipcallControlModel?.LightMode)
|
|
{
|
|
case EvaluationType.Green:
|
|
this.imageEvaluation.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalDevelClient;component/Resources/check.png"));
|
|
break;
|
|
case EvaluationType.Yellow:
|
|
this.imageEvaluation.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalDevelClient;component/Resources/sign_warning.png"));
|
|
break;
|
|
case EvaluationType.Red:
|
|
this.imageEvaluation.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalDevelClient;component/Resources/delete2.png"));
|
|
break;
|
|
default:
|
|
break;
|
|
}
|
|
|
|
if (this.ShipcallControlModel?.Shipcall?.Canceled ?? false)
|
|
{
|
|
this.Background = Brushes.LightGray;
|
|
//this.Foreground = Brushes.DarkGray;
|
|
this.labelShipName.Foreground = Brushes.LightGray;
|
|
this.textBlockShipName.TextDecorations.Add(TextDecorations.Strikethrough);
|
|
}
|
|
else
|
|
{
|
|
if (this.ShipcallControlModel?.Shipcall?.Evaluation != null)
|
|
{
|
|
this.Background = this.ShipcallControlModel.LightMode switch
|
|
{
|
|
// ShipcallControlModel.TrafficLightMode.GREEN => this.Background = Brushes.LightGreen,
|
|
EvaluationType.Yellow => Brushes.LightYellow,
|
|
EvaluationType.Red => new SolidColorBrush(Color.FromArgb(200, 255, 100, 100)),
|
|
_ => Brushes.Transparent,
|
|
};
|
|
}
|
|
}
|
|
|
|
if (!string.IsNullOrEmpty(this.ShipcallControlModel?.Shipcall?.EvaluationMessage))
|
|
this.imageEvaluation.ToolTip = this.ShipcallControlModel?.Shipcall?.EvaluationMessage;
|
|
else
|
|
this.imageEvaluation.ToolTip = null;
|
|
|
|
//Times? bsmdTimes = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.BSMD);
|
|
//if (bsmdTimes != null)
|
|
this.textBlockBerth.Text = this.ShipcallControlModel?.GetBerthText(null);
|
|
//else
|
|
// this.textBlockBerth.Text = this.ShipcallControlModel?.Berth;
|
|
|
|
this.textBlockCallsign.Text = this.ShipcallControlModel?.Ship?.Callsign;
|
|
if (this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival)
|
|
{
|
|
this.textBlockETA.Text = this.ShipcallControlModel?.Shipcall?.Eta?.ToString("dd.MM. HH:mm");
|
|
}
|
|
if ((this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Departure) || (this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Shifting))
|
|
{
|
|
this.labelETA.Text = "ETD";
|
|
this.textBlockETA.Text = this.ShipcallControlModel?.Shipcall?.Etd?.ToString("dd.MM. HH:mm");
|
|
}
|
|
|
|
this.textBlockIMO.Text = this.ShipcallControlModel?.Ship?.Imo.ToString();
|
|
this.textBlockLengthWidth.Text = $"{this.ShipcallControlModel?.Ship?.Length} / {this.ShipcallControlModel?.Ship?.Width}";
|
|
|
|
// rename labels if this is not an incoming
|
|
// must be here because there may not be a times record for each participant (yet)
|
|
|
|
if (this.ShipcallControlModel?.Shipcall?.Type != ShipcallType.Arrival)
|
|
{
|
|
this.labelETAETDAgent.Content = "ETD";
|
|
this.labelETAETDMooring.Content = "ETD";
|
|
this.labelETAETDPilot.Content = "ETD";
|
|
this.labelETAETDPortAuthority.Content = "ETD";
|
|
this.labelETAETDTug.Content = "ETD";
|
|
this.labelETAETDTerminal.Content = BreCalClient.Resources.Resources.textOperationsEnd;
|
|
}
|
|
|
|
if((this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival) && (this.ShipcallControlModel?.Shipcall.TimeRefPoint != null))
|
|
{
|
|
int timeRefPointIndex = this.ShipcallControlModel?.Shipcall?.TimeRefPoint ?? 0;
|
|
|
|
this.labelETAETDAgent.Content = BreCalLists.TimeRefs[timeRefPointIndex];
|
|
this.labelETAETDMooring.Content = BreCalLists.TimeRefs[timeRefPointIndex];
|
|
this.labelETAETDPilot.Content = BreCalLists.TimeRefs[timeRefPointIndex];
|
|
this.labelETAETDPortAuthority.Content = BreCalLists.TimeRefs[timeRefPointIndex];
|
|
this.labelETAETDTug.Content = BreCalLists.TimeRefs[timeRefPointIndex];
|
|
}
|
|
|
|
if (this.ShipcallControlModel != null)
|
|
{
|
|
|
|
Times? agencyTimes = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.AGENCY);
|
|
if (agencyTimes != null)
|
|
{
|
|
this.labelAgencyBerth.Content = this.ShipcallControlModel?.GetBerthText(agencyTimes);
|
|
this.labelAgencyETAETDValue.Content = agencyTimes.DisplayTime(this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival);
|
|
this.textBlockAgencyRemarks.Text = agencyTimes.Remarks.TruncateDots(50);
|
|
this.textBlockAgencyBerthRemarks.Text = agencyTimes.BerthInfo.TruncateDots(50);
|
|
this.textBlockDraft.Text = ShipcallControlModel?.Shipcall?.Draft?.ToString("N2");
|
|
}
|
|
else
|
|
{
|
|
// no agency times set (yet)
|
|
this.labelAgencyBerth.Content = "";
|
|
this.labelAgencyETAETDValue.Content = "- / -";
|
|
this.textBlockAgencyRemarks.Text = "";
|
|
this.textBlockAgencyBerthRemarks.Text = "";
|
|
this.textBlockDraft.Text = "";
|
|
}
|
|
|
|
Times? mooringTimes = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.MOORING);
|
|
|
|
if (mooringTimes != null)
|
|
{
|
|
|
|
this.labelMooringETAETDValue.Content = mooringTimes.DisplayTime(this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival);
|
|
this.textBlockMooringRemarks.Text = mooringTimes.Remarks.TruncateDots(50);
|
|
this.imageMooringLocked.Visibility = (mooringTimes.EtaBerthFixed ?? false) ? Visibility.Visible : Visibility.Hidden;
|
|
|
|
if(mooringTimes.Ata.HasValue)
|
|
{
|
|
if(!ataAdded)
|
|
{
|
|
|
|
ataRowDefinition.Height = new GridLength(15);
|
|
labelTimesMooringATA.Content = mooringTimes.Ata.Value.ToString("dd.MM.yyyy HH:mm");
|
|
ataAdded = true;
|
|
}
|
|
}
|
|
|
|
if (mooringTimes.Atd.HasValue)
|
|
{
|
|
if (!atdAdded)
|
|
{
|
|
atdRowDefinition.Height = new GridLength(15);
|
|
labelTimesMooringATD.Content = mooringTimes.Atd.Value.ToString("dd.MM.yyyy HH:mm");
|
|
atdAdded = true;
|
|
}
|
|
}
|
|
|
|
}
|
|
else
|
|
{
|
|
this.labelMooringETAETDValue.Content = "- / ";
|
|
this.textBlockMooringRemarks.Text = "";
|
|
this.imageMooringLocked.Visibility = Visibility.Hidden;
|
|
}
|
|
|
|
Times? portAuthorityTimes = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.PORT_ADMINISTRATION);
|
|
if (portAuthorityTimes != null)
|
|
{
|
|
this.labelPortAuthorityETAETDValue.Content = portAuthorityTimes.DisplayTime(this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival);
|
|
this.textBlockPortAuthorityRemarks.Text = portAuthorityTimes.Remarks.TruncateDots(50);
|
|
this.imagePortAuthorityLocked.Visibility = (portAuthorityTimes.EtaBerthFixed ?? false) ? Visibility.Visible : Visibility.Hidden;
|
|
if(portAuthorityTimes.LockTime.HasValue)
|
|
{
|
|
if(!lockTimeAdded)
|
|
{
|
|
lockTimeRowDefinition.Height = new GridLength(15);
|
|
lockTimeAdded = true;
|
|
}
|
|
labelPortAuthorityLockTime.Content = portAuthorityTimes.LockTime.Value.ToString("dd.MM.yyyy HH:mm");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.labelPortAuthorityETAETDValue.Content = "- / -";
|
|
this.textBlockPortAuthorityRemarks.Text = "";
|
|
this.imagePortAuthorityLocked.Visibility = Visibility.Hidden;
|
|
}
|
|
|
|
Times? pilotTimes = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.PILOT);
|
|
if (pilotTimes != null)
|
|
{
|
|
this.labelPilotETAETDValue.Content = pilotTimes.DisplayTime(this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival);
|
|
this.textBlockPilotRemarks.Text = pilotTimes.Remarks.TruncateDots(50);
|
|
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);
|
|
if (tugTimes != null)
|
|
{
|
|
this.labelTugETAETDValue.Content = tugTimes.DisplayTime(this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival);
|
|
this.textBlockTugRemarks.Text = tugTimes.Remarks.TruncateDots(50);
|
|
this.imageTugLocked.Visibility = (tugTimes.EtaBerthFixed ?? false) ? Visibility.Visible : Visibility.Hidden;
|
|
}
|
|
else
|
|
{
|
|
this.labelTugETAETDValue.Content = "- / -";
|
|
this.textBlockTugRemarks.Text = "";
|
|
this.imageTugLocked.Visibility = Visibility.Hidden;
|
|
}
|
|
|
|
this.rowDefinitionTerminalBerth.Height = (this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival) ? new(14) : new(0);
|
|
this.rowDefinitionTerminalBerthRemarks.Height = (this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival) ? new GridLength(.5, GridUnitType.Star) : new(0);
|
|
|
|
Times ? terminalTimes = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.TERMINAL);
|
|
if (terminalTimes != null)
|
|
{
|
|
this.labelTerminalBerth.Visibility = (this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival) ? Visibility.Visible : Visibility.Hidden;
|
|
this.labelTerminalBerth.Content = this.ShipcallControlModel?.GetBerthText(terminalTimes);
|
|
this.labelOperationsStart.Content = terminalTimes.DisplayTime(this.ShipcallControlModel?.Shipcall?.Type == ShipcallType.Arrival);
|
|
this.textBlockTerminalRemarks.Text = terminalTimes.Remarks.TruncateDots(40);
|
|
this.textBlockTerminalBerthRemarks.Text = terminalTimes.BerthInfo.TruncateDots(40);
|
|
}
|
|
else
|
|
{
|
|
this.labelTerminalBerth.Content = "";
|
|
this.labelOperationsStart.Content = "";
|
|
this.textBlockTerminalRemarks.Text = "";
|
|
this.textBlockTerminalBerthRemarks.Text = "";
|
|
}
|
|
|
|
}
|
|
this.DataContext = this.ShipcallControlModel;
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
_log.ErrorFormat("Something went wrong during data refresh: {0}", ex.ToString());
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region event handler
|
|
|
|
private void buttonEditShipcall_Click(object? sender, RoutedEventArgs? e)
|
|
{
|
|
if(App.Participant.IsTypeFlagSet(Extensions.ParticipantType.BSMD))
|
|
this.EditRequested?.Invoke(this);
|
|
}
|
|
|
|
private void Image_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
|
{
|
|
this.buttonEditShipcall_Click(null, null);
|
|
}
|
|
|
|
private void labelAgent_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
|
{
|
|
Times? times = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.AGENCY);
|
|
this.EditAgencyRequested?.Invoke(this, times);
|
|
}
|
|
|
|
private void labelMooring_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
|
{
|
|
Times? times = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.MOORING);
|
|
this.EditTimesRequested?.Invoke(this, times, Extensions.ParticipantType.MOORING);
|
|
}
|
|
|
|
private void labelPortAuthority_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
|
{
|
|
Times? times = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.PORT_ADMINISTRATION);
|
|
this.EditTimesRequested?.Invoke(this, times, Extensions.ParticipantType.PORT_ADMINISTRATION);
|
|
}
|
|
|
|
private void labelPilot_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
|
{
|
|
Times? times = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.PILOT);
|
|
this.EditTimesRequested?.Invoke(this, times, Extensions.ParticipantType.PILOT);
|
|
}
|
|
|
|
private void labelTug_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
|
{
|
|
Times? times = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.TUG);
|
|
this.EditTimesRequested?.Invoke(this, times, Extensions.ParticipantType.TUG);
|
|
}
|
|
|
|
private void labelTerminal_PreviewMouseUp(object sender, System.Windows.Input.MouseButtonEventArgs e)
|
|
{
|
|
Times? times = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.TERMINAL);
|
|
this.EditTimesRequested?.Invoke(this, times, Extensions.ParticipantType.TERMINAL);
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
}
|