From 24d0a8782f8324f80222251a4ff4977d1258e3a8 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 19 Mar 2019 15:50:02 +0200 Subject: PPC Working on Tech Module. TCC using arocus + barcode scanning using ZBar! --- .../PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs index 1c1eeca5e..3cb790e65 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs @@ -244,6 +244,25 @@ namespace Tango.PPC.UI.ViewModels #endregion + #region Public Methods + + /// + /// Toggles the application technician mode. + /// + public void ToggleTechnicianMode() + { + if (!ApplicationManager.IsInTechnicianMode) + { + ApplicationManager.EnterTechnicianMode(); + } + else + { + ApplicationManager.ExitTechnicianMode(); + } + } + + #endregion + #region Event Handlers /// -- cgit v1.3.1 From db9308c46379fb324678ba04771dbee4edae4b17 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 20 Mar 2019 16:23:17 +0200 Subject: working on PPC Technician module . --- Software/DB/PPC/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/PPC/Tango_log.ldf | Bin 53673984 -> 53673984 bytes .../Tango.PPC.Technician/Images/logging.png | Bin 0 -> 4265 bytes .../Modules/Tango.PPC.Technician/Images/system.png | Bin 0 -> 2854 bytes .../Tango.PPC.Technician.csproj | 26 ++++++ .../Tango.PPC.Technician/ViewModelLocator.cs | 24 +++++ .../ViewModels/CatalogViewVM.cs | 40 ++++++++ .../ViewModels/LoggingViewVM.cs | 52 +++++++++++ .../Tango.PPC.Technician/ViewModels/MainViewVM.cs | 7 ++ .../Tango.PPC.Technician/Views/CatalogView.xaml | 51 +++++++++++ .../Tango.PPC.Technician/Views/CatalogView.xaml.cs | 28 ++++++ .../Tango.PPC.Technician/Views/LoggingView.xaml | 101 +++++++++++++++++++++ .../Tango.PPC.Technician/Views/LoggingView.xaml.cs | 28 ++++++ .../Tango.PPC.Technician/Views/MainView.xaml | 35 +------ .../Application/IPPCApplicationManager.cs | 2 +- .../PPC/Tango.PPC.Common/PPCSettings.cs | 5 + .../PPC/Tango.PPC.Common/Resources/Merged.xaml | 1 + .../PPCApplication/DefaultPPCApplicationManager.cs | 39 +++++--- .../PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs | 18 ++++ .../PPC/Tango.PPC.UI/Views/LayoutView.xaml | 2 +- .../PPC/Tango.PPC.UI/Views/LayoutView.xaml.cs | 28 +++--- .../Tango.AnimatedGif/ImageBehavior.cs | 6 +- .../ExtensionMethods/FrameworkElementExtensions.cs | 4 + .../Tango.Touch/Controls/TouchNativeListBox.xaml | 54 ++++++----- .../Tango.Touch/Controls/TouchPanel.xaml | 2 +- 25 files changed, 463 insertions(+), 90 deletions(-) create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/logging.png create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/system.png create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/CatalogViewVM.cs create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml.cs create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml.cs (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels') diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf index 36b58c4d0..fc78951f4 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 ab7c33171..58e5492a8 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.Technician/Images/logging.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/logging.png new file mode 100644 index 000000000..580bcb046 Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/logging.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/system.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/system.png new file mode 100644 index 000000000..48c8ce83d Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Images/system.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Tango.PPC.Technician.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Tango.PPC.Technician.csproj index 2a4c1d39c..5b34c38a1 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Tango.PPC.Technician.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Tango.PPC.Technician.csproj @@ -72,7 +72,15 @@ True + + + + CatalogView.xaml + + + LoggingView.xaml + MainView.xaml @@ -96,6 +104,10 @@ {A34EE0F0-649D-41C8-8489-B6F1CC6924EE} Tango.Core + + {BC932DBD-7CDB-488C-99E4-F02CF441F55E} + Tango.Logging + {8491D07B-C1F6-4B62-A412-41B9FD2D6538} Tango.SharedUI @@ -114,6 +126,14 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -122,5 +142,11 @@ + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModelLocator.cs index 3a4c8d829..3c6f874e0 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModelLocator.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModelLocator.cs @@ -16,6 +16,8 @@ namespace Tango.PPC.Technician static ViewModelLocator() { TangoIOC.Default.Register(); + TangoIOC.Default.Register(); + TangoIOC.Default.Register(); } /// @@ -28,5 +30,27 @@ namespace Tango.PPC.Technician return TangoIOC.Default.GetInstance(); } } + + /// + /// Gets the logging view VM. + /// + public static LoggingViewVM LoggingViewVM + { + get + { + return TangoIOC.Default.GetInstance(); + } + } + + /// + /// Gets the logging view VM. + /// + public static CatalogViewVM CatalogViewVM + { + get + { + return TangoIOC.Default.GetInstance(); + } + } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/CatalogViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/CatalogViewVM.cs new file mode 100644 index 000000000..97bae6f5b --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/CatalogViewVM.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core.Commands; +using Tango.PPC.Common; + +namespace Tango.PPC.Technician.ViewModels +{ + public class CatalogViewVM : PPCViewModel + { + /// + /// Gets or sets the navigation command. + /// + public RelayCommand NavigationCommand { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public CatalogViewVM() + { + NavigationCommand = new RelayCommand(NavigateToView); + } + + public override void OnApplicationStarted() + { + + } + + /// + /// Navigates to the specified view name. + /// + /// The view. + private void NavigateToView(string view) + { + NavigationManager.NavigateTo(view); + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs new file mode 100644 index 000000000..b46c6477e --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core; +using Tango.Logging; +using Tango.PPC.Common; + +namespace Tango.PPC.Technician.ViewModels +{ + public class LoggingViewVM : PPCViewModel + { + public SynchronizedObservableCollection ApplicationLogs { get; set; } + public SynchronizedObservableCollection EmbeddedLogs { get; set; } + + public LoggingViewVM() + { + ApplicationLogs = new SynchronizedObservableCollection(); + EmbeddedLogs = new SynchronizedObservableCollection(); + LogManager.NewLog += LogManager_NewLog; + } + + private void LogManager_NewLog(object sender, LogItemBase log) + { + ApplicationLogs.Insert(0, log); + + var now = DateTime.Now; + + try + { + foreach (var l in ApplicationLogs.ToList()) + { + if (l.TimeStamp.Date < DateTime.Now.Date) + { + ApplicationLogs.Remove(l); + } + } + } + catch + { + //I don't know if this will cause an exception but I'm tired. + } + } + + public override void OnApplicationStarted() + { + + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/MainViewVM.cs index 893d495fc..d63a89f3b 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/MainViewVM.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.PPC.Common; +using Tango.PPC.Technician.Views; namespace Tango.PPC.Technician.ViewModels { @@ -13,5 +14,11 @@ namespace Tango.PPC.Technician.ViewModels { } + + public override void OnNavigatedTo() + { + base.OnNavigatedTo(); + NavigationManager.NavigateTo(nameof(CatalogView)); + } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml new file mode 100644 index 000000000..79d753474 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml @@ -0,0 +1,51 @@ + + + + + + + + + + + + Technician Mode + + + + + + + Logging + + + + + + + System + + + + + + + Coming soon... + + + + + + + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml.cs new file mode 100644 index 000000000..d5e0398fb --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml.cs @@ -0,0 +1,28 @@ +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; + +namespace Tango.PPC.Technician.Views +{ + /// + /// Interaction logic for CatalogView.xaml + /// + public partial class CatalogView : UserControl + { + public CatalogView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml new file mode 100644 index 000000000..db82a5ad0 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + Logging + + + + + + + + Application + Embedded + + + + + + + + + + + + + + + + + + + Time: + + + + File: + + + + Method: + + + + Line: + + + + Message: + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml.cs new file mode 100644 index 000000000..9c12f7f13 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml.cs @@ -0,0 +1,28 @@ +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; + +namespace Tango.PPC.Technician.Views +{ + /// + /// Interaction logic for LoggingView.xaml + /// + public partial class LoggingView : UserControl + { + public LoggingView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/MainView.xaml index 5e9401742..66e16588b 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/MainView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/MainView.xaml @@ -7,39 +7,14 @@ xmlns:vm="clr-namespace:Tango.PPC.Technician.ViewModels" xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" xmlns:global="clr-namespace:Tango.PPC.Technician" + xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:local="clr-namespace:Tango.PPC.Technician.Views" mc:Ignorable="d" d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> - - - - - - - - - - Logs - - - - - - - - Application - Embedded - - - - - - - - - - - + + + + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Application/IPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Application/IPPCApplicationManager.cs index ff3f65221..2d76b202f 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Application/IPPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Application/IPPCApplicationManager.cs @@ -78,7 +78,7 @@ namespace Tango.PPC.Common.Application /// /// Enteres the application technician mode. /// - void EnterTechnicianMode(); + void EnterTechnicianMode(bool displayNotification = true); /// /// Exits the application technician mode. diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs index 409dd1cfc..32181a753 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs @@ -76,6 +76,11 @@ namespace Tango.PPC.Common /// public bool EnableWatchDog { get; set; } + /// + /// Gets or sets a value indicating whether to enable the technician mode when the application starts. + /// + public bool EnableTechnicianModeByDefault { get; set; } + /// /// Gets the machine service address. /// diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml index 05cd998e6..62f248a8c 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml @@ -14,6 +14,7 @@ + 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 261dbe6d4..ba1b44c8a 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs @@ -335,6 +335,11 @@ namespace Tango.PPC.UI.PPCApplication LogManager.Log($"Invoking {vm.GetType().Name}.OnApplicationReady..."); vm.OnApplicationReady(); } + + if (SettingsManager.Default.GetOrCreate().EnableTechnicianModeByDefault) + { + EnterTechnicianMode(false); + } }); } @@ -418,24 +423,32 @@ namespace Tango.PPC.UI.PPCApplication /// /// Enteres the application technician mode. /// - public async void EnterTechnicianMode() + public async void EnterTechnicianMode(bool displayNotification = true) { - var vm = await _notificationProvider.ShowDialog(); - - if (vm.DialogResult) + if (displayNotification) { - if (vm.Password == "Aa123456") - { - IsInTechnicianMode = true; - _moduleLoader.AllModules.ToList().ForEach(x => x.OnTechnicianEntered()); - await _notificationProvider.ShowInfo("Technician mode is now enabled."); - } - else + var vm = await _notificationProvider.ShowDialog(); + + if (vm.DialogResult) { - await _notificationProvider.ShowError("Invalid technician mode password."); - EnterTechnicianMode(); + if (vm.Password == "Aa123456") + { + IsInTechnicianMode = true; + _moduleLoader.AllModules.ToList().ForEach(x => x.OnTechnicianEntered()); + await _notificationProvider.ShowInfo("Technician mode is now enabled."); + } + else + { + await _notificationProvider.ShowError("Invalid technician mode password."); + EnterTechnicianMode(); + } } } + else + { + IsInTechnicianMode = true; + _moduleLoader.AllModules.ToList().ForEach(x => x.OnTechnicianEntered()); + } } /// diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs index 3cb790e65..9e8a9fe34 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs @@ -115,6 +115,12 @@ namespace Tango.PPC.UI.ViewModels /// Gets or sets the power command. /// public RelayCommand PowerCommand { get; set; } + + /// + /// Gets or sets the restart application command. + /// + public RelayCommand RestartApplicationCommand { get; set; } + #endregion #region Constructors @@ -139,6 +145,7 @@ namespace Tango.PPC.UI.ViewModels }); PowerCommand = new RelayCommand(() => IsPowerOpened = true); + RestartApplicationCommand = new RelayCommand(RestartApplication); } #endregion @@ -221,6 +228,17 @@ namespace Tango.PPC.UI.ViewModels } } + /// + /// Restarts the application. + /// + private async void RestartApplication() + { + if (await NotificationProvider.ShowQuestion("Are you sure you want to restart the application?")) + { + ApplicationManager.Restart(); + } + } + #endregion #region Override Methods diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml index 2a2f3e8b5..4079777f7 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml @@ -158,7 +158,7 @@ - Restart + Restart diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml.cs index 2156e45ca..777083b67 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml.cs @@ -52,24 +52,28 @@ namespace Tango.PPC.UI.Views private void OnMouseOrTouchDown(object sender, MouseOrTouchEventArgs e) { - techPressElement.CaptureMouse(); - - if (e.TouchDevice != null) - { - techPressElement.CaptureTouch(e.TouchDevice); - } + //if (e.TouchDevice != null) + //{ + // techPressElement.CaptureTouch(e.TouchDevice); + //} + //else + //{ + // techPressElement.CaptureMouse(); + //} _timer.Start(); } private void OnMouseOrTouchUp(object sender, MouseOrTouchEventArgs e) { - this.ReleaseMouseCapture(); - - if (e.TouchDevice != null) - { - techPressElement.ReleaseTouchCapture(e.TouchDevice); - } + //if (e.TouchDevice != null) + //{ + // techPressElement.ReleaseTouchCapture(e.TouchDevice); + //} + //else + //{ + // techPressElement.ReleaseMouseCapture(); + //} _timer.Stop(); } diff --git a/Software/Visual_Studio/Tango.AnimatedGif/ImageBehavior.cs b/Software/Visual_Studio/Tango.AnimatedGif/ImageBehavior.cs index a159106e6..cc13688ff 100644 --- a/Software/Visual_Studio/Tango.AnimatedGif/ImageBehavior.cs +++ b/Software/Visual_Studio/Tango.AnimatedGif/ImageBehavior.cs @@ -573,10 +573,8 @@ namespace Tango.AnimatedGif animation.RepeatBehavior = GetActualRepeatBehavior(imageControl, decoder, gifMetadata); - //Removed animation cache for PPC AsyncAdornerControl! - - //AnimationCache.AddAnimation(source, GetRepeatBehavior(imageControl), animation); - //AnimationCache.IncrementReferenceCount(source, GetRepeatBehavior(imageControl)); + AnimationCache.AddAnimation(source, GetRepeatBehavior(imageControl), animation); + AnimationCache.IncrementReferenceCount(source, GetRepeatBehavior(imageControl)); return animation; } return null; diff --git a/Software/Visual_Studio/Tango.Core/ExtensionMethods/FrameworkElementExtensions.cs b/Software/Visual_Studio/Tango.Core/ExtensionMethods/FrameworkElementExtensions.cs index 08f3bb101..909366ffd 100644 --- a/Software/Visual_Studio/Tango.Core/ExtensionMethods/FrameworkElementExtensions.cs +++ b/Software/Visual_Studio/Tango.Core/ExtensionMethods/FrameworkElementExtensions.cs @@ -77,6 +77,7 @@ public static class FrameworkElementExtensions OriginalSource = e.OriginalSource, Handled = e.Handled, GetPositionAction = (s) => { return e.GetTouchPoint(s).Position; }, + TouchDevice = e.TouchDevice, }; handler(element, args); @@ -176,6 +177,7 @@ public static class FrameworkElementExtensions OriginalSource = e.OriginalSource, Handled = e.Handled, GetPositionAction = (s) => { return e.GetTouchPoint(s).Position; }, + TouchDevice = e.TouchDevice, }; handler(element, args); @@ -270,6 +272,7 @@ public static class FrameworkElementExtensions OriginalSource = e.OriginalSource, Handled = e.Handled, GetPositionAction = (s) => { return e.GetTouchPoint(s).Position; }, + TouchDevice = e.TouchDevice, }; handler(element, args); @@ -369,6 +372,7 @@ public static class FrameworkElementExtensions OriginalSource = e.OriginalSource, Handled = e.Handled, GetPositionAction = (s) => { return e.GetTouchPoint(s).Position; }, + TouchDevice = e.TouchDevice, }; handler(element, args); diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNativeListBox.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchNativeListBox.xaml index 7d04c902a..456e82750 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNativeListBox.xaml +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNativeListBox.xaml @@ -7,37 +7,35 @@ - - - - - - - - - - + + + + + + + + + + + + +