From 956f9ea033553136ebf199fff30f288dc26fbeb0 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 21 Feb 2018 20:21:57 +0200 Subject: Working on machine studio update center.. --- .../ViewModels/MainViewVM.cs | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs') 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 /// public RelayCommand SignoutCommand { get; set; } + /// + /// Gets or sets the exit command. + /// + public RelayCommand ExitCommand { get; set; } + + /// + /// Gets or sets the update center command. + /// + public RelayCommand UpdateCenterCommand { get; set; } + private IAuthenticationProvider _authenticationProvider; /// /// 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(OpenModuleInWindow); + ExitCommand = new RelayCommand(ExitApplication); + UpdateCenterCommand = new RelayCommand(NavigateToUpdateCenter); } /// @@ -315,6 +327,10 @@ namespace Tango.MachineStudio.UI.ViewModels base.OnViewAttached(); } + /// + /// Opens the module in a new window. + /// + /// The module. 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); } } + + /// + /// Navigates to update center. + /// + private void NavigateToUpdateCenter() + { + _navigation.NavigateTo(NavigationView.UpdateView); + } + + /// + /// Exits the application. + /// + private void ExitApplication() + { + _applicationManager.ShutDown(); + } } } -- cgit v1.3.1