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);
 }
Example #2
0
 public EditUsrMenuViewModel(GlobalNavigateCommand globalNavigateCommand)
 {
     this.globalNavigateCommand = globalNavigateCommand;
 }
Example #3
0
 public CodesAddingMenuViewModel(GlobalNavigateCommand globalNavigateCommand)
 {
     this.globalNavigateCommand = globalNavigateCommand;
 }
Example #4
0
 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);
 }