aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2023-04-18 20:25:46 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2023-04-18 20:25:46 +0300
commit1133972c0c51feb478aa3944fad5f374a8a2da35 (patch)
treeaa02e09e89e5e80c918500dbe3d59ea2b5259248 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
parent1c7f16c34f85dd65a02ad08dde984f04a4d82b83 (diff)
downloadTango-1133972c0c51feb478aa3944fad5f374a8a2da35.tar.gz
Tango-1133972c0c51feb478aa3944fad5f374a8a2da35.zip
Added connective icons and time to bottom of menu.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
index d16792ead..95eb22d7a 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
@@ -31,6 +31,7 @@ namespace Tango.PPC.UI.ViewModels
{
private JobHandler _jobHandler;
private bool _resettingDevice;
+ private DispatcherTimer _date_timer;
/// <summary>
/// Gets or sets the module loader.
@@ -219,6 +220,16 @@ namespace Tango.PPC.UI.ViewModels
set { _cartridges = value; RaisePropertyChangedAuto(); }
}
+ private DateTime _currentDateTime;
+ /// <summary>
+ /// Gets or sets the current date time.
+ /// </summary>
+ public DateTime CurrentDateTime
+ {
+ get { return _currentDateTime; }
+ set { _currentDateTime = value; RaisePropertyChangedAuto(); }
+ }
+
#endregion
#region Commands
@@ -306,6 +317,11 @@ namespace Tango.PPC.UI.ViewModels
PowerOffCommand = new RelayCommand(PowerOffMachine, () => MachineProvider.MachineOperator.Status != MachineStatuses.Disconnected);
ResetCommand = new RelayCommand(ResetMachine, () => MachineProvider.MachineOperator.Status != MachineStatuses.Disconnected);
StandByCommand = new RelayCommand(StandBy, () => MachineProvider.MachineOperator.CanPrint);
+
+ _date_timer = new DispatcherTimer();
+ _date_timer.Interval = TimeSpan.FromSeconds(1);
+ _date_timer.Tick += _date_timer_Tick;
+ _date_timer.Start();
}
#endregion
@@ -614,6 +630,11 @@ namespace Tango.PPC.UI.ViewModels
#region Event Handlers
+ private void _date_timer_Tick(object sender, EventArgs e)
+ {
+ CurrentDateTime = DateTime.Now;
+ }
+
/// <summary>
/// Handles the PrintingStarted event of the MachineOperator.
/// </summary>