From 25f9e2eeaa978cb6c6bfb8d672d4269f179d05a7 Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Wed, 19 Oct 2022 07:54:33 +0200 Subject: [PATCH] fixed PAS import details --- ENI2/Controls/LocodeControl.xaml.cs | 49 ++++++++++++++++------- ENI2/ENI2.csproj | 2 +- ENI2/EditControls/FixImportDialog.xaml | 10 ++--- ENI2/EditControls/FixImportDialog.xaml.cs | 23 ++++++++++- bsmd.database/HAZPosTemplate.cs | 7 ++-- bsmd.database/PAS.cs | 6 ++- 6 files changed, 71 insertions(+), 26 deletions(-) diff --git a/ENI2/Controls/LocodeControl.xaml.cs b/ENI2/Controls/LocodeControl.xaml.cs index cfc6b3b7..76117687 100644 --- a/ENI2/Controls/LocodeControl.xaml.cs +++ b/ENI2/Controls/LocodeControl.xaml.cs @@ -19,14 +19,25 @@ namespace ENI2.Controls /// public partial class LocodeControl : UserControl, INotifyPropertyChanged { + + #region fields + private List _locodeList = new List(); public event PropertyChangedEventHandler PropertyChanged; - private bool _comboSelect; + private bool _comboSelect; + + #endregion + + #region Construction public LocodeControl() { - InitializeComponent(); - } + InitializeComponent(); + } + + #endregion + + #region Enums protected enum LocodeState { @@ -36,6 +47,15 @@ namespace ENI2.Controls AMBIGUOUS }; + #endregion + + public void SetFocus() + { + this.comboBoxLocode.Focus(); + } + + #region Properties + /// /// used internally to load up drop down /// @@ -89,10 +109,10 @@ namespace ENI2.Controls // MessageBox.Show(string.Format("CoerceValue is fired : Value {0}", Value)); return Value; } - - public RuleEngine.LocodeMode LocodeSource { get; set; } + #endregion + #region static methods public static readonly DependencyProperty LocodeValueProperty = DependencyProperty.Register("LocodeValue", typeof(string), typeof(LocodeControl), @@ -220,6 +240,15 @@ namespace ENI2.Controls this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("LocodeList")); } + private void comboBoxLocode_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e) + { + if ((e.Key == System.Windows.Input.Key.Down) && !this.comboBoxLocode.IsDropDownOpen) + { + this.comboBoxLocode.IsDropDownOpen = true; + e.Handled = true; + } + } + #endregion #region private/protected methods @@ -245,14 +274,6 @@ namespace ENI2.Controls } #endregion - - private void comboBoxLocode_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e) - { - if((e.Key == System.Windows.Input.Key.Down) && !this.comboBoxLocode.IsDropDownOpen) - { - this.comboBoxLocode.IsDropDownOpen = true; - e.Handled = true; - } - } + } } diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj index a1320559..698137b0 100644 --- a/ENI2/ENI2.csproj +++ b/ENI2/ENI2.csproj @@ -36,7 +36,7 @@ 5.4.0.0 true publish.html - 6 + 7 7.5.0.%2a false true diff --git a/ENI2/EditControls/FixImportDialog.xaml b/ENI2/EditControls/FixImportDialog.xaml index 2ea7b38a..cc47485d 100644 --- a/ENI2/EditControls/FixImportDialog.xaml +++ b/ENI2/EditControls/FixImportDialog.xaml @@ -18,12 +18,12 @@ -