diff options
| author | Shlomo Hecht <shlomo@twine-s.com> | 2018-04-22 13:59:10 +0300 |
|---|---|---|
| committer | Shlomo Hecht <shlomo@twine-s.com> | 2018-04-22 13:59:10 +0300 |
| commit | 531c3aba8b49d38f53890c61aa3addef3b5c28dd (patch) | |
| tree | 0a913689a8968bcea2e174d90f0d423ffa3ccaca /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels | |
| parent | 540272c93c7d0b4a12ea797c996f2c9ddf2a5bbb (diff) | |
| parent | 24e4a3e25a9ac161097a46b59aee637fe7bdaa50 (diff) | |
| download | Tango-531c3aba8b49d38f53890c61aa3addef3b5c28dd.tar.gz Tango-531c3aba8b49d38f53890c61aa3addef3b5c28dd.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels')
2 files changed, 12 insertions, 6 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/ApplicationLogsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/ApplicationLogsViewVM.cs index d51607004..ffb16fed4 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/ApplicationLogsViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/ApplicationLogsViewVM.cs @@ -103,10 +103,13 @@ namespace Tango.MachineStudio.Logging.ViewModels IsRealTime = true; RealTimePaused = true; - SelectedDate = Dates.Last(); + SelectedDate = Dates.LastOrDefault(); - MinDate = Dates.Min(); - MaxDate = Dates.Max(); + if (Dates.Count > 0) + { + MinDate = Dates.Min(); + MaxDate = Dates.Max(); + } LogManager.NewLog += LogManager_NewLog; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EmbeddedLogsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EmbeddedLogsViewVM.cs index 126f61402..959d294c7 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EmbeddedLogsViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EmbeddedLogsViewVM.cs @@ -105,10 +105,13 @@ namespace Tango.MachineStudio.Logging.ViewModels IsRealTime = true; RealTimePaused = true; - SelectedDate = Dates.Last(); + SelectedDate = Dates.LastOrDefault(); - MinDate = Dates.Min(); - MaxDate = Dates.Max(); + if (Dates.Count > 0) + { + MinDate = Dates.Min(); + MaxDate = Dates.Max(); + } MachineOperator.EmbeddedLogManager.NewLog += EmbeddedLogManager_NewLog; |
