Esempio n. 1
0
        public LibraryModel(string pathToLibrary, CollectionSettings collectionSettings,
                            //SendReceiver sendReceiver,
                            BookSelection bookSelection,
                            SourceCollectionsList sourceCollectionsList,
                            BookCollection.Factory bookCollectionFactory,
                            EditBookCommand editBookCommand,
                            CreateFromSourceBookCommand createFromSourceBookCommand,
                            BookServer bookServer,
                            CurrentEditableCollectionSelection currentEditableCollectionSelection,
                            BookThumbNailer thumbNailer,
                            TeamCollectionManager tcManager)
        {
            _bookSelection      = bookSelection;
            _pathToLibrary      = pathToLibrary;
            _collectionSettings = collectionSettings;
            //_sendReceiver = sendReceiver;
            _sourceCollectionsList = sourceCollectionsList;
            _bookCollectionFactory = bookCollectionFactory;
            _editBookCommand       = editBookCommand;
            _bookServer            = bookServer;
            _currentEditableCollectionSelection = currentEditableCollectionSelection;
            _thumbNailer = thumbNailer;
            _tcManager   = tcManager;

            createFromSourceBookCommand.Subscribe(CreateFromSourceBook);
        }
Esempio n. 2
0
        public CollectionModel(string pathToCollection, CollectionSettings collectionSettings,
                               BookSelection bookSelection,
                               SourceCollectionsList sourceCollectionsList,
                               BookCollection.Factory bookCollectionFactory,
                               EditBookCommand editBookCommand,
                               CreateFromSourceBookCommand createFromSourceBookCommand,
                               BookServer bookServer,
                               CurrentEditableCollectionSelection currentEditableCollectionSelection,
                               BookThumbNailer thumbNailer,
                               TeamCollectionManager tcManager,
                               BloomWebSocketServer webSocketServer,
                               BookCollectionHolder bookCollectionHolder,
                               LocalizationChangedEvent localizationChangedEvent)
        {
            _bookSelection         = bookSelection;
            _pathToCollection      = pathToCollection;
            _collectionSettings    = collectionSettings;
            _sourceCollectionsList = sourceCollectionsList;
            _bookCollectionFactory = bookCollectionFactory;
            _editBookCommand       = editBookCommand;
            _bookServer            = bookServer;
            _currentEditableCollectionSelection = currentEditableCollectionSelection;
            _thumbNailer              = thumbNailer;
            _tcManager                = tcManager;
            _webSocketServer          = webSocketServer;
            _bookCollectionHolder     = bookCollectionHolder;
            _localizationChangedEvent = localizationChangedEvent;

            createFromSourceBookCommand.Subscribe(CreateFromSourceBook);
        }
Esempio n. 3
0
 public BloomServer(CollectionSettings collectionSettings, BookCollection booksInProjectLibrary,
                    SourceCollectionsList sourceCollectionsesList, BookThumbNailer thumbNailer)
     : base(new RuntimeImageProcessor(new BookRenamedEvent()), thumbNailer)
 {
     _collectionSettings      = collectionSettings;
     _booksInProjectLibrary   = booksInProjectLibrary;
     _sourceCollectionsesList = sourceCollectionsesList;
 }
Esempio n. 4
0
        public BloomServer(CollectionSettings collectionSettings, BookCollection booksInProjectLibrary,
						   SourceCollectionsList sourceCollectionsesList, HtmlThumbNailer thumbNailer)
        {
            _collectionSettings = collectionSettings;
            _booksInProjectLibrary = booksInProjectLibrary;
            _sourceCollectionsesList = sourceCollectionsesList;
            _thumbNailer = thumbNailer;
        }
Esempio n. 5
0
        public BloomServer(CollectionSettings collectionSettings, BookCollection booksInProjectLibrary,
						   SourceCollectionsList sourceCollectionsesList, BookThumbNailer thumbNailer)
            : base(new RuntimeImageProcessor(new BookRenamedEvent()), thumbNailer)
        {
            _collectionSettings = collectionSettings;
            _booksInProjectLibrary = booksInProjectLibrary;
            _sourceCollectionsesList = sourceCollectionsesList;
        }
Esempio n. 6
0
 public BloomServer(CollectionSettings collectionSettings, BookCollection booksInProjectLibrary,
                    SourceCollectionsList sourceCollectionsesList, HtmlThumbNailer thumbNailer)
 {
     _collectionSettings      = collectionSettings;
     _booksInProjectLibrary   = booksInProjectLibrary;
     _sourceCollectionsesList = sourceCollectionsesList;
     _thumbNailer             = thumbNailer;
 }
Esempio n. 7
0
 public BloomServer(CollectionSettings collectionSettings, BookCollection booksInProjectLibrary,
                    SourceCollectionsList sourceCollectionsesList, HtmlThumbNailer thumbNailer)
     : base(new LowResImageCache(new BookRenamedEvent()))
 {
     _collectionSettings      = collectionSettings;
     _booksInProjectLibrary   = booksInProjectLibrary;
     _sourceCollectionsesList = sourceCollectionsesList;
     _thumbNailer             = thumbNailer;
 }
