diff --git a/ENI-2/ENI2/ENI2/App.config b/ENI-2/ENI2/ENI2/App.config
index caaa686d..4dbc9f08 100644
--- a/ENI-2/ENI2/ENI2/App.config
+++ b/ENI-2/ENI2/ENI2/App.config
@@ -19,16 +19,17 @@
True
-
-
- http://192.168.2.4/LockingService/LockingService.svc
-
60
+
+ 1000
+
+
+ http://192.168.2.4/LockingService/LockingService.svc
+
- Data Source=192.168.2.12;Initial Catalog=nsw;Uid=dfuser;Pwd=dfpasswd;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False
-
+ Data Source=192.168.2.12;Initial Catalog=nsw;Uid=dfuser;Pwd=dfpasswd;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False
diff --git a/ENI-2/ENI2/ENI2/Controls/ClosableTabItem.cs b/ENI-2/ENI2/ENI2/Controls/ClosableTabItem.cs
index 5dc4a556..c773b97a 100644
--- a/ENI-2/ENI2/ENI2/Controls/ClosableTabItem.cs
+++ b/ENI-2/ENI2/ENI2/Controls/ClosableTabItem.cs
@@ -41,34 +41,81 @@ namespace ENI2.Controls
///
public class ClosableTabItem : TabItem
{
+ private Storyboard blinkTextStoryboard;
+
/*
+ *
static ClosableTabItem()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(ClosableTabItem), new FrameworkPropertyMetadata(typeof(ClosableTabItem)));
}
*/
+ private TextBlock textBlock;
public event EventHandler TabClosing;
+ protected Storyboard BlinkTextStoryboard
+ {
+ get
+ {
+ if(blinkTextStoryboard == null)
+ {
+ this.blinkTextStoryboard = new Storyboard();
+
+ ColorAnimationUsingKeyFrames cauk = new ColorAnimationUsingKeyFrames();
+ cauk.AutoReverse = true;
+ cauk.KeyFrames.Add(new DiscreteColorKeyFrame(Colors.Black, KeyTime.FromTimeSpan(new TimeSpan(0,0,1))));
+ cauk.KeyFrames.Add(new DiscreteColorKeyFrame(Colors.Red, KeyTime.FromTimeSpan(new TimeSpan(0, 0, 2))));
+ cauk.KeyFrames.Add(new DiscreteColorKeyFrame(Colors.White, KeyTime.FromTimeSpan(new TimeSpan(0, 0, 3))));
+
+ Storyboard.SetTarget(cauk, this.textBlock.Foreground);
+ Storyboard.SetTargetProperty(cauk, new PropertyPath(SolidColorBrush.ColorProperty));
+
+ this.blinkTextStoryboard.Children.Add(cauk);
+
+ }
+ return blinkTextStoryboard;
+ }
+ }
+
+
+ public bool IsHighlighted
+ {
+ private get { return false; }
+ set
+ {
+
+ if (value) this.textBlock.Foreground = Brushes.Red; //this.BlinkTextStoryboard.Begin(); // warum auch immer das nicht funktioniert
+ else this.textBlock.Foreground = Brushes.Black; //this.BlinkTextStoryboard.Stop();
+
+ }
+ }
public void SetHeaderText(string headerText, bool lockedTab)
{
// Container for header controls
- var dockPanel = new DockPanel();
- var header = new TextBlock { Text = headerText };
- header.Background = lockedTab ? Brushes.LightGreen : Brushes.Orange;
- dockPanel.Children.Add(header);
+ DockPanel dockPanel = new DockPanel();
+ dockPanel.Height = 22;
+
+ this.textBlock = new TextBlock { Text = headerText };
+ this.textBlock.Foreground = new SolidColorBrush(Colors.Black);
+ this.textBlock.Background = lockedTab ? Brushes.LightGreen : Brushes.Orange;
+ this.textBlock.Margin = new Thickness(1);
+ this.textBlock.VerticalAlignment = VerticalAlignment.Center;
+
+ dockPanel.Children.Add(this.textBlock);
// Close button to remove the tab
var closeButton = new Button();
closeButton.Content = "X";
closeButton.Margin = new Thickness(5, 0, 0, 0);
- closeButton.Foreground = Brushes.Red;
+ closeButton.Foreground = Brushes.Red;
closeButton.Height = 18;
closeButton.Width = 15;
closeButton.Opacity = 0.2;
closeButton.FontSize = 8;
closeButton.FontWeight = FontWeights.Bold;
+ closeButton.VerticalAlignment = VerticalAlignment.Center;
closeButton.MouseEnter += (sender, e) => {
DoubleAnimation animation = new DoubleAnimation(0.2, 1.0, new TimeSpan(0, 0, 0, 0, 500));
diff --git a/ENI-2/ENI2/ENI2/Controls/EditWindowBase.cs b/ENI-2/ENI2/ENI2/Controls/EditWindowBase.cs
index c575c90e..632b63e3 100644
--- a/ENI-2/ENI2/ENI2/Controls/EditWindowBase.cs
+++ b/ENI-2/ENI2/ENI2/Controls/EditWindowBase.cs
@@ -36,8 +36,8 @@ namespace ENI2.Controls
var okButton = (Button)Template.FindName("buttonOK", this);
var cancelButton = (Button)Template.FindName("buttonCancel", this);
var addButton = (Button)Template.FindName("buttonAdd", this);
- okButton.Click += (s, e) => { if (IsModal) DialogResult = true; else this.Close(); OKClicked?.Invoke(); };
- cancelButton.Click += (s, e) => { if (IsModal) DialogResult = false; else this.Close(); CancelClicked?.Invoke(); };
+ okButton.Click += (s, e) => { if (IsModal) DialogResult = true; OKClicked?.Invoke(); this.Close(); };
+ cancelButton.Click += (s, e) => { if (IsModal) DialogResult = false; CancelClicked?.Invoke(); this.Close(); };
addButton.Click += (s, e) => { AddClicked?.Invoke(); };
};
this.IsModal = true; // default
diff --git a/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs b/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs
index 01eec230..7c567be5 100644
--- a/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs
+++ b/ENI-2/ENI2/ENI2/DetailRootControl.xaml.cs
@@ -9,6 +9,7 @@ using System.Windows.Controls;
using bsmd.database;
using ENI2.DetailViewControls;
+using ENI2.Util;
using System.Windows;
using System.Windows.Data;
@@ -39,6 +40,8 @@ namespace ENI2
public ReportingParty LockedBy { get; set; }
+ internal event DatabaseEntityWatchdog.DatabaseEntityChangedHandler HighlightReset;
+
#endregion
#region Construction
@@ -243,9 +246,17 @@ namespace ENI2
// return to "new" overview
Dispatcher.BeginInvoke((Action)(() => this.listBoxMessages_SelectionChanged(this, null)));
+
+ // if the entity has been highlighted (through remote change detection), reset this here
+ this.OnHighlightReset();
}
#endregion
+ protected virtual void OnHighlightReset()
+ {
+ this.HighlightReset?.Invoke(this.Core);
+ }
+
}
}
diff --git a/ENI-2/ENI2/ENI2/ENI2.csproj b/ENI-2/ENI2/ENI2/ENI2.csproj
index 4dc6a63f..ca9353ca 100644
--- a/ENI-2/ENI2/ENI2/ENI2.csproj
+++ b/ENI-2/ENI2/ENI2/ENI2.csproj
@@ -35,7 +35,7 @@
3.5.1.0
true
publish.html
- 1
+ 2
3.6.4.%2a
false
true
@@ -240,6 +240,7 @@
SucheControl.xaml
+
VorgaengeControl.xaml
diff --git a/ENI-2/ENI2/ENI2/EditControls/EditCallPurposeDialog.xaml.cs b/ENI-2/ENI2/ENI2/EditControls/EditCallPurposeDialog.xaml.cs
index aba18f5a..dc108bf3 100644
--- a/ENI-2/ENI2/ENI2/EditControls/EditCallPurposeDialog.xaml.cs
+++ b/ENI-2/ENI2/ENI2/EditControls/EditCallPurposeDialog.xaml.cs
@@ -50,7 +50,8 @@ namespace ENI2.EditControls
{
InitializeComponent();
- Loaded += EditCallPurposeDialog_Loaded;
+ Loaded += EditCallPurposeDialog_Loaded;
+ AddClicked += () => { this.comboBoxCode.Focus(); };
}
public CallPurpose CallPurpose { get; set; }
diff --git a/ENI-2/ENI2/ENI2/EditControls/VisitIdDialog.xaml.cs b/ENI-2/ENI2/ENI2/EditControls/VisitIdDialog.xaml.cs
index 38723e2d..49b13e12 100644
--- a/ENI-2/ENI2/ENI2/EditControls/VisitIdDialog.xaml.cs
+++ b/ENI-2/ENI2/ENI2/EditControls/VisitIdDialog.xaml.cs
@@ -45,6 +45,12 @@ namespace ENI2.EditControls
this.Core.ETA = this.datePickerETA.SelectedDate;
}
+ if (this.doubleUpDownIMO.Value.HasValue)
+ this.Core.IMO = this.doubleUpDownIMO.Value.ToString();
+
+ if (this.doubleUpDownENI.Value.HasValue)
+ this.Core.ENI = this.doubleUpDownENI.Value.ToString();
+
this.Core.PoC = this.locodePoC.LocodeValue;
this._isOK = true;
}
@@ -89,8 +95,8 @@ namespace ENI2.EditControls
isComplete &= this.datePickerETA.SelectedDate.HasValue; // ETA
- bool imo_OR_eni = ((doubleUpDownIMO.Value.HasValue) && (doubleUpDownIMO.Value > 1000000) && (doubleUpDownIMO.Value < 9999999)) ||
- ((doubleUpDownENI.Value.HasValue) && (doubleUpDownENI.Value > 100000) && (doubleUpDownENI.Value < 99999999));
+ bool imo_OR_eni = ((doubleUpDownIMO.Value.HasValue) && (doubleUpDownIMO.Value >= 1000000) && (doubleUpDownIMO.Value <= 9999999)) ||
+ ((doubleUpDownENI.Value.HasValue) && (doubleUpDownENI.Value >= 100000) && (doubleUpDownENI.Value <= 99999999));
isComplete &= imo_OR_eni;
diff --git a/ENI-2/ENI2/ENI2/MainWindow.xaml b/ENI-2/ENI2/ENI2/MainWindow.xaml
index 6e9e9f94..f8887dc0 100644
--- a/ENI-2/ENI2/ENI2/MainWindow.xaml
+++ b/ENI-2/ENI2/ENI2/MainWindow.xaml
@@ -5,6 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:p="clr-namespace:ENI2.Properties"
xmlns:enidtctrl="clr-namespace:ENI2.DetailViewControls"
+ xmlns:ctrl="clr-namespace:ENI2.Controls"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:util="clr-namespace:ENI2.Util"
xmlns:local="clr-namespace:ENI2"
@@ -20,6 +21,7 @@
+