public MainMenuViewModel(CloseCommand closeCommand, AddingCodesNavigateCommand addingCodesNavigationCommand, IGLobalNavigateCommand globalCommand, IEventAggregator _eventAggregator) { eventAggregator = _eventAggregator; this.closeCommand = closeCommand; globalNavigateCommand = globalCommand; this.addingCodesNavigationCommand = addingCodesNavigationCommand; eventAggregator.GetEvent <UpdatedEvent>().Subscribe(a => authorizationLevel = a.AuthorizationLevel == "Admin", ThreadOption.PublisherThread, true); conditionalCommand = new DelegateCommand(() => { }).ObservesCanExecute(() => authorizationLevel); addingCodesNavigationCommand.addingCodesNavigateCommand.RegisterCommand(conditionalCommand); }
public EditUsrMenuViewModel(GlobalNavigateCommand globalNavigateCommand) { this.globalNavigateCommand = globalNavigateCommand; }
public CodesAddingMenuViewModel(GlobalNavigateCommand globalNavigateCommand) { this.globalNavigateCommand = globalNavigateCommand; }
public MainWindowViewModel(IRegionManager _regionManager, IApplicationCommands appCommand, IGLobalNavigateCommand globalCommand, AddingCodesNavigateCommand addingCodesNavigateCommand) { regionManager = _regionManager; applicationCommand = appCommand; navigateCommand = new DelegateCommand <string>(navigate); appCommand.fillDataAndNavigateCommand.RegisterCommand(navigateCommand); this.globalNavigateCommand = globalCommand; globalNavigateCommand.globalNavigateCommand.RegisterCommand(navigateCommand); addingCodesNavigateCommand.addingCodesNavigateCommand.RegisterCommand(navigateCommand); }