Ejemplo n.º 1
0
 public MainViewModel(IFileSelectionService fileSelectionService,
                      IInteractionMediator interactionMediator, Func <Owned <IFileItemViewModel> > fileItemViewModelFactory)
 {
     m_fileSelectionService     = fileSelectionService;
     m_interactionMediator      = interactionMediator;
     m_fileItemViewModelFactory = fileItemViewModelFactory;
     OpenFileCommand            = new RelayCommand(OpenFileCommandImpl);
 }
        public PasswordManagerViewModel( IFileSelectionService fileSelectionService,
                                         IDialogService dialogService,
                                         IPasswordExchange passwordExchange,
                                         IStorageConfiguration storageConfiguration,
                                         Settings settings,
                                         PasswordListViewModel passwordList )
        {
            _passwordList = passwordList;
            _passwordExchange = passwordExchange;
            _storageConfiguration = storageConfiguration;
            _settings = settings;
            _fileSelectionService = fileSelectionService;
            _dialogService = dialogService;

            _selectInternalStorageCommand = new RelayCommand( ExecuteSelectInternalStorage );
            _selectExternalStorageCommand = new RelayCommand( ExecuteSelectExternalStorage );
            _toggleAlwaysShowLegacyPasswordTypes = new RelayCommand( ExecuteToggleAlwaysShowLegacyPasswordTypes );
            _quitCommand = new RelayCommand( ExecuteQuit );
            _importPasswordsCommand = new RelayCommand( ExecuteImportPasswords );
            _exportPasswordsCommand = new RelayCommand( ExecuteExportPasswords );

            Update( );
        }