diff options
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs index fabb57d10..3cbb44bbe 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs @@ -53,6 +53,17 @@ namespace Tango.PPC.Jobs.ViewModels } } + private bool _isLoadingJobs; + /// <summary> + /// Gets or sets a value indicating whether this instance is loading jobs. + /// </summary> + public bool IsLoadingJobs + { + get { return _isLoadingJobs; } + set { _isLoadingJobs = value; RaisePropertyChangedAuto(); } + } + + #endregion #region Commands @@ -139,6 +150,8 @@ namespace Tango.PPC.Jobs.ViewModels { Task.Factory.StartNew(() => { + IsLoadingJobs = true; + Thread.Sleep(500); if (_jobsContext != null) @@ -151,6 +164,8 @@ namespace Tango.PPC.Jobs.ViewModels Jobs = _jobsContext.Jobs.Where(x => x.Machine.SerialNumber == Settings.MachineSerialNumber).ToObservableCollection(); JobsCollectionView = CollectionViewSource.GetDefaultView(Jobs); JobsCollectionView.SortDescriptions.Add(new SortDescription(nameof(Job.LastUpdated), ListSortDirection.Descending)); + + IsLoadingJobs = false; }); } |
