probably fixed the bug but cannot test because server side is not compatible

This commit is contained in:
Daniel Schick 2023-12-24 11:08:10 +01:00
parent ae349b3781
commit cbc77ae157

View File

@ -131,6 +131,11 @@ namespace BreCalClient
{
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))
@ -138,6 +143,11 @@ namespace BreCalClient
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)))
@ -145,30 +155,55 @@ namespace BreCalClient
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;
@ -266,8 +301,7 @@ namespace BreCalClient
}
if (this.ShipcallControlModel != null)
{
{
Times? agencyTimes = this.ShipcallControlModel?.GetTimesForParticipantType(Extensions.ParticipantType.AGENCY);
if (agencyTimes != null)