diff --git a/ENI2/DetailRootControl.xaml.cs b/ENI2/DetailRootControl.xaml.cs
index 6aece539..e4ff3bd8 100644
--- a/ENI2/DetailRootControl.xaml.cs
+++ b/ENI2/DetailRootControl.xaml.cs
@@ -644,12 +644,15 @@ namespace ENI2
this.detailView.Children.Clear();
this.controlCache.Clear();
- // return to "new" overviewdan
+ int currentIndex = this.listBoxMessages.SelectedIndex;
+
+ // return to "new" overview
Dispatcher.BeginInvoke((System.Action)(() =>
{
this.listBoxMessages_SelectionChanged(this, null);
shipNameLabel.Text = this.Core.Shipname;
shipEMailLabel.Text = this.Core.HerbergEmailContactReportingVessel;
+ this.listBoxMessages.SelectedIndex = currentIndex;
}
));
diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj
index 2b1fcb11..e72241a2 100644
--- a/ENI2/ENI2.csproj
+++ b/ENI2/ENI2.csproj
@@ -36,8 +36,8 @@
5.4.0.0
true
publish.html
- 4
- 7.2.7.4
+ 5
+ 7.2.7.5
false
true
true
diff --git a/ENI2/SheetDisplayControls/PortControl.xaml.cs b/ENI2/SheetDisplayControls/PortControl.xaml.cs
index c0f16ff3..7f6636dc 100644
--- a/ENI2/SheetDisplayControls/PortControl.xaml.cs
+++ b/ENI2/SheetDisplayControls/PortControl.xaml.cs
@@ -107,6 +107,7 @@ namespace ENI2.SheetDisplayControls
portAreas = LocalizedLookup.getPortAreasForLocode(this.Core.PoC);
this.comboBoxPortArea.ItemsSource = portAreas;
+ this.comboBoxPortArea.DataContext = this._info;
this.textRequestedPostionInPortOfCall.DataContext = this._info;
this.textSpecialRequirements.DataContext = this._info;
this.textConstructionCharacteristics.DataContext = this._info;
diff --git a/ENI2/SheetDisplayControls/PreArrivalControl.xaml b/ENI2/SheetDisplayControls/PreArrivalControl.xaml
index 280f43bc..4f69b3b5 100644
--- a/ENI2/SheetDisplayControls/PreArrivalControl.xaml
+++ b/ENI2/SheetDisplayControls/PreArrivalControl.xaml
@@ -50,11 +50,11 @@
-
+
-
+
-
+
diff --git a/ENI2/SheetDisplayControls/ShipDataControl.xaml b/ENI2/SheetDisplayControls/ShipDataControl.xaml
index 8a8b897f..7795e517 100644
--- a/ENI2/SheetDisplayControls/ShipDataControl.xaml
+++ b/ENI2/SheetDisplayControls/ShipDataControl.xaml
@@ -150,56 +150,56 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/ENI2/Util/InverseBooleanConverter.cs b/ENI2/Util/InverseBooleanConverter.cs
index ab9b9382..dfb18900 100644
--- a/ENI2/Util/InverseBooleanConverter.cs
+++ b/ENI2/Util/InverseBooleanConverter.cs
@@ -28,23 +28,32 @@ namespace ENI2.Util
public object Convert(object value, Type targetType, object parameter,
System.Globalization.CultureInfo culture)
{
- if (targetType != typeof(bool?))
- throw new InvalidOperationException("The target must be a boolean");
+
+ if (targetType == typeof(bool?))
+ {
+ if (!((bool?)value).HasValue) return null;
+ return !(bool?)value;
+ }
- if (!((bool?)value).HasValue) return null;
+ if (targetType == typeof(bool))
+ return !(bool) value;
- return !(bool?)value;
+ throw new InvalidOperationException("The target must be a boolean");
}
public object ConvertBack(object value, Type targetType, object parameter,
System.Globalization.CultureInfo culture)
{
- if (targetType != typeof(bool?))
- throw new InvalidOperationException("The target must be a boolean");
+ if (targetType == typeof(bool?))
+ {
+ if (!((bool?)value).HasValue) return null;
+ return !(bool?)value;
+ }
- if (!((bool?)value).HasValue) return null;
+ if(targetType == typeof(bool))
+ return !(bool)value;
- return !(bool?)value;
+ throw new InvalidOperationException("The target must be a boolean");
}
#endregion