public ClipboardOperationsViewModel(
        IClipboardOperationsService clipboardOperationsService,
        INodesSelectionService nodesSelectionService,
        IDirectoryService directoryService)
    {
        _clipboardOperationsService = clipboardOperationsService;
        _nodesSelectionService      = nodesSelectionService;
        _directoryService           = directoryService;

        CopyToClipboardCommand    = ReactiveCommand.CreateFromTask(CopyToClipboardAsync);
        PasteFromClipboardCommand = ReactiveCommand.CreateFromTask(PasteFromClipboardAsync);
    }
Exemplo n.º 2
0
        public OperationsViewModel(
            IFilesOperationsMediator filesOperationsMediator,
            IOperationsService operationsService,
            INodesSelectionService nodesSelectionService,
            IDialogService dialogService,
            IDirectoryService directoryService,
            ITrashCanService trashCanService)
        {
            _filesOperationsMediator = filesOperationsMediator;
            _operationsService       = operationsService;
            _nodesSelectionService   = nodesSelectionService;
            _dialogService           = dialogService;
            _directoryService        = directoryService;
            _trashCanService         = trashCanService;

            OpenCommand = ReactiveCommand.Create(Open);
            OpenInDefaultEditorCommand = ReactiveCommand.Create(OpenInDefaultEditor);
            CopyCommand = ReactiveCommand.Create(Copy);
            MoveCommand = ReactiveCommand.Create(Move);
            CreateNewDirectoryCommand = ReactiveCommand.CreateFromTask(CreateNewDirectoryAsync);
            RemoveCommand             = ReactiveCommand.CreateFromTask(RemoveAsync);
            MoveToTrashCommand        = ReactiveCommand.CreateFromTask(MoveToTrashAsync);
        }
Exemplo n.º 3
0
        public TopOperationsViewModel(
            ITerminalService terminalService,
            IDirectoryService directoryService,
            IFilesOperationsMediator filesOperationsMediator,
            IDialogService dialogService,
            IPathService pathService,
            IArchiveService archiveService,
            INodesSelectionService nodesSelectionService,
            ISystemDialogService systemDialogService)
        {
            _terminalService         = terminalService;
            _directoryService        = directoryService;
            _filesOperationsMediator = filesOperationsMediator;
            _dialogService           = dialogService;
            _pathService             = pathService;
            _archiveService          = archiveService;
            _nodesSelectionService   = nodesSelectionService;
            _systemDialogService     = systemDialogService;

            PackCommand         = ReactiveCommand.CreateFromTask(PackAsync);
            ExtractCommand      = ReactiveCommand.Create(ExtractAsync);
            SearchCommand       = ReactiveCommand.Create(Search);
            OpenTerminalCommand = ReactiveCommand.Create(OpenTerminal);
        }
 public NodesSelectionServiceTests()
 {
     _nodesSelectionService = new NodesSelectionService();
 }