From 00a491d93733d4625ad329b2ba8237f445364b3f Mon Sep 17 00:00:00 2001 From: Mirta Date: Wed, 30 Dec 2020 16:39:52 +0200 Subject: merge --- .../PPC/Tango.PPC.UI/Views/EmergencyView.xaml | 16 +-- .../PPC/Tango.PPC.UI/Views/ExternalBridgeView.xaml | 19 ++- .../PPC/Tango.PPC.UI/Views/InternalModuleView.xaml | 18 --- .../Tango.PPC.UI/Views/InternalModuleView.xaml.cs | 28 ----- .../PPC/Tango.PPC.UI/Views/LayoutView.xaml | 131 ++++++++------------- .../PPC/Tango.PPC.UI/Views/LayoutView.xaml.cs | 16 +-- .../PPC/Tango.PPC.UI/Views/LoadingView.xaml | 11 +- .../PPC/Tango.PPC.UI/Views/MachineSetupView.xaml | 2 +- .../PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml | 5 +- .../Tango.PPC.UI/Views/MachineUpdateView.xaml.cs | 6 +- .../PPC/Tango.PPC.UI/Views/MainView.xaml | 58 +-------- .../PPC/Tango.PPC.UI/Views/PowerOffView.xaml | 20 ---- .../PPC/Tango.PPC.UI/Views/PowerOffView.xaml.cs | 28 ----- .../Tango.PPC.UI/Views/RestartingSystemView.xaml | 40 ++----- .../PPC/Tango.PPC.UI/Views/RestartingView.xaml | 52 -------- .../PPC/Tango.PPC.UI/Views/RestartingView.xaml.cs | 28 ----- 16 files changed, 90 insertions(+), 388 deletions(-) delete mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Views/InternalModuleView.xaml delete mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Views/InternalModuleView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Views/PowerOffView.xaml delete mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Views/PowerOffView.xaml.cs delete mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingView.xaml delete mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingView.xaml.cs (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Views') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/EmergencyView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/EmergencyView.xaml index f2b018bfa..dfc70e602 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/EmergencyView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/EmergencyView.xaml @@ -9,18 +9,12 @@ xmlns:local="clr-namespace:Tango.PPC.UI.Views" mc:Ignorable="d" d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:EmergencyViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.EmergencyViewVM}"> - + - - - EMERGENCY PUSH BUTTON PRESSED - How to handle: - - 1. Verify that it is safe to restart the system. - 2. Release the emergency button. - 3. Press the power button to power up the system. - - + + + Emergency Switch Activated + Please release the emergency switch to exit this screen. diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/ExternalBridgeView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/ExternalBridgeView.xaml index fddd15fe7..d83128007 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/ExternalBridgeView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/ExternalBridgeView.xaml @@ -7,23 +7,18 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:localControls="clr-namespace:Tango.PPC.UI.Controls" xmlns:local="clr-namespace:Tango.PPC.UI.Views" mc:Ignorable="d" d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:ExternalBridgeViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.ExternalBridgeViewVM}" Background="{StaticResource TangoPrimaryBackgroundBrush}"> - - - - - - - + + + - + + @@ -287,21 +302,8 @@ - - - - - - - - - - - - - - - + + @@ -328,35 +330,6 @@ - - - - - - - - - - - - - - - - - - - - - - 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 b87f14b89..883d3f893 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 @@ -30,7 +30,7 @@ namespace Tango.PPC.UI.Views { public static LayoutView Instance { get; private set; } private LayoutViewVM _vm; - private System.Timers.Timer _timer; + private DispatcherTimer _timer; public LayoutView() { @@ -39,9 +39,9 @@ namespace Tango.PPC.UI.Views Loaded += (_, __) => _vm = DataContext as LayoutViewVM; techPressElement.RegisterForPreviewMouseOrTouchDown(OnMouseOrTouchDown); techPressElement.RegisterForPreviewMouseOrTouchUp(OnMouseOrTouchUp); - _timer = new System.Timers.Timer(); - _timer.Interval = TimeSpan.FromSeconds(10).TotalMilliseconds; - _timer.Elapsed += _timer_Elapsed; + _timer = new DispatcherTimer(); + _timer.Interval = TimeSpan.FromSeconds(10); + _timer.Tick += _timer_Tick; this.PreviewMouseUp += LayoutView_PreviewMouseUp; } @@ -51,14 +51,10 @@ namespace Tango.PPC.UI.Views _vm.ApplicationManager.ResetScreenLockTimer(); } - private void _timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) + private void _timer_Tick(object sender, EventArgs e) { _timer.Stop(); - - Dispatcher.BeginInvoke(new Action(() => - { - _vm.ToggleTechnicianMode(); - })); + _vm.ToggleTechnicianMode(); } private void OnMouseOrTouchDown(object sender, MouseOrTouchEventArgs e) diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml index a917695af..79d9cd54b 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml @@ -10,9 +10,9 @@ xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" xmlns:local="clr-namespace:Tango.PPC.UI.Views" mc:Ignorable="d" - d:DesignHeight="1280" d:DesignWidth="800" Background="{StaticResource TangoPrimaryBackgroundBrush}" d:DataContext="{d:DesignInstance Type=vm:LoadingViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.LoadingView}"> + d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:LoadingViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.LoadingView}"> - + - - - + + + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml index 40b296d1e..9437caac9 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineSetupView.xaml @@ -25,7 +25,7 @@ - + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml index beb09be0d..fba8a599d 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml @@ -194,9 +194,8 @@ CLOSE - - Update Failed - + + An error occurred while trying to update the machine. diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml.cs index 13a605774..f63899932 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineUpdateView.xaml.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -38,10 +37,7 @@ namespace Tango.PPC.UI.Views navigationControl.NavigateTo(view.ToString(), () => { - if (!source.Task.IsCompleted) - { - source.SetResult(new object()); - } + source.SetResult(new object()); }); return source.Task; diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml index 2e36347a3..6d6d57526 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml @@ -7,7 +7,6 @@ xmlns:commonControls="clr-namespace:Tango.PPC.Common.Controls;assembly=Tango.PPC.Common" xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels" xmlns:global="clr-namespace:Tango.PPC.UI" - xmlns:operations="clr-namespace:Tango.Integration.Operation;assembly=Tango.Integration" xmlns:local="clr-namespace:Tango.PPC.UI.Views" xmlns:notifications="clr-namespace:Tango.PPC.UI.Notifications" xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" @@ -47,21 +46,6 @@ - - - - - - @@ -69,7 +53,7 @@ - - @@ -144,7 +89,6 @@ - diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/PowerOffView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/PowerOffView.xaml deleted file mode 100644 index 22952a827..000000000 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/PowerOffView.xaml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - Machine is turning Off - Do not unplug machine while turning off - ABORT - - - diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/PowerOffView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/PowerOffView.xaml.cs deleted file mode 100644 index ead34ae12..000000000 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/PowerOffView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.UI.Views -{ - /// - /// Interaction logic for LoadingView.xaml - /// - public partial class PowerOffView : UserControl - { - public PowerOffView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingSystemView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingSystemView.xaml index dd4d2f5d5..996b1788d 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingSystemView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingSystemView.xaml @@ -10,37 +10,17 @@ mc:Ignorable="d" d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:RestartingSystemViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.RestartingSystemViewVM}" Background="{StaticResource TangoPrimaryBackgroundBrush}"> - - - - - - - - - + + + + + Setup completed. + + + + Restarting the system for the last time... + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingView.xaml deleted file mode 100644 index 41017f629..000000000 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingView.xaml +++ /dev/null @@ -1,52 +0,0 @@ - - - - - - - - - - v - - - - - - - - - diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingView.xaml.cs deleted file mode 100644 index fabd7b47b..000000000 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/RestartingView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.UI.Views -{ - /// - /// Interaction logic for LoadingView.xaml - /// - public partial class RestartingView : UserControl - { - public RestartingView() - { - InitializeComponent(); - } - } -} -- cgit v1.3.1