コード例 #1
0
        public static void UpdateCommandInfo(this ICommandInfoService commandInfoService, string commandName, Action <ICommandInfo> commandInfoUpdateCallback)
        {
            Argument.IsNotNull(() => commandInfoService);
            Argument.IsNotNull(() => commandName);
            Argument.IsNotNull(() => commandInfoUpdateCallback);

            var commandInfo = commandInfoService.GetCommandInfo(commandName);

            commandInfoUpdateCallback(commandInfo);
        }
コード例 #2
0
        public KeyboardMappingsOverviewViewModel(ICommandManager commandManager, ICommandInfoService commandInfoService, IUIVisualizerService uiVisualizerService,
            ILanguageService languageService, IViewExportService viewExportService, IKeyboardMappingsService keyboardMappingsService)
        {
            Argument.IsNotNull(() => commandManager);
            Argument.IsNotNull(() => commandInfoService);
            Argument.IsNotNull(() => uiVisualizerService);
            Argument.IsNotNull(() => languageService);
            Argument.IsNotNull(() => viewExportService);
            Argument.IsNotNull(() => keyboardMappingsService);

            _commandManager = commandManager;
            _commandInfoService = commandInfoService;
            _uiVisualizerService = uiVisualizerService;
            _languageService = languageService;
            _viewExportService = viewExportService;
            _keyboardMappingsService = keyboardMappingsService;

            Print = new Command(OnPrintExecute);
            Customize = new TaskCommand(OnCustomizeExecuteAsync);
        }
コード例 #3
0
        public KeyboardMappingsOverviewViewModel(ICommandManager commandManager, ICommandInfoService commandInfoService, IUIVisualizerService uiVisualizerService,
                                                 ILanguageService languageService, IViewExportService viewExportService, IKeyboardMappingsService keyboardMappingsService)
        {
            Argument.IsNotNull(() => commandManager);
            Argument.IsNotNull(() => commandInfoService);
            Argument.IsNotNull(() => uiVisualizerService);
            Argument.IsNotNull(() => languageService);
            Argument.IsNotNull(() => viewExportService);
            Argument.IsNotNull(() => keyboardMappingsService);

            _commandManager          = commandManager;
            _commandInfoService      = commandInfoService;
            _uiVisualizerService     = uiVisualizerService;
            _languageService         = languageService;
            _viewExportService       = viewExportService;
            _keyboardMappingsService = keyboardMappingsService;

            Print     = new Command(OnPrintExecute);
            Customize = new TaskCommand(OnCustomizeExecuteAsync);
        }
コード例 #4
0
        public KeyboardMappingsCustomizationViewModel(IKeyboardMappingsService keyboardMappingsService, ICommandManager commandManager,
            ICommandInfoService commandInfoService, ILanguageService languageService, IMessageService messageService)
        {
            Argument.IsNotNull(() => keyboardMappingsService);
            Argument.IsNotNull(() => commandManager);
            Argument.IsNotNull(() => commandInfoService);
            Argument.IsNotNull(() => languageService);
            Argument.IsNotNull(() => messageService);

            _keyboardMappingsService = keyboardMappingsService;
            _commandManager = commandManager;
            _commandInfoService = commandInfoService;
            _languageService = languageService;
            _messageService = messageService;

            Commands = new FastObservableCollection<ICommandInfo>();
            CommandFilter = string.Empty;
            SelectedCommand = string.Empty;

            Reset = new TaskCommand(OnResetExecuteAsync);
            Remove = new Command(OnRemoveExecute, OnRemoveCanExecute);
            Assign = new TaskCommand(OnAssignExecuteAsync, OnAssignCanExecute);
        }
コード例 #5
0
        public KeyboardMappingsCustomizationViewModel(IKeyboardMappingsService keyboardMappingsService, ICommandManager commandManager,
                                                      ICommandInfoService commandInfoService, ILanguageService languageService, IMessageService messageService)
        {
            Argument.IsNotNull(() => keyboardMappingsService);
            Argument.IsNotNull(() => commandManager);
            Argument.IsNotNull(() => commandInfoService);
            Argument.IsNotNull(() => languageService);
            Argument.IsNotNull(() => messageService);

            _keyboardMappingsService = keyboardMappingsService;
            _commandManager          = commandManager;
            _commandInfoService      = commandInfoService;
            _languageService         = languageService;
            _messageService          = messageService;

            Commands        = new FastObservableCollection <ICommandInfo>();
            CommandFilter   = string.Empty;
            SelectedCommand = string.Empty;

            Reset  = new TaskCommand(OnResetExecuteAsync);
            Remove = new Command(OnRemoveExecute, OnRemoveCanExecute);
            Assign = new TaskCommand(OnAssignExecuteAsync, OnAssignCanExecute);
        }