Esempio n. 8
0
 public WorkspaceModel(BookSelection bookSelection, string directoryPath, TeamCollectionManager tcManager, CollectionSettings collectionSettings,
                       SourceCollectionsList sourceCollectionsList)
 {
     _bookSelection                   = bookSelection;
     _directoryPath                   = directoryPath;
     _tcManager                       = tcManager;
     _collectionSettings              = collectionSettings;
     _bookSelection.SelectionChanged += OnSelectionChanged;
     _sourceCollectionsList           = sourceCollectionsList;
 }
Esempio n. 9
0
 public AddOrChangePageApi(TemplateInsertionCommand templateInsertionCommand,
                           PageRefreshEvent pageRefreshEvent,
                           PageSelection pageSelection,
                           SourceCollectionsList sourceCollectionsList)
 {
     _templateInsertionCommand = templateInsertionCommand;
     _pageRefreshEvent         = pageRefreshEvent;
     _pageSelection            = pageSelection;
     _sourceCollectionsList    = sourceCollectionsList;
 }
        public AddOrChangePageApi(	TemplateInsertionCommand templateInsertionCommand,
									PageRefreshEvent pageRefreshEvent,
									PageSelection pageSelection,
									SourceCollectionsList sourceCollectionsList)
        {
            _templateInsertionCommand = templateInsertionCommand;
            _pageRefreshEvent = pageRefreshEvent;
            _pageSelection = pageSelection;
            _sourceCollectionsList = sourceCollectionsList;
        }
Esempio n. 11
0
        public static bool ForPageLayout = false;         // set when most recent relevant command is ShowChangeLayoutDialog

        public PageTemplatesApi(SourceCollectionsList sourceCollectionsList, BookSelection bookSelection,
                                PageSelection pageSelection, TemplateInsertionCommand templateInsertionCommand,
                                BookThumbNailer thumbNailer, Book.Book.Factory bookFactory, BookStorage.Factory storageFactory)
        {
            _sourceCollectionsList    = sourceCollectionsList;
            _bookSelection            = bookSelection;
            _pageSelection            = pageSelection;
            _templateInsertionCommand = templateInsertionCommand;
            _thumbNailer    = thumbNailer;
            _bookFactory    = bookFactory;
            _storageFactory = storageFactory;
        }
Esempio n. 12
0
        public PageTemplatesApi(SourceCollectionsList  sourceCollectionsList,BookSelection bookSelection,
			PageSelection pageSelection, TemplateInsertionCommand templateInsertionCommand,
			BookThumbNailer thumbNailer, Book.Book.Factory bookFactory, BookStorage.Factory storageFactory)
        {
            _sourceCollectionsList = sourceCollectionsList;
            _bookSelection = bookSelection;
            _pageSelection = pageSelection;
            _templateInsertionCommand = templateInsertionCommand;
            _thumbNailer = thumbNailer;
            _bookFactory = bookFactory;
            _storageFactory = storageFactory;
        }
Esempio n. 13
0
        public TestBook(string testName, string content)
        {
            _folder    = new TemporaryFolder(testName);
            BookFolder = _folder.FolderPath;
            BookPath   = Path.Combine(_folder.FolderPath, testName + ".htm");
            File.WriteAllText(BookPath, content);
            var settings    = CreateDefaultCollectionsSettings();
            var codeBaseDir = BloomFileLocator.GetCodeBaseFolder();
            // This is minimal...if the content doesn't specify xmatter Bloom defaults to Traditional
            // and needs the file locator to know this folder so it can find it.
            // May later need to include more folders or allow the individual tests to do so.
            var locator = new FileLocator(new string[] { codeBaseDir + "/../browser/templates/xMatter" });
            var storage = new BookStorage(BookFolder, locator, new BookRenamedEvent(), settings);
            // very minimal...enhance if we need to test something that can really find source collections.
            var templatefinder = new SourceCollectionsList();

            Book = new Bloom.Book.Book(new BookInfo(BookFolder, true), storage, templatefinder, settings, new PageSelection(), new PageListChangedEvent(), new BookRefreshEvent());
        }
Esempio n. 14
0
        public LibraryModel(string pathToLibrary, CollectionSettings collectionSettings,
			SendReceiver sendReceiver,
			BookSelection bookSelection,
			SourceCollectionsList sourceCollectionsList,
			BookCollection.Factory bookCollectionFactory,
			EditBookCommand editBookCommand,
			CreateFromSourceBookCommand createFromSourceBookCommand,
			BookServer bookServer,
			CurrentEditableCollectionSelection currentEditableCollectionSelection)
        {
            _bookSelection = bookSelection;
            _pathToLibrary = pathToLibrary;
            _collectionSettings = collectionSettings;
            _sendReceiver = sendReceiver;
            _sourceCollectionsList = sourceCollectionsList;
            _bookCollectionFactory = bookCollectionFactory;
            _editBookCommand = editBookCommand;
            _bookServer = bookServer;
            _currentEditableCollectionSelection = currentEditableCollectionSelection;

            createFromSourceBookCommand.Subscribe(CreateFromSourceBook);
        }