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);
 }
Пример #2
0
 public EditUsrMenuViewModel(GlobalNavigateCommand globalNavigateCommand)
 {
     this.globalNavigateCommand = globalNavigateCommand;
 }
Пример #3
0
 public CodesAddingMenuViewModel(GlobalNavigateCommand globalNavigateCommand)
 {
     this.globalNavigateCommand = globalNavigateCommand;
 }
Пример #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);
 }