/// <summary>
        /// Initializes a new instance of the <see cref="KeyboardMappingsOverviewViewModel" /> class.
        /// </summary>
        /// <param name="commandManager">The command manager.</param>
        /// <param name="uiVisualizerService">The UI visualizer service.</param>
        /// <param name="languageService">The language service.</param>
        /// <param name="viewExportService">The view export service.</param>
        /// <param name="keyboardMappingsService">The keyboard mappings service.</param>
        public KeyboardMappingsOverviewViewModel(ICommandManager commandManager, IUIVisualizerService uiVisualizerService,
            ILanguageService languageService, IViewExportService viewExportService, IKeyboardMappingsService keyboardMappingsService)
        {
            Argument.IsNotNull(() => commandManager);
            Argument.IsNotNull(() => uiVisualizerService);
            Argument.IsNotNull(() => languageService);
            Argument.IsNotNull(() => viewExportService);
            Argument.IsNotNull(() => keyboardMappingsService);

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

            Print = new Command(OnPrintExecute);
            Customize = new Command(OnCustomizeExecute);
        }
        public KeyboardMappingsCustomizationViewModel(IKeyboardMappingsService keyboardMappingsService, ICommandManager commandManager,
            ILanguageService languageService, IMessageService messageService)
        {
            Argument.IsNotNull(() => keyboardMappingsService);
            Argument.IsNotNull(() => commandManager);
            Argument.IsNotNull(() => languageService);
            Argument.IsNotNull(() => messageService);

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

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

            Reset = new Command(OnResetExecute);
            Remove = new Command(OnRemoveExecute, OnRemoveCanExecute);
            Assign = new Command(OnAssignExecute, OnAssignCanExecute);
        }
        public static Task LoadAsync(this IKeyboardMappingsService keyboardMappingsService)
        {
            Argument.IsNotNull(() => keyboardMappingsService);

            return(TaskHelper.Run(() => keyboardMappingsService.Load(), true));
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ShellService" /> class.
        /// </summary>
        /// <param name="typeFactory">The type factory.</param>
        /// <param name="commandManager">The command manager.</param>
        /// <param name="keyboardMappingsService">The keyboard mappings service.</param>
        /// <param name="splashScreenService"></param>
        /// <exception cref="ArgumentNullException">The <paramref name="typeFactory" /> is <c>null</c>.</exception>
        /// <exception cref="ArgumentNullException">The <paramref name="commandManager" /> is <c>null</c>.</exception>
        /// <exception cref="ArgumentNullException">The <paramref name="keyboardMappingsService" /> is <c>null</c>.</exception>
        /// <exception cref="ArgumentNullException">The <paramref name="splashScreenService" /> is <c>null</c>.</exception>
        public ShellService(ITypeFactory typeFactory, ICommandManager commandManager, IKeyboardMappingsService keyboardMappingsService,
                            ISplashScreenService splashScreenService)
        {
            Argument.IsNotNull("typeFactory", typeFactory);
            Argument.IsNotNull("commandManager", commandManager);
            Argument.IsNotNull("keyboardMappingsService", keyboardMappingsService);
            Argument.IsNotNull("splashScreenService", splashScreenService);

            _typeFactory             = typeFactory;
            _commandManager          = commandManager;
            _keyboardMappingsService = keyboardMappingsService;
            _splashScreenService     = splashScreenService;
        }