Esempio n. 1
0
        public MainViewModel(
            IDragDropService dragDropService,
            IBackupFileService backupFileService,
            IWindowService windowService,
            IFileOpenSaveService fileOpenSaveService,
            IDialogService dialogService)
        {
            _dragDropService     = dragDropService;
            _backupFileService   = backupFileService;
            _windowService       = windowService;
            _fileOpenSaveService = fileOpenSaveService;
            _dialogService       = dialogService;

            Files.CollectionChanged += FilesCollectionChanged;

            SetTitle();

            // subscriptions...
            Messenger.Default.Register <DragOverMessage>(this, OnDragOver);
            Messenger.Default.Register <DragDropMessage>(this, OnDragDrop);
            Messenger.Default.Register <MainWindowClosingMessage>(this, OnMainWindowClosing);
            Messenger.Default.Register <NotesRedactedMessage>(this, OnNotesRedacted);

            AddDesignTimeItems();

            InitCommands();

            GetVersionData();
        }
Esempio n. 2
0
        public DetailViewModel(
            IBackupFileService backupFileService,
            IFileOpenSaveService fileOpenSaveService,
            IDialogService dialogService,
            IRedactService redactService)
        {
            _backupFileService   = backupFileService;
            _fileOpenSaveService = fileOpenSaveService;
            _dialogService       = dialogService;
            _redactService       = redactService;

            ListItems = CreateListItems();

            ImportBibleNotesCommand = new RelayCommand(ImportBibleNotes);
            RedactNotesCommand      = new RelayCommand(RedactNotes);
            DeleteFavouritesCommand = new RelayCommand(DeleteFavourites);
        }
Esempio n. 3
0
        public DetailViewModel(
            IBackupFileService backupFileService,
            IFileOpenSaveService fileOpenSaveService,
            IDialogService dialogService,
            IRedactService redactService)
        {
            _backupFileService   = backupFileService;
            _fileOpenSaveService = fileOpenSaveService;
            _dialogService       = dialogService;
            _redactService       = redactService;

            ListItems = CreateListItems();

            ImportBibleNotesCommand = new RelayCommand(async() => await ImportBibleNotes().ConfigureAwait(true));
            RedactNotesCommand      = new RelayCommand(async() => await RedactNotes().ConfigureAwait(true));
            DeleteFavouritesCommand = new RelayCommand(async() => await DeleteFavourites().ConfigureAwait(true));
        }