aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2021-08-13 18:19:12 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2021-08-13 18:19:12 +0300
commitb7f1dc37a15a354ef7fae439bbcedf1f2133189c (patch)
treebe0bbb11345b36449e3b54cbcb2def9c096b17f3 /Software/Visual_Studio
parente7819d9ffabb1efc272e61b4ef93a67d33dca57a (diff)
downloadTango-b7f1dc37a15a354ef7fae439bbcedf1f2133189c.tar.gz
Tango-b7f1dc37a15a354ef7fae439bbcedf1f2133189c.zip
Added logging for tracing PPC start/stop app buttons behavior.
Diffstat (limited to 'Software/Visual_Studio')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs15
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs10
2 files changed, 25 insertions, 0 deletions
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 e9de2538e..c2c069f45 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs
@@ -19,6 +19,7 @@ using System.Reflection;
using Tango.Core.DI;
using System.ComponentModel;
using System.Windows.Data;
+using Tango.Logging;
namespace Tango.PPC.UI.Notifications
{
@@ -563,6 +564,11 @@ namespace Tango.PPC.UI.Notifications
/// <param name="appButton">The app button.</param>
public void PushAppButton(AppButton appButton)
{
+ if (appButton != null)
+ {
+ LogManager.Log($"Pushing app button '{appButton.GetType().Name}'...");
+ }
+
_appButtons.Insert(0, appButton);
CurrentAppButton = appButton;
}
@@ -573,6 +579,15 @@ namespace Tango.PPC.UI.Notifications
/// <param name="appButton">The app button.</param>
public void PopAppButton(AppButton appButton)
{
+ if (appButton != null)
+ {
+ LogManager.Log($"Popping app button '{appButton.GetType().Name}'...");
+ }
+ else
+ {
+ LogManager.Log("Popping app button 'null' ??", LogCategory.Warning);
+ }
+
_appButtons.RemoveAll(x => x == appButton);
CurrentAppButton = _appButtons.FirstOrDefault();
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index a1d370109..e15a5a0bd 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -1270,6 +1270,8 @@ namespace Tango.Integration.Operation
/// <param name="job">The job.</param>
protected virtual void OnPrintingStarted(JobHandler handler, Job job, bool isResumed = false)
{
+ LogManager.Log("Raising printing started event...");
+
PrintingStarted?.Invoke(this, new PrintingEventArgs(handler, job)
{
StartDate = _jobStartDate,
@@ -1284,6 +1286,8 @@ namespace Tango.Integration.Operation
/// <param name="job">The job.</param>
protected virtual void OnPrintingCompleted(JobHandler handler, Job job)
{
+ LogManager.Log("Raising printing completed event...");
+
PrintingCompleted?.Invoke(this, new PrintingEventArgs(handler, job)
{
LiquidQuantities = _lastJobLiquidQuantities.ToList(),
@@ -1304,6 +1308,8 @@ namespace Tango.Integration.Operation
/// <param name="exception">The exception.</param>
protected virtual void OnPrintingFailed(JobHandler handler, Job job, Exception exception)
{
+ LogManager.Log("Raising printing failed event...");
+
PrintingFailed?.Invoke(this, new PrintingFailedEventArgs(handler, job, exception)
{
LiquidQuantities = _lastJobLiquidQuantities.ToList(),
@@ -1322,6 +1328,8 @@ namespace Tango.Integration.Operation
/// <param name="job">The job.</param>
protected virtual void OnPrintingAborted(JobHandler handler, Job job)
{
+ LogManager.Log("Raising printing aborted event...");
+
PrintingAborted?.Invoke(this, new PrintingEventArgs(handler, job)
{
LiquidQuantities = _lastJobLiquidQuantities.ToList(),
@@ -1340,6 +1348,8 @@ namespace Tango.Integration.Operation
/// <param name="job">The job.</param>
protected virtual void OnPrintingEnded(JobHandler handler, Job job)
{
+ LogManager.Log("Raising printing ended event...");
+
PrintingEnded?.Invoke(this, new PrintingEventArgs(handler, job)
{
LiquidQuantities = _lastJobLiquidQuantities.ToList(),