Set SetEnabled per override on top-level groupboxes. Not sure yet if this is going to cut it.
This commit is contained in:
parent
7c8eed08bd
commit
2004362e1a
@ -74,7 +74,7 @@ namespace ENI2.SheetDisplayControls
|
||||
public override void SetEnabled(bool enabled)
|
||||
{
|
||||
base.SetEnabled(enabled);
|
||||
|
||||
this.portCallGroupBox.IsEnabled = enabled;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
xmlns:local="clr-namespace:ENI2.SheetDisplayControls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="1450" d:DesignWidth="800">
|
||||
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.text7CrewDeparture}">
|
||||
<GroupBox Name="crewDepartureGroupBox" Header="{x:Static p:Resources.text7CrewDeparture}">
|
||||
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@ -88,7 +88,12 @@ namespace ENI2.SheetDisplayControls
|
||||
|
||||
}
|
||||
|
||||
|
||||
public override void SetEnabled(bool enabled)
|
||||
{
|
||||
base.SetEnabled(enabled);
|
||||
this.crewDepartureGroupBox.IsEnabled = enabled;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region event handler
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
xmlns:local="clr-namespace:ENI2.SheetDisplayControls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="1450" d:DesignWidth="800">
|
||||
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.text6CrewDataOnArrival}">
|
||||
<GroupBox Name="crewPreArrivalGroupBox" Header="{x:Static p:Resources.text6CrewDataOnArrival}">
|
||||
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@ -93,6 +93,12 @@ namespace ENI2.SheetDisplayControls
|
||||
|
||||
}
|
||||
|
||||
public override void SetEnabled(bool enabled)
|
||||
{
|
||||
base.SetEnabled(enabled);
|
||||
this.crewPreArrivalGroupBox.IsEnabled = enabled;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region event handler
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
xmlns:local="clr-namespace:ENI2.SheetDisplayControls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="1550" d:DesignWidth="800">
|
||||
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.text10DangerousCargoArrival}">
|
||||
<GroupBox Name="dangerousCargoGroupBox" Header="{x:Static p:Resources.text10DangerousCargoArrival}">
|
||||
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@ -7,19 +7,9 @@ using ENI2.EditControls;
|
||||
using ENI2.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace ENI2.SheetDisplayControls
|
||||
{
|
||||
@ -164,6 +154,7 @@ namespace ENI2.SheetDisplayControls
|
||||
|
||||
public override void SetEnabled(bool enabled)
|
||||
{
|
||||
this.dangerousCargoGroupBox.IsEnabled = enabled;
|
||||
this.dataGridIBCItems.IsEnabled = enabled;
|
||||
// this.checkBoxDangerousGoodsOnBoard.IsEnabled = enabled;
|
||||
this.checkBoxDGManifestOnBoard.IsEnabled = enabled;
|
||||
@ -198,7 +189,7 @@ namespace ENI2.SheetDisplayControls
|
||||
|
||||
if(this.IsDeparture)
|
||||
{
|
||||
this.portCallGroupBox.Header = Properties.Resources.text11DangerousCargoDeparture;
|
||||
this.dangerousCargoGroupBox.Header = Properties.Resources.text11DangerousCargoDeparture;
|
||||
this.textBlock101.Text = Properties.Resources.text111General;
|
||||
this.textBlock102.Text = Properties.Resources.text112IBCData;
|
||||
this.textBlock103.Text = Properties.Resources.text113IGCData;
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
xmlns:local="clr-namespace:ENI2.SheetDisplayControls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="1450" d:DesignWidth="800">
|
||||
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.text9PassengerDeparture}">
|
||||
<GroupBox Name="passengerDepartureGroupBox" Header="{x:Static p:Resources.text9PassengerDeparture}">
|
||||
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@ -89,6 +89,12 @@ namespace ENI2.SheetDisplayControls
|
||||
|
||||
}
|
||||
|
||||
public override void SetEnabled(bool enabled)
|
||||
{
|
||||
base.SetEnabled(enabled);
|
||||
this.passengerDepartureGroupBox.IsEnabled = enabled;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region event handler
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
xmlns:local="clr-namespace:ENI2.SheetDisplayControls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="1450" d:DesignWidth="800">
|
||||
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.text8PassengerArrival}">
|
||||
<GroupBox Name="passengerArrivalGroupBox" Header="{x:Static p:Resources.text8PassengerArrival}">
|
||||
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@ -89,6 +89,12 @@ namespace ENI2.SheetDisplayControls
|
||||
|
||||
}
|
||||
|
||||
public override void SetEnabled(bool enabled)
|
||||
{
|
||||
base.SetEnabled(enabled);
|
||||
this.passengerArrivalGroupBox.IsEnabled = enabled;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region event handler
|
||||
|
||||
@ -185,8 +185,16 @@ namespace ENI2.SheetDisplayControls
|
||||
|
||||
}
|
||||
|
||||
public override void SetEnabled(bool enabled)
|
||||
{
|
||||
base.SetEnabled(enabled);
|
||||
this.portCallGroupBox.IsEnabled = enabled;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region event hander
|
||||
|
||||
private void PortControl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// 2.1
|
||||
@ -535,6 +543,10 @@ namespace ENI2.SheetDisplayControls
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Templates
|
||||
|
||||
private async Task InitTemplates()
|
||||
{
|
||||
_wsdpTemplates = await DBManagerAsync.GetWastDisposalServiceProviderTemplatesAsync();
|
||||
@ -626,6 +638,8 @@ namespace ENI2.SheetDisplayControls
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region datagrid call purposes
|
||||
|
||||
private void DataGridCallPurposes_DeleteRequested(DatabaseEntity obj)
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
xmlns:local="clr-namespace:ENI2.SheetDisplayControls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="850" d:DesignWidth="800">
|
||||
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.text3PreArrival}">
|
||||
<GroupBox Name="preArrivalGroupBox" Header="{x:Static p:Resources.text3PreArrival}">
|
||||
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@ -102,8 +102,16 @@ namespace ENI2.SheetDisplayControls
|
||||
|
||||
}
|
||||
|
||||
public override void SetEnabled(bool enabled)
|
||||
{
|
||||
base.SetEnabled(enabled);
|
||||
this.preArrivalGroupBox.IsEnabled = enabled;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region event handler
|
||||
|
||||
private void PreArrivalControl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// 3.1
|
||||
@ -186,6 +194,8 @@ namespace ENI2.SheetDisplayControls
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region BKRA grid events
|
||||
|
||||
private void DataGridBKRA_CreateRequested()
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
xmlns:local="clr-namespace:ENI2.SheetDisplayControls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="850" d:DesignWidth="800">
|
||||
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.text4PreDeparture}">
|
||||
<GroupBox Name="preDepartureGroupBox" Header="{x:Static p:Resources.text4PreDeparture}">
|
||||
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@ -92,8 +92,16 @@ namespace ENI2.SheetDisplayControls
|
||||
this.dataGridTowageOnDeparture.CreateRequested += DataGridTowageOnDeparture_CreateRequested;
|
||||
}
|
||||
|
||||
public override void SetEnabled(bool enabled)
|
||||
{
|
||||
base.SetEnabled(enabled);
|
||||
this.preDepartureGroupBox.IsEnabled = enabled;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region event handler
|
||||
|
||||
private void PreDepartureControl_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
// 4.1
|
||||
@ -172,6 +180,8 @@ namespace ENI2.SheetDisplayControls
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region BKRD grid events
|
||||
|
||||
private void DataGridBKRD_CreateRequested()
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
xmlns:local="clr-namespace:ENI2.SheetDisplayControls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="1450" d:DesignWidth="800">
|
||||
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.text3PreArrival}">
|
||||
<GroupBox Name="shipDataGroupBox" Header="{x:Static p:Resources.text3PreArrival}">
|
||||
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@ -112,6 +112,12 @@ namespace ENI2.SheetDisplayControls
|
||||
|
||||
}
|
||||
|
||||
public override void SetEnabled(bool enabled)
|
||||
{
|
||||
base.SetEnabled(enabled);
|
||||
this.shipDataGroupBox.IsEnabled = enabled;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region event handler
|
||||
|
||||
@ -177,8 +177,12 @@ namespace ENI2.SheetDisplayControls
|
||||
this.dataGridInfectedAreas.DeleteRequested += DataGridInfectedAreas_DeleteRequested;
|
||||
this.dataGridInfectedAreas.CreateRequested += DataGridInfectedAreas_CreateRequested;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public override void SetEnabled(bool enabled)
|
||||
{
|
||||
base.SetEnabled(enabled);
|
||||
this.voyageGroupBox.IsEnabled = enabled;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
xmlns:local="clr-namespace:ENI2.SheetDisplayControls"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="600" d:DesignWidth="800">
|
||||
<GroupBox Name="portCallGroupBox" Header="{x:Static p:Resources.text13WasteReceipts}">
|
||||
<GroupBox Name="wasteReceiptsGroupBox" Header="{x:Static p:Resources.text13WasteReceipts}">
|
||||
<ScrollViewer PreviewMouseWheel="ScrollViewer_PreviewMouseWheel">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@ -107,6 +107,7 @@ namespace ENI2.SheetDisplayControls
|
||||
public override void SetEnabled(bool enabled)
|
||||
{
|
||||
base.SetEnabled(enabled);
|
||||
this.wasteReceiptsGroupBox.IsEnabled = enabled;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Loading…
Reference in New Issue
Block a user