From 36b171118957201c71a488ee210c321dff6ea3e8 Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Sat, 7 Oct 2023 08:57:07 +0200 Subject: [PATCH] kein 3-state Checkboxen mehr in den Agentur-Dialgoen --- .../EditTimesAgencyIncomingControl.xaml.cs | 16 ++++++++-------- .../EditTimesAgencyOutgoingControl.xaml.cs | 10 +++++----- .../EditTimesAgencyShiftingControl.xaml.cs | 10 +++++----- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs b/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs index 968923f..48f2b34 100644 --- a/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs +++ b/src/BreCalClient/EditTimesAgencyIncomingControl.xaml.cs @@ -152,18 +152,18 @@ namespace BreCalClient this.doubleUpDownDraft.Value = this.ShipcallModel.Shipcall.Draft; this.datePickerTidalWindowFrom.Value = this.ShipcallModel.Shipcall.TidalWindowFrom; this.datePickerTidalWindowTo.Value = this.ShipcallModel.Shipcall.TidalWindowTo; - this.checkBoxCanceled.IsChecked = this.ShipcallModel.Shipcall.Canceled; + this.checkBoxCanceled.IsChecked = this.ShipcallModel.Shipcall.Canceled ?? false; - this.checkBoxAnchored.IsChecked = this.ShipcallModel.Shipcall.Anchored; - this.checkBoxTugRequired.IsChecked = this.ShipcallModel.Shipcall.TugRequired; + this.checkBoxAnchored.IsChecked = this.ShipcallModel.Shipcall.Anchored ?? false; + this.checkBoxTugRequired.IsChecked = this.ShipcallModel.Shipcall.TugRequired ?? false; this.integerUpDownRecommendedTugs.Value = this.ShipcallModel.Shipcall.RecommendedTugs; - this.checkBoxPilotRequired.IsChecked = this.ShipcallModel.Shipcall.PilotRequired; + this.checkBoxPilotRequired.IsChecked = this.ShipcallModel.Shipcall.PilotRequired ?? false; - this.checkBoxMooredLock.IsChecked = this.ShipcallModel.Shipcall.MooredLock; + this.checkBoxMooredLock.IsChecked = this.ShipcallModel.Shipcall.MooredLock ?? false; - this.checkBoxBunkering.IsChecked = this.ShipcallModel.Shipcall.Bunkering; - this.checkBoxReplenishingLock.IsChecked = this.ShipcallModel.Shipcall.ReplenishingLock; - this.checkBoxReplenishingTerminal.IsChecked = this.ShipcallModel.Shipcall.ReplenishingTerminal; + this.checkBoxBunkering.IsChecked = this.ShipcallModel.Shipcall.Bunkering ?? false; + this.checkBoxReplenishingLock.IsChecked = this.ShipcallModel.Shipcall.ReplenishingLock ?? false; + this.checkBoxReplenishingTerminal.IsChecked = this.ShipcallModel.Shipcall.ReplenishingTerminal ?? false; if(!string.IsNullOrEmpty(this.Times.Remarks)) this.textBoxRemarks.Text = this.Times.Remarks; diff --git a/src/BreCalClient/EditTimesAgencyOutgoingControl.xaml.cs b/src/BreCalClient/EditTimesAgencyOutgoingControl.xaml.cs index 17ccaf1..f53a5e8 100644 --- a/src/BreCalClient/EditTimesAgencyOutgoingControl.xaml.cs +++ b/src/BreCalClient/EditTimesAgencyOutgoingControl.xaml.cs @@ -147,14 +147,14 @@ namespace BreCalClient this.doubleUpDownDraft.Value = this.ShipcallModel.Shipcall.Draft; this.datePickerTidalWindowFrom.Value = this.ShipcallModel.Shipcall.TidalWindowFrom; this.datePickerTidalWindowTo.Value = this.ShipcallModel.Shipcall.TidalWindowTo; - this.checkBoxCanceled.IsChecked = this.ShipcallModel.Shipcall.Canceled; + this.checkBoxCanceled.IsChecked = this.ShipcallModel.Shipcall.Canceled ?? false; - this.checkBoxTugRequired.IsChecked = this.ShipcallModel.Shipcall.TugRequired; + this.checkBoxTugRequired.IsChecked = this.ShipcallModel.Shipcall.TugRequired ?? false; this.integerUpDownRecommendedTugs.Value = this.ShipcallModel.Shipcall.RecommendedTugs; - this.checkBoxPilotRequired.IsChecked = this.ShipcallModel.Shipcall.PilotRequired; + this.checkBoxPilotRequired.IsChecked = this.ShipcallModel.Shipcall.PilotRequired ?? false; - this.checkBoxMooredLock.IsChecked = this.ShipcallModel.Shipcall.MooredLock; - this.checkBoxRainsensitiveCargo.IsChecked = this.ShipcallModel.Shipcall.RainSensitiveCargo; + this.checkBoxMooredLock.IsChecked = this.ShipcallModel.Shipcall.MooredLock ?? false; + this.checkBoxRainsensitiveCargo.IsChecked = this.ShipcallModel.Shipcall.RainSensitiveCargo ?? false; if(!string.IsNullOrEmpty(this.Times.Remarks)) this.textBoxRemarks.Text = this.Times.Remarks; diff --git a/src/BreCalClient/EditTimesAgencyShiftingControl.xaml.cs b/src/BreCalClient/EditTimesAgencyShiftingControl.xaml.cs index eaf3478..362cfc8 100644 --- a/src/BreCalClient/EditTimesAgencyShiftingControl.xaml.cs +++ b/src/BreCalClient/EditTimesAgencyShiftingControl.xaml.cs @@ -164,14 +164,14 @@ namespace BreCalClient this.doubleUpDownDraft.Value = this.ShipcallModel.Shipcall.Draft; this.datePickerTidalWindowFrom.Value = this.ShipcallModel.Shipcall.TidalWindowFrom; this.datePickerTidalWindowTo.Value = this.ShipcallModel.Shipcall.TidalWindowTo; - this.checkBoxCanceled.IsChecked = this.ShipcallModel.Shipcall.Canceled; + this.checkBoxCanceled.IsChecked = this.ShipcallModel.Shipcall.Canceled ?? false; - this.checkBoxTugRequired.IsChecked = this.ShipcallModel.Shipcall.TugRequired; + this.checkBoxTugRequired.IsChecked = this.ShipcallModel.Shipcall.TugRequired ?? false; this.integerUpDownRecommendedTugs.Value = this.ShipcallModel.Shipcall.RecommendedTugs; - this.checkBoxPilotRequired.IsChecked = this.ShipcallModel.Shipcall.PilotRequired; + this.checkBoxPilotRequired.IsChecked = this.ShipcallModel.Shipcall.PilotRequired ?? false; - this.checkBoxMooredLock.IsChecked = this.ShipcallModel.Shipcall.MooredLock; - this.checkBoxRainsensitiveCargo.IsChecked = this.ShipcallModel.Shipcall.RainSensitiveCargo; + this.checkBoxMooredLock.IsChecked = this.ShipcallModel.Shipcall.MooredLock ?? false; + this.checkBoxRainsensitiveCargo.IsChecked = this.ShipcallModel.Shipcall.RainSensitiveCargo ?? false; if(!string.IsNullOrEmpty(this.Times.Remarks)) this.textBoxRemarks.Text = this.Times.Remarks;