Hide some controls depending on arrival/departure

This commit is contained in:
Daniel Schick 2024-07-10 09:28:36 +02:00
parent e3000e1f16
commit ac8b6ba491
4 changed files with 13 additions and 6 deletions

View File

@ -16,8 +16,8 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="28" /> <RowDefinition Height="28" />
<RowDefinition Height="28" x:Name="rowETA"/> <RowDefinition Height="28" x:Name="rowETA" />
<RowDefinition Height="28" /> <RowDefinition Height="28" x:Name="rowETD" />
<RowDefinition Height="28" /> <RowDefinition Height="28" />
<RowDefinition Height="28" /> <RowDefinition Height="28" />
<RowDefinition Height="28" /> <RowDefinition Height="28" />

View File

@ -177,10 +177,13 @@ namespace BreCalClient
} }
} }
if (ShipcallModel.Shipcall?.Type == ShipcallType.Shifting) if (ShipcallModel.Shipcall?.Type != ShipcallType.Arrival)
{ {
this.rowETA.Height = new(0); this.rowETA.Height = new(0);
}
else
{
this.rowETD.Height = new(0);
} }
// setting en/dis-abled // setting en/dis-abled

View File

@ -15,8 +15,8 @@
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="28" /> <RowDefinition Height="28" x:Name="rowStart"/>
<RowDefinition Height="28" /> <RowDefinition Height="28" x:Name="rowEnd"/>
<RowDefinition Height="28" /> <RowDefinition Height="28" />
<RowDefinition Height="28" /> <RowDefinition Height="28" />
<RowDefinition Height="56" /> <RowDefinition Height="56" />

View File

@ -124,8 +124,12 @@ namespace BreCalClient
case ShipcallType.Arrival: case ShipcallType.Arrival:
this.labelStart.FontWeight = FontWeights.Bold; this.labelStart.FontWeight = FontWeights.Bold;
this.datePickerOperationStart.ContextMenu.IsEnabled = false; this.datePickerOperationStart.ContextMenu.IsEnabled = false;
this.rowEnd.Height = new(0);
break; break;
case ShipcallType.Departure: case ShipcallType.Departure:
this.rowStart.Height = new(0);
this.labelEnd.FontWeight = FontWeights.Bold;
break;
case ShipcallType.Shifting: case ShipcallType.Shifting:
this.labelEnd.FontWeight = FontWeights.Bold; this.labelEnd.FontWeight = FontWeights.Bold;
this.datePickerOperationEnd.ContextMenu.IsEnabled = false; this.datePickerOperationEnd.ContextMenu.IsEnabled = false;