diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-04 14:11:29 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-04 14:11:29 +0200 |
| commit | 5513ba4c2db05de40d9adfac645d7e77c35c71f7 (patch) | |
| tree | 0088cfa3a3a76692a37f65a4724a5429ca51ed2d /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels | |
| parent | 13f168081666328ac648c230ae0cdd4adf4fd133 (diff) | |
| download | Tango-5513ba4c2db05de40d9adfac645d7e77c35c71f7.tar.gz Tango-5513ba4c2db05de40d9adfac645d7e77c35c71f7.zip | |
Worked on PPC setup & update.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs index 5598362be..281e54958 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs @@ -74,10 +74,12 @@ namespace Tango.PPC.UI.ViewModels { using (ObservablesContext db = ObservablesContext.CreateDefault()) { - if (db.Users.Count() == 1) + var machine = await db.Machines.FirstAsync(); + + if (db.Users.Count() == 1 || machine.AutoLogin) { var user = await db.Users.FirstAsync(); - LogManager.Log($"Application started. Single user detected ({user.Email}). Skipping LoginView..."); + LogManager.Log($"Application started. Single user/Auto login detected ({user.Email}). Skipping LoginView..."); await AuthenticationProvider.Login(user.Email, user.Password, false); IsLoading = false; } |
