diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-07-15 14:16:26 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-07-15 14:16:26 +0300 |
| commit | de5700549a5fe01862f71d452f2abe4a74996605 (patch) | |
| tree | d64cd490c7012ea96299ea891d5d7013a822e347 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels | |
| parent | c6b01f3e683b83fb0d6bf080efbd24a9a732b9f5 (diff) | |
| download | Tango-de5700549a5fe01862f71d452f2abe4a74996605.tar.gz Tango-de5700549a5fe01862f71d452f2abe4a74996605.zip | |
Implemented PPC twine animated gif.
Sign out.
Implemented TangoInject attribute 'When Available' mode!
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs | 15 | ||||
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs | 8 |
2 files changed, 23 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs index 062ade9cf..268f42ce9 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs @@ -74,6 +74,11 @@ namespace Tango.PPC.UI.ViewModels public RelayCommand StopPrintingCommand { get; set; } /// <summary> + /// Gets or sets the sign-out command. + /// </summary> + public RelayCommand SignOutCommand { get; set; } + + /// <summary> /// Initializes a new instance of the <see cref="LayoutViewVM"/> class. /// </summary> public LayoutViewVM() @@ -84,6 +89,7 @@ namespace Tango.PPC.UI.ViewModels NotificationsAreaPressedCommand = new RelayCommand(OpenFirstNotificationOrDisplayAll); StopPrintingCommand = new RelayCommand(StopPrinting); + SignOutCommand = new RelayCommand(SignOut); } private void StopPrinting() @@ -162,6 +168,15 @@ namespace Tango.PPC.UI.ViewModels } /// <summary> + /// Represents an event that is raised when the sign-out operation is complete. + /// </summary> + private void SignOut() + { + AuthenticationProvider.LogOut(); + IsMenuOpened = false; + } + + /// <summary> /// Opens the first notification or display all. /// </summary> private void OpenFirstNotificationOrDisplayAll() diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs index dd54873ce..022efd9b8 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs @@ -54,7 +54,15 @@ namespace Tango.PPC.UI.ViewModels public override void OnApplicationStarted() { + AuthenticationProvider.CurrentUserChanged += AuthenticationProvider_CurrentUserChanged; + } + private void AuthenticationProvider_CurrentUserChanged(object sender, BL.Entities.User user) + { + if (user == null) + { + Password = String.Empty; + } } private void Login() |
