diff --git a/ENI-2/ENI2/ENI2/App.xaml.cs b/ENI-2/ENI2/ENI2/App.xaml.cs
index fa1e4599..325415f6 100644
--- a/ENI-2/ENI2/ENI2/App.xaml.cs
+++ b/ENI-2/ENI2/ENI2/App.xaml.cs
@@ -6,6 +6,9 @@ using System.Windows;
using System.Windows.Markup;
using bsmd.database;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System;
namespace ENI2
{
@@ -35,15 +38,42 @@ namespace ENI2
foreach (int key in cargoHandlingDict.Keys)
LADG.CargoHandlingDict.Add(key, cargoHandlingDict[key]);
-
+ EventManager.RegisterClassHandler(typeof(DatePicker), DatePicker.PreviewKeyDownEvent, new KeyEventHandler(this.DatePicker_PreviewKeyDown));
}
-
private void Dispatcher_UnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
{
string errorMessage = string.Format("An unhandled exception occurred: {0}\r\n{1}", e.Exception.Message, e.Exception.StackTrace);
MessageBox.Show(errorMessage, "Error", MessageBoxButton.OK, MessageBoxImage.Error);
e.Handled = true;
}
+
+ private void DatePicker_PreviewKeyDown(object sender, KeyEventArgs e)
+ {
+ var dp = sender as DatePicker;
+ if (dp == null) return;
+
+ if (e.Key == Key.D && Keyboard.Modifiers == ModifierKeys.Control)
+ {
+ e.Handled = true;
+ dp.SetValue(DatePicker.SelectedDateProperty, DateTime.Today);
+ return;
+ }
+
+ if (!dp.SelectedDate.HasValue) return;
+
+ var date = dp.SelectedDate.Value;
+ if (e.Key == Key.Up)
+ {
+ e.Handled = true;
+ dp.SetValue(DatePicker.SelectedDateProperty, date.AddDays(1));
+ }
+ else if (e.Key == Key.Down)
+ {
+ e.Handled = true;
+ dp.SetValue(DatePicker.SelectedDateProperty, date.AddDays(-1));
+ }
+ }
+
}
}
diff --git a/ENI-2/ENI2/ENI2/DetailBaseControl.cs b/ENI-2/ENI2/ENI2/DetailBaseControl.cs
index fdcf6dca..0b59f80e 100644
--- a/ENI-2/ENI2/ENI2/DetailBaseControl.cs
+++ b/ENI-2/ENI2/ENI2/DetailBaseControl.cs
@@ -4,15 +4,10 @@
using System;
using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
using System.Windows.Controls;
using bsmd.database;
using System.Windows.Media.Imaging;
-using System.Windows;
-using System.Windows.Input;
namespace ENI2
{
@@ -21,6 +16,8 @@ namespace ENI2
protected bool _initialized = false;
+ #region enum
+
protected enum LocodeState
{
UNKNOWN,
@@ -30,6 +27,18 @@ namespace ENI2
}
+ #endregion
+
+ #region events
+
+ ///
+ /// Mit diesem event kann ein Listenelement den programmatischen Sprung auf ein anderes Listenelement auslösen
+ /// (das wird zunächst nur vom Overview -> Auswahl Meldeklasse verwendet)
+ ///
+ public event Action JumpToListElementRequest;
+
+ #endregion
+
#region Properties
public MessageCore Core { get; set; }
@@ -45,7 +54,11 @@ namespace ENI2
}
-
+
+ protected virtual void OnJumpToListElementRequest(int index)
+ {
+ this.JumpToListElementRequest?.Invoke(index);
+ }
protected void SetLocodeStateImage(Image stateImage, LocodeState state)
{
diff --git a/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs
index ecb4a829..9f09799e 100644
--- a/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs
@@ -4,18 +4,7 @@
using System;
using System.Collections.Generic;
-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;
using bsmd.database;
using ENI2.DetailViewControls;
@@ -58,7 +47,7 @@ namespace ENI2
this.listBoxMessages.ItemsSource = this._listBoxList;
_messages = DBManager.Instance.GetMessagesForCore(_core, DBManager.MessageLoad.ALL);
-
+ Dispatcher.BeginInvoke((Action)(() => this.listBoxMessages.SelectedIndex = 0));
}
#region class MessageGroup
@@ -85,6 +74,12 @@ namespace ENI2
DetailBaseControl detailControl = (DetailBaseControl) Activator.CreateInstance(mg.MessageGroupControlType);
detailControl.Core = _core;
detailControl.Messages = _messages;
+ detailControl.JumpToListElementRequest += (index) => {
+ if((index >= 0) && (index < _listBoxList.Count))
+ {
+ this.listBoxMessages.SelectedIndex = index;
+ }
+ };
detailControl.Initialize();
// plug it in ;-)
detailView.Children.Clear();
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml
index cf877955..2235de96 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml
@@ -4,7 +4,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
+ xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:enictrl="clr-namespace:ENI2.Controls"
xmlns:p="clr-namespace:ENI2.Properties"
xmlns:local="clr-namespace:ENI2.DetailViewControls"
@@ -25,7 +25,7 @@
-
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs
index 2e530e5d..85a388ea 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/OverViewDetailControl.xaml.cs
@@ -2,24 +2,13 @@
// Description:
//
-using System;
using System.Collections.Generic;
-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;
using bsmd.database;
-using bsmd.ExcelReadService;
-using System.ComponentModel;
namespace ENI2.DetailViewControls
{
@@ -31,10 +20,11 @@ namespace ENI2.DetailViewControls
private Message _message = null;
public OverViewDetailControl()
- {
+ {
InitializeComponent();
- }
+ }
+ #region Initialize
public override void Initialize()
{
@@ -58,19 +48,148 @@ namespace ENI2.DetailViewControls
foreach (Message aMessage in this.Messages)
{
- if (aMessage.MessageNotificationClass == notificationClass)
- {
+ if (aMessage.MessageNotificationClass == notificationClass)
_message = aMessage;
- break;
+ switch(aMessage.MessageNotificationClass)
+ {
+ case Message.NotificationClass.VISIT:
+ case Message.NotificationClass.TRANSIT:
+ aMessage.ENINotificationDetailGroup = Properties.Resources.textOverview;
+ aMessage.ENINotificationIconString = "../Resources/documents.png";
+ aMessage.ENINotificationDetailIndex = 0;
+ break;
+ case Message.NotificationClass.NOA_NOD:
+ case Message.NotificationClass.AGNT:
+ aMessage.ENINotificationIconString = "../Resources/eye_blue.png";
+ aMessage.ENINotificationDetailGroup = Properties.Resources.textPortCall;
+ aMessage.ENINotificationDetailIndex = 1;
+ break;
+ case Message.NotificationClass.NAME:
+ case Message.NotificationClass.INFO:
+ case Message.NotificationClass.SERV:
+ case Message.NotificationClass.LADG:
+ aMessage.ENINotificationIconString = "../Resources/anchor.png";
+ aMessage.ENINotificationDetailGroup = Properties.Resources.textPortNotification;
+ aMessage.ENINotificationDetailIndex = 2;
+ break;
+ case Message.NotificationClass.WAS:
+ aMessage.ENINotificationIconString = "../Resources/garbage.png";
+ aMessage.ENINotificationDetailGroup = Properties.Resources.textWaste;
+ aMessage.ENINotificationDetailIndex = 3;
+ break;
+ case Message.NotificationClass.ATA:
+ case Message.NotificationClass.POBA:
+ case Message.NotificationClass.TIEFA:
+ case Message.NotificationClass.BKRA:
+ aMessage.ENINotificationIconString = "../Resources/arrow_down_right_red.png";
+ aMessage.ENINotificationDetailGroup = Properties.Resources.textArrivalNotification;
+ aMessage.ENINotificationDetailIndex = 4;
+ break;
+ case Message.NotificationClass.SEC:
+ aMessage.ENINotificationIconString = "../Resources/shield_yellow.png";
+ aMessage.ENINotificationDetailGroup = Properties.Resources.textSecurity;
+ aMessage.ENINotificationDetailIndex = 5;
+ break;
+ case Message.NotificationClass.PRE72H:
+ aMessage.ENINotificationIconString = "../Resources/alarmclock.png";
+ aMessage.ENINotificationDetailGroup = Properties.Resources.textPSC72h;
+ aMessage.ENINotificationDetailIndex = 6;
+ break;
+ case Message.NotificationClass.MDH:
+ aMessage.ENINotificationIconString = "../Resources/medical_bag.png";
+ aMessage.ENINotificationDetailGroup = Properties.Resources.textMDH;
+ aMessage.ENINotificationDetailIndex = 7;
+ break;
+ case Message.NotificationClass.STAT:
+ aMessage.ENINotificationIconString = "../Resources/containership.png";
+ aMessage.ENINotificationDetailGroup = Properties.Resources.textShipData;
+ aMessage.ENINotificationDetailIndex = 8;
+ break;
+ case Message.NotificationClass.BPOL:
+ case Message.NotificationClass.CREW:
+ case Message.NotificationClass.PAS:
+ aMessage.ENINotificationIconString = "../Resources/policeman_german.png";
+ aMessage.ENINotificationDetailGroup = Properties.Resources.textBorderPolice;
+ aMessage.ENINotificationDetailIndex = 9;
+ break;
+ case Message.NotificationClass.ATD:
+ case Message.NotificationClass.TIEFD:
+ case Message.NotificationClass.BKRD:
+ case Message.NotificationClass.POBD:
+ aMessage.ENINotificationIconString = "../Resources/arrow_up_right_green.png";
+ aMessage.ENINotificationDetailGroup = Properties.Resources.textDepartureNotification;
+ aMessage.ENINotificationDetailIndex = 10;
+ break;
+ case Message.NotificationClass.HAZA:
+ aMessage.ENINotificationIconString = "../Resources/sign_warning_radiation.png";
+ aMessage.ENINotificationDetailGroup = Properties.Resources.textDGArrival;
+ aMessage.ENINotificationDetailIndex = 11;
+ break;
+ case Message.NotificationClass.HAZD:
+ aMessage.ENINotificationIconString = "../Resources/sign_warning_radiation.png";
+ aMessage.ENINotificationDetailGroup = Properties.Resources.textDGDeparture;
+ aMessage.ENINotificationDetailIndex = 12;
+ break;
+ case Message.NotificationClass.TOWA:
+ case Message.NotificationClass.TOWD:
+ aMessage.ENINotificationIconString = "../Resources/ship2.png";
+ aMessage.ENINotificationDetailGroup = Properties.Resources.textTowage;
+ aMessage.ENINotificationDetailIndex = 13;
+ break;
+ default:
+ aMessage.ENINotificationDetailGroup = "unspecified";
+ break;
}
+
}
if (_message != null)
{
}
+
+ this.dataGridMessages.ItemsSource = this.Messages;
this._initialized = true;
}
-
+
+ #endregion
+
+ private void jumpToMessage(Message message)
+ {
+
+ this.OnJumpToListElementRequest(message.ENINotificationDetailIndex);
+ }
+
+ #region mouse event handler
+
+ private void dataGrid_MouseDoubleClick(object sender, MouseButtonEventArgs e)
+ {
+ if (sender != null)
+ {
+ DataGrid grid = sender as DataGrid;
+ if ((grid != null) && (grid.SelectedItems != null) && (grid.SelectedItems.Count == 1))
+ {
+ DataGridRow dgr = grid.ItemContainerGenerator.ContainerFromItem(grid.SelectedItem) as DataGridRow;
+ Message selectedMessage = grid.SelectedItem as Message;
+ this.jumpToMessage(selectedMessage);
+ }
+ }
+ }
+
+ private void dataGrid_PreviewKeyDown(object sender, KeyEventArgs e)
+ {
+ if ((e.Key == Key.Return) || (e.Key == Key.Enter))
+ {
+ Message selectedMessage = this.dataGridMessages.SelectedItem as Message;
+ this.jumpToMessage(selectedMessage);
+ }
+ else
+ {
+ base.OnPreviewKeyDown(e);
+ }
+ }
+
+ #endregion
+
}
}
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/PortCallDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/PortCallDetailControl.xaml
index cab2db94..43a1b9d7 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/PortCallDetailControl.xaml
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/PortCallDetailControl.xaml
@@ -32,15 +32,15 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -83,15 +83,15 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/ENI-2/ENI2/ENI2/DetailViewControls/PortNotificationDetailControl.xaml b/ENI-2/ENI2/ENI2/DetailViewControls/PortNotificationDetailControl.xaml
index 49049f65..f0d16c16 100644
--- a/ENI-2/ENI2/ENI2/DetailViewControls/PortNotificationDetailControl.xaml
+++ b/ENI-2/ENI2/ENI2/DetailViewControls/PortNotificationDetailControl.xaml
@@ -24,7 +24,7 @@
-
+
@@ -45,15 +45,15 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/ENI-2/ENI2/ENI2/ENI2.csproj b/ENI-2/ENI2/ENI2/ENI2.csproj
index 32300cde..b493935b 100644
--- a/ENI-2/ENI2/ENI2/ENI2.csproj
+++ b/ENI-2/ENI2/ENI2/ENI2.csproj
@@ -35,8 +35,8 @@
3.5.1.0
true
publish.html
- 10
- 3.5.6.%2a
+ 6
+ 3.5.7.%2a
false
true
true
diff --git a/ENI-2/ENI2/ENI2/MainWindow.xaml b/ENI-2/ENI2/ENI2/MainWindow.xaml
index f41b791c..95a4bf5b 100644
--- a/ENI-2/ENI2/ENI2/MainWindow.xaml
+++ b/ENI-2/ENI2/ENI2/MainWindow.xaml
@@ -4,15 +4,18 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:p="clr-namespace:ENI2.Properties"
- xmlns:local="clr-namespace:ENI2"
+ xmlns:enidtctrl="clr-namespace:ENI2.DetailViewControls"
+ xmlns:local="clr-namespace:ENI2"
mc:Ignorable="d"
Title="ENI 2" Height="450" Width="825" Icon="Resources/logo_schwarz.ico" Loaded="Window_Loaded" Closing="Window_Closing"
SourceInitialized="Window_SourceInitialized">
+
+
diff --git a/ENI-2/ENI2/ENI2/MainWindow.xaml.cs b/ENI-2/ENI2/ENI2/MainWindow.xaml.cs
index 2ad199d2..436a34d7 100644
--- a/ENI-2/ENI2/ENI2/MainWindow.xaml.cs
+++ b/ENI-2/ENI2/ENI2/MainWindow.xaml.cs
@@ -46,10 +46,11 @@ namespace ENI2
if(aMessageCore != null)
{
ClosableTabItem searchResultItem = new ClosableTabItem();
- searchResultItem.SetHeaderText(aMessageCore.Shipname);
+ searchResultItem.SetHeaderText(string.Format("{0} [{1}-{2}]", aMessageCore.Shipname, aMessageCore.PoC, aMessageCore.ETA.HasValue ? aMessageCore.ETA.Value.ToShortDateString() : ""));
DetailRootControl drc = new DetailRootControl(aMessageCore);
searchResultItem.Content = drc;
this.mainFrame.Items.Add(searchResultItem);
+ Dispatcher.BeginInvoke((Action)(() => this.mainFrame.SelectedIndex = (this.mainFrame.Items.Count - 1)));
}
}
diff --git a/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs b/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
index b108c752..20b09781 100644
--- a/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
+++ b/ENI-2/ENI2/ENI2/Properties/Resources.Designer.cs
@@ -501,6 +501,24 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Changed.
+ ///
+ public static string textChanged {
+ get {
+ return ResourceManager.GetString("textChanged", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Changed by.
+ ///
+ public static string textChangedBy {
+ get {
+ return ResourceManager.GetString("textChangedBy", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to City.
///
@@ -528,6 +546,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Comment.
+ ///
+ public static string textComment {
+ get {
+ return ResourceManager.GetString("textComment", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Company name.
///
@@ -601,7 +628,7 @@ namespace ENI2.Properties {
}
///
- /// Looks up a localized string similar to Dangerous goods departuer.
+ /// Looks up a localized string similar to Dangerous goods departure.
///
public static string textDGDeparture {
get {
@@ -826,7 +853,7 @@ namespace ENI2.Properties {
}
///
- /// Looks up a localized string similar to New Visit/Transit Id.
+ /// Looks up a localized string similar to Create new id.
///
public static string textNewVisitTransitId {
get {
@@ -843,6 +870,24 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Notification class.
+ ///
+ public static string textNotificationClass {
+ get {
+ return ResourceManager.GetString("textNotificationClass", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Notification class type.
+ ///
+ public static string textNotificationGroup {
+ get {
+ return ResourceManager.GetString("textNotificationGroup", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Operations.
///
@@ -1059,6 +1104,15 @@ namespace ENI2.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Status.
+ ///
+ public static string textStatus {
+ get {
+ return ResourceManager.GetString("textStatus", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Stern thruster power.
///
diff --git a/ENI-2/ENI2/ENI2/Properties/Resources.de.resx b/ENI-2/ENI2/ENI2/Properties/Resources.de.resx
index 0341c32b..e5fb73cb 100644
--- a/ENI-2/ENI2/ENI2/Properties/Resources.de.resx
+++ b/ENI-2/ENI2/ENI2/Properties/Resources.de.resx
@@ -133,6 +133,6 @@
Löschen bestätigen
- Neue Visit/Transit Id
+ Neue Id erstellen
\ No newline at end of file
diff --git a/ENI-2/ENI2/ENI2/Properties/Resources.resx b/ENI-2/ENI2/ENI2/Properties/Resources.resx
index 4002964d..2d3601ff 100644
--- a/ENI-2/ENI2/ENI2/Properties/Resources.resx
+++ b/ENI-2/ENI2/ENI2/Properties/Resources.resx
@@ -362,7 +362,7 @@
Dangerous goods arrival
- Dangerous goods departuer
+ Dangerous goods departure
Towage
@@ -467,6 +467,24 @@
Transit
- New Visit/Transit Id
+ Create new id
+
+
+ Notification class type
+
+
+ Notification class
+
+
+ Changed
+
+
+ Status
+
+
+ Comment
+
+
+ Changed by
\ No newline at end of file
diff --git a/ENI-2/ENI2/ENI2/SucheControl.xaml b/ENI-2/ENI2/ENI2/SucheControl.xaml
index 9b5f7267..a549684d 100644
--- a/ENI-2/ENI2/ENI2/SucheControl.xaml
+++ b/ENI-2/ENI2/ENI2/SucheControl.xaml
@@ -28,13 +28,13 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -46,10 +46,10 @@
-
-
-
-
+
+
+
+
diff --git a/ENI-2/ENI2/ENI2/SucheControl.xaml.cs b/ENI-2/ENI2/ENI2/SucheControl.xaml.cs
index be2bf220..81ce1381 100644
--- a/ENI-2/ENI2/ENI2/SucheControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/SucheControl.xaml.cs
@@ -49,8 +49,8 @@ namespace ENI2
textBoxIMO.Text = string.Empty;
textBoxName.Text = string.Empty;
textBoxTicketNr.Text = string.Empty;
- dateTimePickerETAFrom.Text = string.Empty;
- dateTimePickerETATo.Text = string.Empty;
+ dateTimePickerETAFrom.SelectedDate = null;
+ dateTimePickerETATo.SelectedDate = null;
this.dataGrid.ItemsSource = null;
this.searchResultLabel.Content = "";
}
@@ -71,13 +71,13 @@ namespace ENI2
filterDict.Add(MessageCore.SearchFilterType.FILTER_TICKETNO, this.textBoxTicketNr.Text.Trim());
uint? from = null, to = null;
- if(!this.dateTimePickerETAFrom.Text.IsNullOrEmpty())
+ if(this.dateTimePickerETAFrom.SelectedDate.HasValue)
{
- from = this.dateTimePickerETAFrom.Value.Value.ToUnixTimeStamp();
+ from = this.dateTimePickerETAFrom.SelectedDate.Value.ToUnixTimeStamp();
}
- if(!this.dateTimePickerETATo.Text.IsNullOrEmpty())
+ if(this.dateTimePickerETATo.SelectedDate.HasValue)
{
- DateTime toTime = this.dateTimePickerETATo.Value.Value.Add(new TimeSpan(23, 59, 59)); // search till the end of the "to" day (no time selection)
+ DateTime toTime = this.dateTimePickerETATo.SelectedDate.Value.Add(new TimeSpan(23, 59, 59)); // search till the end of the "to" day (no time selection)
to = toTime.ToUnixTimeStamp();
}
@@ -96,8 +96,8 @@ namespace ENI2
private void etaValueChanged(object sender, EventArgs args)
{
bool valid = true;
- if ((this.dateTimePickerETAFrom.Value != null) && (this.dateTimePickerETATo.Value != null) &&
- this.dateTimePickerETATo.Value.Value < this.dateTimePickerETAFrom.Value.Value)
+ if ((this.dateTimePickerETAFrom.SelectedDate.HasValue) && (this.dateTimePickerETATo.SelectedDate.HasValue) &&
+ this.dateTimePickerETATo.SelectedDate.Value < this.dateTimePickerETAFrom.SelectedDate.Value)
valid = false;
this.dateTimePickerETAFrom.Background = valid ? SystemColors.ControlBrush : Brushes.Red;
diff --git a/ENI-2/ENI2/ENI2/Themes/Generic.xaml b/ENI-2/ENI2/ENI2/Themes/Generic.xaml
index 9651eb84..8d5cd4e0 100644
--- a/ENI-2/ENI2/ENI2/Themes/Generic.xaml
+++ b/ENI-2/ENI2/ENI2/Themes/Generic.xaml
@@ -5,6 +5,7 @@
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:local="clr-namespace:ENI2">
+