From a299149cf7ce3d0fa363fd53840dcf41bf794125 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 25 Jul 2018 10:39:16 +0300 Subject: Improved log manager referenced assemblies listing. --- .../MachineStudio/Tango.MachineStudio.UI/App.xaml.cs | 2 ++ .../StudioApplication/DefaultStudioApplicationManager.cs | 2 -- Software/Visual_Studio/Tango.Logging/LogManager.cs | 11 +++++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs index bdd341592..c0be40ad4 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml.cs @@ -50,6 +50,8 @@ namespace Tango.MachineStudio.UI LogManager.Log("Application Started..."); + LogManager.LogReferencedAssemblies(); + base.OnStartup(e); LogManager.Categories.Clear(); diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs index 4290a9b71..d33b12a17 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/StudioApplication/DefaultStudioApplicationManager.cs @@ -56,8 +56,6 @@ namespace Tango.MachineStudio.UI.StudioApplication { TangoIOC.Default.GetAllInstancesByBase().ToList().ForEach(x => x.OnApplicationStarted()); }; - - LogManager.LogReferencedAssemblies(); }); }); } diff --git a/Software/Visual_Studio/Tango.Logging/LogManager.cs b/Software/Visual_Studio/Tango.Logging/LogManager.cs index c0a8409ef..7d339d6b6 100644 --- a/Software/Visual_Studio/Tango.Logging/LogManager.cs +++ b/Software/Visual_Studio/Tango.Logging/LogManager.cs @@ -216,9 +216,16 @@ namespace Tango.Logging { String log = "--------------------- Referenced Assemblies --------------------------" + Environment.NewLine + Environment.NewLine; - foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies()) + string codeBase = typeof(LogManager).Assembly.CodeBase; + UriBuilder uri = new UriBuilder(codeBase); + string path = Uri.UnescapeDataString(uri.Path); + String folder = Path.GetDirectoryName(path); + + foreach (var file in Directory.GetFiles(folder,"*.dll")) { - log += a.GetName().Name + ", v" + a.GetName().Version + Environment.NewLine; + FileVersionInfo fvi = FileVersionInfo.GetVersionInfo(file); + string version = fvi.ProductVersion; + log += Path.GetFileNameWithoutExtension(file) + ", v" + version + Environment.NewLine; } log += Environment.NewLine + "--------------------- --------------------- --------------------------"; -- cgit v1.3.1 From 8f83b5cedf2a0af57836e2db227d88b50e612cb1 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 25 Jul 2018 13:15:26 +0300 Subject: Working on PPC. --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 1835008 -> 1835008 bytes .../Tango.PPC.Jobs/ViewModels/MainViewVM.cs | 26 +++++++++--------- .../Tango.PPC.Jobs/Views/JobProgressView.xaml | 30 +++++++++++++++++++-- .../NotificationItems/MessageNotificationItem.cs | 22 +++++++++++++-- .../MessageNotificationItemView.xaml | 20 +++++--------- .../Tango.Touch/Controls/TouchBusyIndicator.xaml | 9 +++++++ .../Tango.Touch/Controls/TouchNotificationBar.cs | 11 ++++++++ .../Tango.Touch/Controls/TouchNotificationBar.xaml | 21 +++++++++++++++ 9 files changed, 110 insertions(+), 29 deletions(-) (limited to 'Software/Visual_Studio') diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 0631305ae..07f036ee1 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 8ad8512db..55ff05c51 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs index 28ff1793b..389349f54 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/MainViewVM.cs @@ -21,26 +21,28 @@ namespace Tango.PPC.Jobs.ViewModels private void MachineOperator_PrintingFailed(object sender, Integration.Operation.PrintingFailedEventArgs e) { - NotificationProvider.PushNotification(new MessageNotificationItem(String.Format("Job failed. ({0})", e.Exception.Message), MessageNotificationItem.MessageNotificationItemTypes.Error, () => - { - NavigationManager.NavigateWithObject(e.Job); - NavigationManager.ClearHistoryExcept(); - })); + NotificationProvider.PushNotification(new MessageNotificationItem( + String.Format("'{0}' failed.", e.Job.Name), + String.Format("The job '{1}' has failed due to unexpected error.{0}{2}{0}{0}Tap to view this job details.", Environment.NewLine, e.Job.Name, e.Exception), MessageNotificationItem.MessageNotificationItemTypes.Error, () => + { + NavigationManager.NavigateWithObject(e.Job); + NavigationManager.ClearHistoryExcept(); + })); } private void MachineOperator_PrintingCompleted(object sender, Integration.Operation.PrintingEventArgs e) { if (e.Job.Designation == BL.Enumerations.JobDesignations.SampleDye) { - NotificationProvider.PushNotification(new MessageNotificationItem("Sample completed successfully.", MessageNotificationItem.MessageNotificationItemTypes.Success, () => - { - NavigationManager.NavigateWithObject(new JobNavigationObject() { Job = e.Job, Intent = JobNavigationIntent.SampleDye }); - NavigationManager.ClearHistoryExcept(); - })); + NotificationProvider.PushNotification(new MessageNotificationItem(String.Format("'{0}' sample dye completed successfully", e.Job.Name), "Tap to approve or repeat.", MessageNotificationItem.MessageNotificationItemTypes.Success, () => + { + NavigationManager.NavigateWithObject(new JobNavigationObject() { Job = e.Job, Intent = JobNavigationIntent.SampleDye }); + NavigationManager.ClearHistoryExcept(); + })); } else if (e.Job.Designation == BL.Enumerations.JobDesignations.FineTuning) { - NotificationProvider.PushNotification(new MessageNotificationItem("Fine tuning completed successfully.", MessageNotificationItem.MessageNotificationItemTypes.Success, () => + NotificationProvider.PushNotification(new MessageNotificationItem(String.Format("'{0}' fine tuning completed successfully", e.Job.Name), "Tap to approve or repeat.", MessageNotificationItem.MessageNotificationItemTypes.Success, () => { NavigationManager.NavigateWithObject(new JobNavigationObject() { Job = e.Job, Intent = JobNavigationIntent.FineTuning }); NavigationManager.ClearHistoryExcept(); @@ -48,7 +50,7 @@ namespace Tango.PPC.Jobs.ViewModels } else { - NotificationProvider.PushNotification(new MessageNotificationItem("Job completed successfully.", MessageNotificationItem.MessageNotificationItemTypes.Success, () => + NotificationProvider.PushNotification(new MessageNotificationItem(String.Format("'{0}' completed successfully", e.Job.Name), "Tap to view this job details.", MessageNotificationItem.MessageNotificationItemTypes.Success, () => { NavigationManager.NavigateWithObject(new JobNavigationObject() { Job = e.Job }); NavigationManager.ClearHistoryExcept(); diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml index eb5497bd8..612c850a3 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobProgressView.xaml @@ -47,8 +47,34 @@ - - + + + + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItem.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItem.cs index 5e120ab8c..b7f206e7c 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItem.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItem.cs @@ -23,6 +23,13 @@ namespace Tango.PPC.Common.Notifications.NotificationItems set { _message = value; RaisePropertyChangedAuto(); } } + private String _expandedMessage; + public String ExpandedMessage + { + get { return _expandedMessage; } + set { _expandedMessage = value; RaisePropertyChangedAuto(); } + } + private MessageNotificationItemTypes _messageType; public MessageNotificationItemTypes MessageType @@ -41,14 +48,25 @@ namespace Tango.PPC.Common.Notifications.NotificationItems } - public MessageNotificationItem(String message, MessageNotificationItemTypes type, Action pressed) : this() + public MessageNotificationItem(String message, String expandedMessage, MessageNotificationItemTypes type, Action pressed) : this() { Message = message; + ExpandedMessage = expandedMessage; MessageType = type; Pressed += (_, __) => pressed?.Invoke(); } - public MessageNotificationItem(String message, MessageNotificationItemTypes type) : this(message, type, null) + public MessageNotificationItem(String message, MessageNotificationItemTypes type, Action pressed) : this(message, null, type, pressed) + { + + } + + public MessageNotificationItem(String message, String expandedMessage, MessageNotificationItemTypes type) : this(message, expandedMessage, type, null) + { + + } + + public MessageNotificationItem(String message, MessageNotificationItemTypes type) : this(message, null, type) { } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml index 057e86a13..9b583a117 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItems/MessageNotificationItemView.xaml @@ -7,7 +7,7 @@ xmlns:local="clr-namespace:Tango.PPC.Common.Notifications.NotificationItems" mc:Ignorable="d" d:DesignHeight="60" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=local:MessageNotificationItem, IsDesignTimeCreatable=False}" MinHeight="60" Height="60" MaxHeight="150"> - + - - - - - + + + + + + diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchBusyIndicator.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchBusyIndicator.xaml index fa6a83d50..a3f26aa6e 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchBusyIndicator.xaml +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchBusyIndicator.xaml @@ -131,6 +131,15 @@ + + + + + + + + + diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.cs index 3cd3c1078..299844c1e 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.cs +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.cs @@ -39,6 +39,7 @@ namespace Tango.Touch.Controls private Grid _grid_container; private Grid _grid_mask; private ItemsControl _items_control; + private Grid _notification_counter_grid; static TouchNotificationBar() { @@ -117,6 +118,7 @@ namespace Tango.Touch.Controls _grid_container = GetTemplateChild("PART_Grid_Container") as Grid; _grid_mask = GetTemplateChild("PART_GridMask") as Grid; _items_control = GetTemplateChild("PART_ItemsControl") as ItemsControl; + _notification_counter_grid = GetTemplateChild("PART_NotificationCounterGrid") as Grid; //border_notifications.IsManipulationEnabled = true; _border_drag.RegisterForPreviewMouseOrTouchDown(GridNotificationMouseDown); @@ -161,6 +163,15 @@ namespace Tango.Touch.Controls _grid_mask.Opacity = _border_drag.ActualHeight / ActualHeight; ResizeNotifications(); + + if (e.NewSize.Height > CurrentMinHeight) + { + _notification_counter_grid.Visibility = Visibility.Hidden; + } + else + { + _notification_counter_grid.Visibility = Visibility.Visible; + } } private void ResizeNotifications() diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.xaml index 6c511363e..15ea569a0 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.xaml +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNotificationBar.xaml @@ -1,11 +1,14 @@  + + + + + + + + -- cgit v1.3.1 From 064a839e731d7d96922b468330fab5c065609a01 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 25 Jul 2018 14:03:04 +0300 Subject: Implemented graphs auto range, pause & clear in tech board module. --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 1835008 -> 1835008 bytes .../Editors/MultiGraphElementEditor.xaml | 2 +- .../Editors/SingleGraphElementEditor.xaml | 2 +- .../PropertiesTemplates/MultiGraphTemplate.xaml | 33 +++++++++------- .../PropertiesTemplates/SingleGraphTemplate.xaml | 33 +++++++++------- .../TechItems/MultiGraphItem.cs | 43 +++++++++++++++++++++ .../TechItems/SingleGraphItem.cs | 43 +++++++++++++++++++++ .../Controls/RealTimeGraphControl.xaml | 2 +- .../Controls/RealTimeGraphControl.xaml.cs | 10 +++++ .../Controls/RealTimeGraphMultiControl.xaml | 2 +- .../Controls/RealTimeGraphMultiControl.xaml.cs | 12 ++++++ .../FastGraphs/RealTimeGraphExLineErase.cs | 9 +++++ .../FastGraphs/RealTimeGraphExLineScroll.cs | 9 +++++ .../FastGraphs/RealTimeGraphExMultiLineErase.cs | 9 +++++ .../FastGraphs/RealTimeGraphExMultiLineScroll.cs | 9 +++++ .../RealTimeGraphEx/RealTimeGraphExBase.cs | 16 ++++++++ 17 files changed, 204 insertions(+), 30 deletions(-) (limited to 'Software/Visual_Studio') diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 07f036ee1..77a4a37e1 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 55ff05c51..e749ff2d3 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml index a1197b9d9..4d1cc08e4 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Editors/MultiGraphElementEditor.xaml @@ -30,7 +30,7 @@ - +