aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2023-05-23 10:42:21 +0300
committerRoy <Roy.mail.net@gmail.com>2023-05-23 10:42:21 +0300
commit304735006580cb2f6728bedeb3393dbefc2e14f5 (patch)
tree8650d4baeb0b4db1f68b0fae3a0a8ddb7e66bdc0 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels
parent79cc4b56962ca4a508be501f7f2fb42938a3a073 (diff)
parentb981d43669a2cdcd9f7971e897ded9f1422f5b31 (diff)
downloadTango-304735006580cb2f6728bedeb3393dbefc2e14f5.tar.gz
Tango-304735006580cb2f6728bedeb3393dbefc2e14f5.zip
Merge branch 'eureka' of https://twinetfs.visualstudio.com/Tango/_git/Tango into eureka
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs12
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs91
2 files changed, 103 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 95eb22d7a..f40a89f42 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
@@ -293,6 +293,10 @@ namespace Tango.PPC.UI.ViewModels
/// Gets or sets the stand by command.
/// </summary>
public RelayCommand StandByCommand { get; set; }
+ /// <summary>
+ /// Gets or sets the open general information dialog command.
+ /// </summary>
+ public RelayCommand OpenGeneralinformationCommand { get; set; }
#endregion
@@ -317,6 +321,7 @@ 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);
+ OpenGeneralinformationCommand = new RelayCommand(OpenGeneralinformationDlg);
_date_timer = new DispatcherTimer();
_date_timer.Interval = TimeSpan.FromSeconds(1);
@@ -527,6 +532,13 @@ namespace Tango.PPC.UI.ViewModels
IsMenuOpened = false;
}
+ private async void OpenGeneralinformationDlg()
+ {
+ GeneralInformationViewVM vm = new GeneralInformationViewVM(MachineProvider, ApplicationManager);
+ vm = await NotificationProvider.ShowDialog<GeneralInformationViewVM>(vm);
+
+ }
+
#endregion
#region Override Methods
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
index a47b68a4f..828047ccf 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
@@ -187,6 +187,26 @@ namespace Tango.PPC.UI.ViewModels
public MachineOverviewModel OverviewModel { get; set; }
+ private bool _isDisplayJobOutline;
+ /// <summary>
+ /// Gets or sets a value indicating whether to display the job outline.
+ /// </summary>
+ public bool IsDisplayJobOutline
+ {
+ get { return _isDisplayJobOutline; }
+ set { _isDisplayJobOutline = value; RaisePropertyChangedAuto(); }
+ }
+
+ private JobTicket _jobOutlineTicket;
+ /// <summary>
+ /// Gets or sets the job outline ticket.
+ /// </summary>
+ public JobTicket JobOutlineTicket
+ {
+ get { return _jobOutlineTicket; }
+ set { _jobOutlineTicket = value; RaisePropertyChangedAuto(); }
+ }
+
#endregion
#region Commands
@@ -209,6 +229,10 @@ namespace Tango.PPC.UI.ViewModels
public RelayCommand ClearAllNotificationsCommand { get; set; }
+ public RelayCommand DisplayJobOutlineCommand { get; set; }
+
+ public RelayCommand HideJobOutlineCommand { get; set; }
+
#endregion
public MachineStatusViewVM()
@@ -221,6 +245,8 @@ namespace Tango.PPC.UI.ViewModels
JobStatusViewCommand = new RelayCommand(JobStatusView);
OverviewViewCommand = new RelayCommand(OverviewView);
ClearAllNotificationsCommand = new RelayCommand(ClearAllNotifications);
+ DisplayJobOutlineCommand = new RelayCommand(DisplayJobOutline);
+ HideJobOutlineCommand = new RelayCommand(HideJobOutline);
IsJobStatusViewEnable = true;
IsEnabledStopButton = false;
@@ -267,6 +293,57 @@ namespace Tango.PPC.UI.ViewModels
model.MidTankRefillPumpActive = item.MidTankRefillPumpActive;
model.RemainingTimeoutError = TimeSpan.FromSeconds(item.TimerRemainingSeconds);
}
+ //TEST
+ //if (model != null)
+ //{
+ // var Li = model.IDSPack.LiquidType.Type;
+ // var Mid = model.IDSPack.MidTankType.Type;
+ // model.Level = 0.0;
+ //model.JerricanPresent = false;
+ //model.FillingTimeoutError = false;
+ //model.MidTankEmpty = true;
+ //model.MidTankRefillPumpActive = false;
+ //model.RemainingTimeoutError = TimeSpan.FromSeconds(300);
+
+ //if (item.Index == 1)
+ //{
+ // model.Level = 1.0;
+ //}
+ //if (item.Index == 2)
+ //{
+ // model.Level = 2.0;
+ //}
+ //if (item.Index == 3)
+ //{
+ // model.Level = 3.0;
+ //}
+ //if (item.Index == 4)//TI
+ //{
+ // model.Level = 7.0;
+ //}
+ //if (item.Index == 5)//LC
+ //{
+ // model.Level = 7.0;
+ //}
+ //if (item.Index == 6)//LM
+ //{
+ // model.Level = 3.5;
+ //}
+ //if (item.Index == 7)//LY
+ //{
+ // model.Level = 2.5;
+ //}
+ // if (item.Index == 8)//Lub
+ // {
+ // model.Level = 1.5;
+ // }
+ // if (item.Index ==9)
+ // {
+ // model.Level = 4.99;
+ // }
+
+ //}
+ //////////////////////////////
}
}
}
@@ -454,6 +531,20 @@ namespace Tango.PPC.UI.ViewModels
RaisePropertyChanged(nameof(BlackOutput));
}
+ private void HideJobOutline()
+ {
+ IsDisplayJobOutline = false;
+ }
+
+ private void DisplayJobOutline()
+ {
+ if(_handler != null && _handler.JobTicket != null)
+ {
+ JobOutlineTicket = _handler.JobTicket;
+ IsDisplayJobOutline = true;
+ }
+ }
+
#endregion
}
}