diff --git a/src/BreCalClient/BreCalClient.csproj b/src/BreCalClient/BreCalClient.csproj
index d69e72f..72411c3 100644
--- a/src/BreCalClient/BreCalClient.csproj
+++ b/src/BreCalClient/BreCalClient.csproj
@@ -19,6 +19,8 @@
+
+
@@ -65,6 +67,8 @@
+
+
diff --git a/src/BreCalClient/EditShipcallControl.xaml.cs b/src/BreCalClient/EditShipcallControl.xaml.cs
index d4ae813..0f36dce 100644
--- a/src/BreCalClient/EditShipcallControl.xaml.cs
+++ b/src/BreCalClient/EditShipcallControl.xaml.cs
@@ -71,6 +71,8 @@ namespace BreCalClient
this.comboBoxDepartureBerth.ItemsSource = this.Berths;
this.CopyToControls();
+
+ this.EnableControls();
}
private void buttonOK_Click(object sender, RoutedEventArgs e)
@@ -266,6 +268,40 @@ namespace BreCalClient
}
}
+ private void EnableControls()
+ {
+ bool isBsmd = App.Participant.IsFlagSet(Extensions.ParticipantType.BSMD);
+ bool isAgency = App.Participant.IsFlagSet(Extensions.ParticipantType.AGENCY);
+
+ this.comboBoxAgency.IsEnabled = isBsmd;
+ this.comboBoxArrivalBerth.IsEnabled = isBsmd || isAgency;
+ this.comboBoxCategories.IsEnabled = isBsmd;
+ this.comboBoxDepartureBerth.IsEnabled = isBsmd || isAgency;
+ this.checkBoxAnchored.IsEnabled = isAgency;
+ this.checkBoxBunkering.IsEnabled = isAgency;
+ this.checkBoxCanceled.IsEnabled = isBsmd || isAgency;
+ this.checkBoxMooredLock.IsEnabled = isAgency;
+ this.checkBoxPilotRequired.IsEnabled = isAgency;
+ this.checkBoxRainsensitiveCargo.IsEnabled = isAgency;
+ this.checkBoxReplenishingLock.IsEnabled = isAgency;
+ this.checkBoxReplenishingTerminal.IsEnabled = isAgency;
+ this.checkBoxTugRequired.IsEnabled = isAgency;
+ this.comboBoxMooring.IsEnabled = isBsmd;
+ this.comboBoxPierside.IsEnabled = isAgency;
+ this.comboBoxPilot.IsEnabled = isAgency;
+ this.comboBoxShip.IsEnabled = isBsmd;
+ this.comboBoxMooring.IsEnabled = isAgency;
+ this.comboBoxTerminal.IsEnabled = isAgency;
+ this.comboBoxTug.IsEnabled = isAgency;
+ this.datePickerETA.IsEnabled = isAgency || isBsmd;
+ this.datePickerETD.IsEnabled = isAgency;
+ this.textBoxVoyage.IsEnabled = isAgency;
+ this.datePickerTidalWindowFrom.IsEnabled = isAgency;
+ this.datePickerTidalWindowTo.IsEnabled = isAgency;
+ this.integerUpDownRecommendedTugs.IsEnabled = isAgency;
+ this.doubleUpDownDraft.IsEnabled = isAgency || isBsmd;
+
+ }
#endregion
diff --git a/src/BreCalClient/Resources/Resources.Designer.cs b/src/BreCalClient/Resources/Resources.Designer.cs
index 468eaee..79184b3 100644
--- a/src/BreCalClient/Resources/Resources.Designer.cs
+++ b/src/BreCalClient/Resources/Resources.Designer.cs
@@ -83,9 +83,9 @@ namespace BreCalClient.Resources {
///
/// Looks up a localized resource of type System.Byte[].
///
- public static byte[] arrow_right_blue {
+ public static byte[] arrow_right_green {
get {
- object obj = ResourceManager.GetObject("arrow_right_blue", resourceCulture);
+ object obj = ResourceManager.GetObject("arrow_right_green", resourceCulture);
return ((byte[])(obj));
}
}
@@ -93,9 +93,9 @@ namespace BreCalClient.Resources {
///
/// Looks up a localized resource of type System.Byte[].
///
- public static byte[] arrow_up_green {
+ public static byte[] arrow_up_blue {
get {
- object obj = ResourceManager.GetObject("arrow_up_green", resourceCulture);
+ object obj = ResourceManager.GetObject("arrow_up_blue", resourceCulture);
return ((byte[])(obj));
}
}
diff --git a/src/BreCalClient/Resources/Resources.resx b/src/BreCalClient/Resources/Resources.resx
index 676bb19..34fbec4 100644
--- a/src/BreCalClient/Resources/Resources.resx
+++ b/src/BreCalClient/Resources/Resources.resx
@@ -124,11 +124,11 @@
arrow_down_red.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- arrow_right_blue.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ arrow_right_green.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- arrow_up_green.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ arrow_up_blue.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
arrow_up_red.png;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
diff --git a/src/BreCalClient/Resources/arrow_down_red.png b/src/BreCalClient/Resources/arrow_down_red.png
index 14046cc..7132feb 100644
Binary files a/src/BreCalClient/Resources/arrow_down_red.png and b/src/BreCalClient/Resources/arrow_down_red.png differ
diff --git a/src/BreCalClient/Resources/arrow_right_green.png b/src/BreCalClient/Resources/arrow_right_green.png
new file mode 100644
index 0000000..0b2b841
Binary files /dev/null and b/src/BreCalClient/Resources/arrow_right_green.png differ
diff --git a/src/BreCalClient/Resources/arrow_up_blue.png b/src/BreCalClient/Resources/arrow_up_blue.png
new file mode 100644
index 0000000..18d3f17
Binary files /dev/null and b/src/BreCalClient/Resources/arrow_up_blue.png differ
diff --git a/src/BreCalClient/ShipcallControl.xaml.cs b/src/BreCalClient/ShipcallControl.xaml.cs
index 55fb7a6..7ec9cdc 100644
--- a/src/BreCalClient/ShipcallControl.xaml.cs
+++ b/src/BreCalClient/ShipcallControl.xaml.cs
@@ -119,10 +119,10 @@ namespace BreCalClient
this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_down_red.png"));
break;
case 2: // outgoing
- this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_up_green.png"));
+ this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_up_blue.png"));
break;
case 3: // shifting
- this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_right_blue.png"));
+ this.imageShipcallType.Source = new BitmapImage(new Uri("pack://application:,,,/BreCalClient;component/Resources/arrow_right_green.png"));
break;
default:
break;