From 4f98c8a51a1572ad74bf46fce7090fd2182d5a3e Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 30 Apr 2019 17:48:03 +0300 Subject: Some improvements to PPC. --- .../PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'Software/Visual_Studio/PPC/Modules') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs index 0146f199b..643d6ab55 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/ViewModels/LoggingViewVM.cs @@ -90,16 +90,11 @@ namespace Tango.PPC.Technician.ViewModels { ApplicationLogs.Insert(0, log); - var now = DateTime.Now; - try { - foreach (var l in ApplicationLogs.ToList()) + if (ApplicationLogs.Count > 100) { - if (l.TimeStamp.Date < DateTime.Now.Date) - { - ApplicationLogs.Remove(l); - } + ApplicationLogs.Remove(ApplicationLogs.Last()); } } catch -- cgit v1.3.1