From 2d148c9f0de61bc09fbab89341dc05b82e45f78a Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 17 Dec 2019 15:18:56 +0200 Subject: Implemented PPC DataGrid Tech style. Changed auto update icon. Changed Backup and Restore module name. Implemented Updates & Synchronization Details View. --- .../Tango.PPC.BackupRestore/BackupRestoreModule.cs | 2 +- .../Dialogs/SynchronizationDetailsView.xaml | 74 +++++++ .../Dialogs/SynchronizationDetailsView.xaml.cs | 28 +++ .../Dialogs/SynchronizationDetailsViewVM.cs | 22 ++ .../Dialogs/UpdateDetailsView.xaml | 84 +++++++ .../Dialogs/UpdateDetailsView.xaml.cs | 28 +++ .../Dialogs/UpdateDetailsViewVM.cs | 21 ++ .../Tango.PPC.Technician.csproj | 16 ++ .../ViewModels/LoggingViewVM.cs | 2 - .../ViewModels/UpdatesViewVM.cs | 32 +++ .../Tango.PPC.Technician/Views/CatalogView.xaml | 4 +- .../Tango.PPC.Technician/Views/LoggingView.xaml | 245 +++++++-------------- .../Tango.PPC.Technician/Views/LoggingView.xaml.cs | 17 -- .../Tango.PPC.Technician/Views/UpdatesView.xaml | 88 +------- .../PPC/Tango.PPC.Common/Resources/Styles.xaml | 65 ++++++ .../PPC/Tango.PPC.UI/Images/update_available.png | Bin 2573 -> 2856 bytes .../Tango.Touch/Controls/TouchSimpleDataGrid.cs | 10 + 17 files changed, 472 insertions(+), 266 deletions(-) create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml.cs create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsViewVM.cs create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml.cs create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsViewVM.cs (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/BackupRestoreModule.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/BackupRestoreModule.cs index 0524e2f16..25cdfbb27 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/BackupRestoreModule.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BackupRestore/BackupRestoreModule.cs @@ -25,7 +25,7 @@ namespace Tango.PPC.BackupRestore { get { - return "Backup/Restore"; + return "Backup & Restore"; } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml new file mode 100644 index 000000000..37fa8b05c --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CLOSE + + + + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.xaml.cs new file mode 100644 index 000000000..40f7a536c --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsView.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.Dialogs +{ + /// + /// Interaction logic for LogItemDetailsView.xaml + /// + public partial class SynchronizationDetailsView : UserControl + { + public SynchronizationDetailsView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsViewVM.cs new file mode 100644 index 000000000..392c8dd3a --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/SynchronizationDetailsViewVM.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; +using Tango.Logging; +using Tango.PPC.Common.Synchronization; +using Tango.SharedUI; + +namespace Tango.PPC.Technician.Dialogs +{ + public class SynchronizationDetailsViewVM : DialogViewVM + { + private SynchronizationStatus _status; + public SynchronizationStatus Status + { + get { return _status; } + set { _status = value; RaisePropertyChangedAuto(); } + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml new file mode 100644 index 000000000..1f0f57be0 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CLOSE + + + + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.xaml.cs new file mode 100644 index 000000000..f2a06aedf --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsView.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.Dialogs +{ + /// + /// Interaction logic for LogItemDetailsView.xaml + /// + public partial class UpdateDetailsView : UserControl + { + public UpdateDetailsView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsViewVM.cs new file mode 100644 index 000000000..36c0fc6d7 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Dialogs/UpdateDetailsViewVM.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; +using Tango.Logging; +using Tango.SharedUI; + +namespace Tango.PPC.Technician.Dialogs +{ + public class UpdateDetailsViewVM : DialogViewVM + { + private TangoUpdate _update; + public TangoUpdate Update + { + get { return _update; } + set { _update = value; RaisePropertyChangedAuto(); } + } + } +} 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 b6502e417..bdbc5992c 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,10 +72,18 @@ EmbeddedLogItemDetailsView.xaml + + SynchronizationDetailsView.xaml + + + UpdateDetailsView.xaml + LogItemDetailsView.xaml + + @@ -191,6 +199,14 @@ MSBuild:Compile Designer + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + Designer MSBuild:Compile 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 index b7634ff95..89ac7e87b 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs @@ -210,8 +210,6 @@ namespace Tango.PPC.Technician.ViewModels Log = SelectedLog, }); } - - SelectedLog = null; } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/UpdatesViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/UpdatesViewVM.cs index 91bbcba0e..3f4232252 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/UpdatesViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/UpdatesViewVM.cs @@ -10,6 +10,8 @@ using Tango.BL.Enumerations; using Tango.Core.Commands; using Tango.PPC.Common; using System.Data.Entity; +using Tango.PPC.Technician.Dialogs; +using Tango.PPC.Common.Synchronization; namespace Tango.PPC.Technician.ViewModels { @@ -24,6 +26,20 @@ namespace Tango.PPC.Technician.ViewModels set { _updates = value; RaisePropertyChangedAuto(); } } + private TangoUpdate _selectedUpdate; + public TangoUpdate SelectedUpdate + { + get { return _selectedUpdate; } + set { _selectedUpdate = value; OnSelectedUpdateChanged(); } + } + + private SynchronizationStatus _selectedSynchronization; + public SynchronizationStatus SelectedSynchronization + { + get { return _selectedSynchronization; } + set { _selectedSynchronization = value; OnSelectedSynchronizationChanged(); } + } + public UpdatesViewVM() { Updates = new List(); @@ -71,5 +87,21 @@ namespace Tango.PPC.Technician.ViewModels LogManager.Log(ex, "Error loading update history."); } } + + private async void OnSelectedUpdateChanged() + { + if (SelectedUpdate != null) + { + await NotificationProvider.ShowDialog(new UpdateDetailsViewVM() { Update = SelectedUpdate }); + } + } + + private async void OnSelectedSynchronizationChanged() + { + if (SelectedSynchronization != null) + { + await NotificationProvider.ShowDialog(new SynchronizationDetailsViewVM() { Status = SelectedSynchronization }); + } + } } } 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 index a48c80a52..0eab521e1 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/CatalogView.xaml @@ -97,9 +97,9 @@ - Updates + Updates & Synchronization - View the current status and history of update operations. + View the current status and history of update and synchronization operations. 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 index 600bcfc98..07db49909 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/LoggingView.xaml @@ -34,7 +34,7 @@ - + Application Embedded @@ -53,165 +53,90 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 index a8a807590..9c12f7f13 100644 --- 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 @@ -24,22 +24,5 @@ namespace Tango.PPC.Technician.Views { InitializeComponent(); } - - private void TouchNavigationLinks_SelectionChanged(object sender, SelectionChangedEventArgs e) - { - if (IsLoaded) - { - if (nav.SelectedIndex == 0) - { - gridApplication.Visibility = Visibility.Visible; - gridEmbedded.Visibility = Visibility.Hidden; - } - else - { - gridApplication.Visibility = Visibility.Hidden; - gridEmbedded.Visibility = Visibility.Visible; - } - } - } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml index fa5db97e9..df2e2d65f 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/Views/UpdatesView.xaml @@ -26,59 +26,19 @@ - Updates + Updates & Synchronization - Software Updates + Updates Synchronization - - - - - - - - - - + @@ -142,47 +102,7 @@ - - - - - - - - - - + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Styles.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Styles.xaml index 426372688..317b2f13f 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Styles.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Styles.xaml @@ -44,4 +44,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/update_available.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/update_available.png index cafcf1d83..c95dfa015 100644 Binary files a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/update_available.png and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/update_available.png differ diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchSimpleDataGrid.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchSimpleDataGrid.cs index 7cc2f3d2a..c0b455a55 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchSimpleDataGrid.cs +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchSimpleDataGrid.cs @@ -14,5 +14,15 @@ namespace Tango.Touch.Controls { DefaultStyleKeyProperty.OverrideMetadata(typeof(TouchSimpleDataGrid), new FrameworkPropertyMetadata(typeof(TouchSimpleDataGrid))); } + + public TouchSimpleDataGrid() + { + SelectionChanged += TouchSimpleDataGrid_SelectionChanged; + } + + private void TouchSimpleDataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + SelectedItem = null; + } } } -- cgit v1.3.1