1
0
Fork 0
Browse Source

change the default value for CurrentTime property in ViewModel.

I previously set CurrentTime to the current time on the system. I've changed it to 'Not Set' so dev's can identify any configuration errors. I've done this because I fell foul to that problem already. When I was initialising MainPageVM, I was using DateTime.Now as the default value and when initialising it in the View class (MainPage.xaml.cs). This confused me because I couldn't understand why the time wouldn't update when I change the code.

Basically, I was updating MainPageVM because the time displayed on the dashboard matched what I set it as in the ViewModel. But, the time was being changed in the View class (at run-time) with the DateTime.Now property.
stable 2021.5.3.0
Craig Oates 3 years ago
parent
commit
d4ecacf4f5
  1. 2
      src/EyesAndEars.UWP/EyesAndEars.UWP/ViewModels/MainPageVM.cs

2
src/EyesAndEars.UWP/EyesAndEars.UWP/ViewModels/MainPageVM.cs

@ -26,7 +26,7 @@ namespace EyesAndEars.UWP.ViewModels {
Device4 = g1;
Device5 = g2;
Device6 = g3;
CurrentTime = DateTime.Now.ToShortTimeString();
CurrentTime = "Not Set";
}
string _currentTime;