From 48071f784b19ea8ed2859fb03642b8cc856406b1 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 14 Jan 2018 15:49:39 +0200 Subject: Added code comments for: MachineStudio.UI --- .../ViewModels/LoginViewVM.cs | 25 ++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs') 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 6fe90fa99..c5936eea8 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs @@ -16,6 +16,10 @@ using Tango.SharedUI; namespace Tango.MachineStudio.UI.ViewModels { + /// + /// Represents the Machine Studio login view, view model. + /// + /// public class LoginViewVM : ViewModel { private IAuthenticationProvider _authenticationProvider; @@ -24,6 +28,9 @@ namespace Tango.MachineStudio.UI.ViewModels private Rfc2898Cryptographer cryptographer; private String _email; + /// + /// Gets or sets the email. + /// [Required(ErrorMessage = "Email is required")] [EmailAddress(ErrorMessage = "Please enter a valid email")] public String Email @@ -33,16 +40,26 @@ namespace Tango.MachineStudio.UI.ViewModels } private bool _rememberMe; - + /// + /// Gets or sets a value indicating whether to remember the last user email and password. + /// public bool RememberMe { get { return _rememberMe; } set { _rememberMe = value; RaisePropertyChangedAuto(); } } - + /// + /// Gets or sets the login command. + /// public RelayCommand LoginCommand { get; set; } + /// + /// Initializes a new instance of the class. + /// + /// The authentication provider. + /// The navigation manager. + /// The notification provider. public LoginViewVM(IAuthenticationProvider authenticationProvider, INavigationManager navigationManager, INotificationProvider notificationProvider) { _notificationProvider = notificationProvider; @@ -55,6 +72,10 @@ namespace Tango.MachineStudio.UI.ViewModels RememberMe = SettingsManager.Default.MachineStudio.RememberMe; } + /// + /// Logins the requested user. + /// + /// The password. private void Login(String password) { if (Validate()) -- cgit v1.3.1