From 9e42e1c87f3a206f0babc74760ac9a02d8d328f4 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Thu, 27 Dec 2018 15:14:10 +0200 Subject: Implemented Deployment Slots! Implemented Environment AD Groups. Implemented Machine Studio environment selection. --- .../Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs index 730027a67..edae820e7 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs @@ -46,6 +46,9 @@ namespace Tango.MachineStudio.UI.ViewModels } private String _password; + /// + /// Gets or sets the password. + /// [Required(ErrorMessage = "Password is required")] public String Password { @@ -53,6 +56,16 @@ namespace Tango.MachineStudio.UI.ViewModels set { _password = value; RaisePropertyChangedAuto(); } } + private DeploymentSlots _deploymentSlot; + /// + /// Gets or sets the deployment slot. + /// + public DeploymentSlots DeploymentSlot + { + get { return _deploymentSlot; } + set { _deploymentSlot = value; RaisePropertyChangedAuto(); } + } + private bool _isLogging; /// /// Gets or sets a value indicating whether this instance is logging. @@ -96,6 +109,7 @@ namespace Tango.MachineStudio.UI.ViewModels cryptographer = new Rfc2898Cryptographer(); Email = _settings.LastLoginEmail; + DeploymentSlot = _settings.DeploymentSlot; RememberMe = _settings.RememberMe; try @@ -122,14 +136,16 @@ namespace Tango.MachineStudio.UI.ViewModels await Task.Factory.StartNew(() => { + _settings.DeploymentSlot = DeploymentSlot; + _authenticationProvider.Login(Email, Password); _eventLogger.Log(EventTypes.ApplicationStarted, "Application Started!"); _navigationManager.NavigateTo(NavigationView.MainView); + _settings.LastLoginEmail = Email; _settings.RememberMe = RememberMe; - _settings.LastLoginPassword = RememberMe ? cryptographer.Encrypt(Password) : null; _settings.Save(); -- cgit v1.3.1