diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-06-17 07:26:14 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-06-17 07:26:14 +0300 |
| commit | dd13554edc2816b026b00fbad26d17f82d8d16c3 (patch) | |
| tree | 4e02ccb755f0e9350d72c3cba902caf50f2e45e9 /Software/Visual_Studio/PPC | |
| parent | b7db8dc62f437093bcdc7784d7aa6b1fb6a08793 (diff) | |
| download | Tango-dd13554edc2816b026b00fbad26d17f82d8d16c3.tar.gz Tango-dd13554edc2816b026b00fbad26d17f82d8d16c3.zip | |
Merge
Diffstat (limited to 'Software/Visual_Studio/PPC')
5 files changed, 22 insertions, 3 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs index ee96a77a5..4e00474f4 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs @@ -155,7 +155,18 @@ namespace Tango.PPC.Common.EventLogging /// <param name="e">The <see cref="PrintingFailedEventArgs"/> instance containing the event data.</param> private void MachineOperator_PrintingFailed(object sender, PrintingFailedEventArgs e) { - Log(EventTypes.JOB_FAILED, e.Exception.Message); + String eventInfo = String.Empty; + + if (e.Exception is Transport.ResponseErrorException responseError) + { + if (responseError.Container.EventCode > 0) + { + EventTypes evType = (EventTypes)responseError.Container.EventCode; + eventInfo = "\n#" + responseError.Container.EventCode + " " + evType.ToDescription(); + } + } + + Log(EventTypes.JOB_FAILED, e.Exception.Message + eventInfo); } /// <summary> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItem.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItem.cs index 6a29511a9..963496508 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItem.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notifications/NotificationItem.cs @@ -32,6 +32,11 @@ namespace Tango.PPC.Common.Notifications Priority = NotificationPriority.Normal; } + /// <summary> + /// Gets or sets the notification date and time. + /// </summary> + public DateTime Time { get; set; } + private bool _canClose; /// <summary> /// Gets or sets a value indicating whether this instance can close. diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs index cc8f7b4ab..7b26d8425 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs @@ -299,6 +299,7 @@ namespace Tango.PPC.UI.Notifications /// <returns></returns> public NotificationItem PushNotification(NotificationItem item) { + item.Time = DateTime.Now; LogManager.Log($"Pushing NotificationItem '{item.GetType().Name}'."); item.RemoveAction = () => { PopNotification(item); }; NotificationItems.Insert(0, item); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs index 07b58e55f..64c56e5e9 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs @@ -14,6 +14,7 @@ using Tango.BL.Entities; using Tango.BL.Enumerations; using Tango.Logging; using Tango.PPC.UI.Views; +using System.Diagnostics; namespace Tango.PPC.UI.ViewModels { @@ -97,7 +98,7 @@ namespace Tango.PPC.UI.ViewModels { LogManager.Log("Application is ready! Navigating to home module..."); - if (BuildProvider.IsEureka) + if (BuildProvider.IsEureka && !Debugger.IsAttached) { var secondsPassed = (DateTime.Now - LoadingView.VideoStartTime).TotalSeconds; var secondsToHold = Math.Max(10 - secondsPassed, 0); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml index 2f1a54e64..0acd1d7e5 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml @@ -1509,9 +1509,10 @@ </Grid> <touch:TouchButton Opacity="0" Background="Transparent" Style="{StaticResource TangoFlatButton}" Command="{Binding CloseCommand}" CommandParameter="{Binding}" Foreground="{StaticResource TangoPrimaryBackgroundBrush}" Padding="5" /> </Grid> - </Grid> </Border> + + <TextBlock Text="{Binding Time,StringFormat='hh:mm:ss'}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 5 7 0" /> </Grid> </DataTemplate> </ItemsControl.ItemTemplate> |
