diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-21 20:21:57 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-02-21 20:21:57 +0200 |
| commit | 956f9ea033553136ebf199fff30f288dc26fbeb0 (patch) | |
| tree | 3780e906d8d4f12c5be3836e1704d93d8d4966bd /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs | |
| parent | 808ce20dbd74862a75499ee0d4e87247ee4479b4 (diff) | |
| download | Tango-956f9ea033553136ebf199fff30f288dc26fbeb0.tar.gz Tango-956f9ea033553136ebf199fff30f288dc26fbeb0.zip | |
Working on machine studio update center..
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs index da73e8eae..acd9e7925 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs @@ -99,6 +99,16 @@ namespace Tango.MachineStudio.UI.ViewModels /// </summary> public RelayCommand SignoutCommand { get; set; } + /// <summary> + /// Gets or sets the exit command. + /// </summary> + public RelayCommand ExitCommand { get; set; } + + /// <summary> + /// Gets or sets the update center command. + /// </summary> + public RelayCommand UpdateCenterCommand { get; set; } + private IAuthenticationProvider _authenticationProvider; /// <summary> /// Gets or sets the authentication provider. @@ -169,6 +179,8 @@ namespace Tango.MachineStudio.UI.ViewModels SignoutCommand = new RelayCommand(SignOut); DisconnectCommand = new RelayCommand(DisconnectFromMachine, (x) => ApplicationManager.IsMachineConnected && !_isDisconnecting); OpenModuleInWindowCommand = new RelayCommand<IStudioModule>(OpenModuleInWindow); + ExitCommand = new RelayCommand(ExitApplication); + UpdateCenterCommand = new RelayCommand(NavigateToUpdateCenter); } /// <summary> @@ -315,6 +327,10 @@ namespace Tango.MachineStudio.UI.ViewModels base.OnViewAttached(); } + /// <summary> + /// Opens the module in a new window. + /// </summary> + /// <param name="module">The module.</param> private void OpenModuleInWindow(IStudioModule module) { if (module == null) return; @@ -351,5 +367,21 @@ namespace Tango.MachineStudio.UI.ViewModels _notificationProvider.ShowError("Error popping out module " + module.Name); } } + + /// <summary> + /// Navigates to update center. + /// </summary> + private void NavigateToUpdateCenter() + { + _navigation.NavigateTo(NavigationView.UpdateView); + } + + /// <summary> + /// Exits the application. + /// </summary> + private void ExitApplication() + { + _applicationManager.ShutDown(); + } } } |
