aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs18
1 files changed, 17 insertions, 1 deletions
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;
+ /// <summary>
+ /// Gets or sets the password.
+ /// </summary>
[Required(ErrorMessage = "Password is required")]
public String Password
{
@@ -53,6 +56,16 @@ namespace Tango.MachineStudio.UI.ViewModels
set { _password = value; RaisePropertyChangedAuto(); }
}
+ private DeploymentSlots _deploymentSlot;
+ /// <summary>
+ /// Gets or sets the deployment slot.
+ /// </summary>
+ public DeploymentSlots DeploymentSlot
+ {
+ get { return _deploymentSlot; }
+ set { _deploymentSlot = value; RaisePropertyChangedAuto(); }
+ }
+
private bool _isLogging;
/// <summary>
/// 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();