diff --git a/misc/version.txt b/misc/version.txt
index c2e8527..bd2666a 100644
--- a/misc/version.txt
+++ b/misc/version.txt
@@ -1 +1 @@
-0.9.6.0
\ No newline at end of file
+1.0.0.0
\ No newline at end of file
diff --git a/src/BreCalClient/BreCalClient.csproj b/src/BreCalClient/BreCalClient.csproj
index 3ecd3f3..d691a03 100644
--- a/src/BreCalClient/BreCalClient.csproj
+++ b/src/BreCalClient/BreCalClient.csproj
@@ -8,8 +8,8 @@
True
BreCalClient.App
..\..\misc\brecal.snk
- 0.9.6.0
- 0.9.6.0
+ 1.0.0.0
+ 1.0.0.0
Bremen calling client
A Windows WPF client for the Bremen calling API.
containership.ico
diff --git a/src/BreCalClient/EditShipcallControl.xaml b/src/BreCalClient/EditShipcallControl.xaml
index 8f20e1b..ae2df90 100644
--- a/src/BreCalClient/EditShipcallControl.xaml
+++ b/src/BreCalClient/EditShipcallControl.xaml
@@ -65,24 +65,15 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
-
+
+
diff --git a/src/BreCalClient/EditShipcallControl.xaml.cs b/src/BreCalClient/EditShipcallControl.xaml.cs
index 54706dc..d79aff4 100644
--- a/src/BreCalClient/EditShipcallControl.xaml.cs
+++ b/src/BreCalClient/EditShipcallControl.xaml.cs
@@ -67,8 +67,7 @@ namespace BreCalClient
}
private void comboBoxShip_SelectionChanged(object sender, SelectionChangedEventArgs e)
- {
- this.buttonOK.IsEnabled = this.comboBoxShip.SelectedItem != null;
+ {
if (this.comboBoxShip.SelectedItem != null)
{
Ship? ship = this.comboBoxShip.SelectedItem as Ship;
@@ -84,11 +83,13 @@ namespace BreCalClient
this.doubleUpDownLength.Value = null;
this.doubleUpDownWidth.Value = null;
}
+ this.CheckForCompletion();
}
private void comboBoxAgency_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
this.EnableControls();
+ this.CheckForCompletion();
}
private void comboBoxCategories_SelectionChanged(object? sender, SelectionChangedEventArgs? e)
@@ -122,6 +123,7 @@ namespace BreCalClient
break;
}
}
+ this.CheckForCompletion();
}
#endregion
@@ -133,22 +135,24 @@ namespace BreCalClient
this.comboBoxAgency.SelectedIndex = -1;
this.ShipcallModel.AssignedParticipants.Remove(Extensions.ParticipantType.AGENCY);
}
-
- private void contextMenuItemArrivalBerth_Click(object sender, RoutedEventArgs e)
- {
- this.comboBoxArrivalBerth.SelectedIndex = -1;
- this.ShipcallModel.Berth = "";
- }
-
- private void contextMenuItemDepartureBerth_Click(object sender, RoutedEventArgs e)
- {
- this.comboBoxDepartureBerth.SelectedIndex -= 1;
- }
-
+
#endregion
#region private methods
+ void CheckForCompletion()
+ {
+ bool isEnabled = true;
+
+ isEnabled &= this.comboBoxShip.SelectedItem != null;
+ isEnabled &= this.comboBoxCategories.SelectedItem != null;
+ isEnabled &= ((this.comboBoxArrivalBerth.SelectedItem != null) || (this.comboBoxDepartureBerth.SelectedItem != null));
+ isEnabled &= (this.datePickerETA.Value.HasValue || this.datePickerETD.Value.HasValue);
+ isEnabled &= this.comboBoxAgency.SelectedItem != null;
+
+ this.buttonOK.IsEnabled = isEnabled;
+ }
+
private void CopyToModel()
{
if (this.ShipcallModel.Shipcall != null)
@@ -293,5 +297,24 @@ namespace BreCalClient
#endregion
+ private void datePickerETA_ValueChanged(object sender, RoutedPropertyChangedEventArgs