aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-12-18 09:02:04 +0200
committerShlomo Hecht <shlomo@twine-s.com>2019-12-18 09:02:04 +0200
commita61a911d1ebde107ba7bf210af7e753e692d93e2 (patch)
tree95355ea06f74b4a6a685e7fd2b1510b9d72c3d51 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels
parent1b92f30f6dfa27392ffd8460ebeb17c17550db7b (diff)
parent615bc666c8d0618d93bc4401a74928535c2cc7f6 (diff)
downloadTango-a61a911d1ebde107ba7bf210af7e753e692d93e2.tar.gz
Tango-a61a911d1ebde107ba7bf210af7e753e692d93e2.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MachineUpdatesViewVM.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MachineUpdatesViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MachineUpdatesViewVM.cs
index c1f87b3bb..e1e9ee561 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MachineUpdatesViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.MachineDesigner/ViewModels/MachineUpdatesViewVM.cs
@@ -19,6 +19,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
{
private INotificationProvider _notification;
private ObservablesContext _context;
+ private const int MAX_UPDATE_ITEMS = 100;
#region Properties
@@ -114,7 +115,7 @@ namespace Tango.MachineStudio.MachineDesigner.ViewModels
{
_context = context;
Machine = machine;
- Updates = (await new TangoUpdatesCollectionBuilder(context).Set(x => x.MachineGuid == machine.Guid).BuildAsync()).OrderByDescending(x => x.StartDate).ToList();
+ Updates = (await new TangoUpdatesCollectionBuilder(context).Set(x => x.MachineGuid == machine.Guid).Query(x => x.OrderByDescending(y => y.StartDate).Take(MAX_UPDATE_ITEMS)).BuildAsync()).ToList();
UpdatesView = CollectionViewSource.GetDefaultView(Updates);
UpdatesView.Filter = UpdatesFilter;
OnFilterChanged();