aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels
diff options
context:
space:
mode:
authorRoy <roy.mail.net@gmail.com>2018-04-21 19:49:05 +0300
committerRoy <roy.mail.net@gmail.com>2018-04-21 19:49:05 +0300
commit0dec8a74239cff769836cae577fbd84824070e83 (patch)
treed6cc24ee53454b3f17f1580e90de38238555b6bd /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels
parent4df1724226c0d0941b970dbe71b1476e3c3e9902 (diff)
downloadTango-0dec8a74239cff769836cae577fbd84824070e83.tar.gz
Tango-0dec8a74239cff769836cae577fbd84824070e83.zip
Implemented NavigationControl for better performance!!!
Redesign of machine studio module initialization.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/ApplicationLogsViewVM.cs9
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Logging/ViewModels/EmbeddedLogsViewVM.cs9
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;