From 9087d680253f3cbf373b1bdc8aaea1c13bd5965f Mon Sep 17 00:00:00 2001 From: puls200 Date: Wed, 18 Oct 2023 08:15:38 +0200 Subject: [PATCH] Fixed participant type evaluation for Times edit control --- src/BreCalClient/EditTimesControl.xaml.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/BreCalClient/EditTimesControl.xaml.cs b/src/BreCalClient/EditTimesControl.xaml.cs index 66ceb6d..4b5850e 100644 --- a/src/BreCalClient/EditTimesControl.xaml.cs +++ b/src/BreCalClient/EditTimesControl.xaml.cs @@ -27,9 +27,7 @@ namespace BreCalClient public Times Times { get; set; } = new(); - public Extensions.TypeEnum CallType { get; set; } - - internal Extensions.ParticipantType ParticipantType { get; set; } = Extensions.ParticipantType.NONE; + public Extensions.TypeEnum CallType { get; set; } #endregion @@ -88,7 +86,9 @@ namespace BreCalClient private void EnableControls() { - switch (this.ParticipantType) + Extensions.ParticipantType pType = (Extensions.ParticipantType) (this.Times.ParticipantType ?? 0); + + switch (pType) { case Extensions.ParticipantType.MOORING: case Extensions.ParticipantType.PORT_ADMINISTRATION: