diff options
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs | 12 | ||||
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs | 91 |
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 } } |
