From 945520000da0ae4a3fa3b40e9756d67379e25314 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 19 Feb 2019 18:10:35 +0200 Subject: Machine Studio v4.0.8.0 --- Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest index efc5f8179..d72e75011 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest @@ -16,7 +16,7 @@ Remove this element if your application requires this virtualization for backwards compatibility. --> - + -- cgit v1.3.1 From 10e1892e2ff3620d5111c3b8e5c9eea5baa08a1a Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 19 Feb 2019 19:10:55 +0200 Subject: Implemented some improvements for PPC. --- Software/DB/PPC/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/PPC/Tango_log.ldf | Bin 53673984 -> 53673984 bytes .../PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml | 2 +- .../PPC/Tango.PPC.UI/MainWindow.xaml.cs | 34 --------------------- .../PPCApplication/DefaultPPCApplicationManager.cs | 4 ++- .../PPC/Tango.PPC.UI/Tango.PPC.UI.csproj | 2 +- .../Visual_Studio/PPC/Tango.PPC.UI/app.manifest | 2 +- .../Tango.Touch/Controls/TouchTextBox.cs | 28 ++++++++++++----- .../Tango.Touch/Keyboard/KeyboardView.cs | 4 +-- 9 files changed, 28 insertions(+), 48 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI') diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf index 49b35de76..207b1aaac 100644 Binary files a/Software/DB/PPC/Tango.mdf and b/Software/DB/PPC/Tango.mdf differ diff --git a/Software/DB/PPC/Tango_log.ldf b/Software/DB/PPC/Tango_log.ldf index b2792e777..9a9527c93 100644 Binary files a/Software/DB/PPC/Tango_log.ldf and b/Software/DB/PPC/Tango_log.ldf differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml index a7062d036..9a977ad35 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml @@ -385,7 +385,7 @@ Job name: - + Customer: diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs index edc7cce52..364ca8ee7 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs @@ -26,9 +26,6 @@ namespace Tango.PPC.UI /// public partial class MainWindow : Window { - private String _technician_mode_buffer; - private Viewbox viewBox; - public static MainWindow Instance { get; private set; } public MainWindow() @@ -37,8 +34,6 @@ namespace Tango.PPC.UI InitializeComponent(); - _technician_mode_buffer = String.Empty; - bool has_touch = false; #if !DESKTOP @@ -91,34 +86,5 @@ namespace Tango.PPC.UI { TangoIOC.Default.GetInstance().ShutDown(); } - - protected override void OnPreviewKeyDown(System.Windows.Input.KeyEventArgs e) - { - base.OnPreviewKeyDown(e); - - try - { - _technician_mode_buffer += Char.Parse(e.Key.ToString()); - } - catch{} - - if (e.Key == Key.Return || e.Key == Key.Tab) - { - if (_technician_mode_buffer.ToLower().Contains("ENTERTECHNICIAN".ToLower())) - { - _technician_mode_buffer = String.Empty; - TangoIOC.Default.GetInstance().EnterTechnicianMode(); - e.Handled = true; - } - else if (_technician_mode_buffer.ToLower().Contains("EXITTECHNICIAN".ToLower())) - { - _technician_mode_buffer = String.Empty; - TangoIOC.Default.GetInstance().ExitTechnicianMode(); - e.Handled = true; - } - - _technician_mode_buffer = String.Empty; - } - } } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs index 43b0cc047..4b5874907 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs @@ -161,11 +161,13 @@ namespace Tango.PPC.UI.PPCApplication //Start watchdog _watchdogServer = new WatchDogServer(Application.Current.Dispatcher); - +#if RELEASE + if (settings.EnableWatchDog) { _watchdogServer.Start(); } +#endif LogManager.Log("Reading Core settings..."); var coreSettings = SettingsManager.Default.GetOrCreate(); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj index f40bfa7de..1891139e9 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj @@ -509,7 +509,7 @@ del "$(TargetDir)firmware_package.tfp" - + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest index d72e75011..efc5f8179 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest @@ -16,7 +16,7 @@ Remove this element if your application requires this virtualization for backwards compatibility. --> - + diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.cs index 76e99ff88..6f8297a5e 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.cs +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchTextBox.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -20,6 +21,7 @@ namespace Tango.Touch.Controls public class TouchTextBox : TouchInput { private TextBox _text_box; + private DateTime _lost_focus_time; public String Text { @@ -82,10 +84,17 @@ namespace Tango.Touch.Controls _text_box = GetTemplateChild("PART_TextBox") as TextBox; _text_box.GotFocus += _text_box_GotFocus; + _text_box.LostFocus += _text_box_LostFocus; + this.RegisterForPreviewMouseOrTouchUp(OnMouseOrTouchUp); } + private void _text_box_LostFocus(object sender, RoutedEventArgs e) + { + _lost_focus_time = DateTime.Now; + } + private void OnMouseOrTouchUp(object sender, MouseOrTouchEventArgs e) { if (TapCommand != null) @@ -96,15 +105,18 @@ namespace Tango.Touch.Controls private async void _text_box_GotFocus(object sender, RoutedEventArgs e) { - await Task.Delay(50); - - if (FocusSelectionMode == FocusSelectionMode.SelectAll) - { - _text_box.SelectAll(); - } - else if (FocusSelectionMode == FocusSelectionMode.ScrollToEnd) + if (DateTime.Now > _lost_focus_time.AddMilliseconds(200)) { - _text_box.CaretIndex = _text_box.Text.Length; + await Task.Delay(50); + + if (FocusSelectionMode == FocusSelectionMode.SelectAll) + { + _text_box.SelectAll(); + } + else if (FocusSelectionMode == FocusSelectionMode.ScrollToEnd) + { + _text_box.CaretIndex = _text_box.Text.Length; + } } } diff --git a/Software/Visual_Studio/Tango.Touch/Keyboard/KeyboardView.cs b/Software/Visual_Studio/Tango.Touch/Keyboard/KeyboardView.cs index 7f4641a89..cddb289f1 100644 --- a/Software/Visual_Studio/Tango.Touch/Keyboard/KeyboardView.cs +++ b/Software/Visual_Studio/Tango.Touch/Keyboard/KeyboardView.cs @@ -127,7 +127,7 @@ namespace Tango.Touch.Keyboard DateTime _last = _instance._lastFocusTime; - await Task.Delay(100); + await Task.Delay(300); if (_last == _instance._lastFocusTime) { @@ -305,7 +305,7 @@ namespace Tango.Touch.Keyboard private void OnMouseDown(object sender, MouseOrTouchEventArgs e) { - if (e.Source == _content_presenter && IsOpened) + if (e.OriginalSource.GetType().Name != "TextBoxView" && e.Source == _content_presenter && IsOpened) { IsOpened = false; } -- cgit v1.3.1