public CollectionExplorerViewModel(
            IEventAggregator eventAggregator,
            IApplicationInteraction applicationInteraction,
            IDatabaseInteractions databaseInteractions,
            IDocumentPreview documentPreview)
        {
            _eventAggregator        = eventAggregator;
            _applicationInteraction = applicationInteraction;
            _databaseInteractions   = databaseInteractions;

            DocumentPreview = documentPreview;

            SplitOrientation    = Properties.Settings.Default.CollectionExplorer_SplitOrientation;
            ShowDocumentPreview = Properties.Settings.Default.CollectionExplorer_ShowPreview;
            ContentMaxLength    = Properties.Settings.Default.CollectionExplorer_ContentMaxLength;
            DoubleClickAction   = Properties.Settings.Default.CollectionExplorer_DoubleClickAction;

            FindTextModel = new FindTextModel();

            ItemDoubleClickCommand = new RelayCommand <DocumentReference>(OnItemDoubleClick);

            AddDocumentCommand       = new RelayCommand(async _ => await AddDocument(), o => CanAddDocument());
            EditDocumentCommand      = new RelayCommand(async _ => await EditDocument(), o => CanEditDocument());
            RemoveDocumentCommand    = new RelayCommand(async _ => await RemoveDocument(), o => CanRemoveDocument());
            ExportDocumentCommand    = new RelayCommand(async _ => await ExportDocument(), o => CanExportDocument());
            CopyDocumentCommand      = new RelayCommand(async _ => await CopyDocument(), o => CanCopyDocument());
            PasteDocumentCommand     = new RelayCommand(async _ => await PasteDocument(), o => CanPasteDocument());
            RefreshCollectionCommand = new RelayCommand(_ => RefreshCollection(), o => CanRefreshCollection());
            EditDbPropertiesCommand  = new RelayCommand(_ => EditDbProperties(), o => CanEditDbProperties());
            FindCommand         = new RelayCommand(_ => OpenFind(), o => CanOpenFind());
            FindNextCommand     = new RelayCommand(_ => Find(), o => CanFind());
            FindPreviousCommand = new RelayCommand(_ => FindPrevious(), o => CanFind());
        }
Example #2
0
        public CollectionExplorerViewModel(
            IEventAggregator eventAggregator,
            IViewInteractionResolver viewInteractionResolver,
            IDatabaseInteractions databaseInteractions,
            IDocumentPreview documentPreview)
        {
            _eventAggregator         = eventAggregator;
            _viewInteractionResolver = viewInteractionResolver;
            _databaseInteractions    = databaseInteractions;

            DocumentPreview = documentPreview;
        }
Example #3
0
        public CollectionExplorerViewModel(
            IEventAggregator eventAggregator,
            IViewInteractionResolver viewInteractionResolver,
            IDatabaseInteractions databaseInteractions,
            IDocumentPreview documentPreview)
        {
            _eventAggregator         = eventAggregator;
            _viewInteractionResolver = viewInteractionResolver;
            _databaseInteractions    = databaseInteractions;

            DocumentPreview = documentPreview;

            SplitOrientation    = Properties.Settings.Default.CollectionExplorer_SplitOrientation;
            ShowDocumentPreview = Properties.Settings.Default.CollectionExplorer_ShowPreview;
            ContentMaxLength    = Properties.Settings.Default.CollectionExplorer_ContentMaxLength;
            DoubleClickAction   = Properties.Settings.Default.CollectionExplorer_DoubleClickAction;

            ItemDoubleClickCommand = new RelayCommand <DocumentReference>(OnItemDoubleClick);
        }