Пример #1
0
 public BookTransfer(BloomParseClient bloomParseClient, BloomS3Client bloomS3Client, BookThumbNailer htmlThumbnailer, BookDownloadStartingEvent bookDownloadStartingEvent)
 {
     this._parseClient = bloomParseClient;
     this._s3Client = bloomS3Client;
     _thumbnailer = htmlThumbnailer;
     _bookDownloadStartingEvent = bookDownloadStartingEvent;
 }
Пример #2
0
 public BookTransfer(BloomParseClient bloomParseClient, BloomS3Client bloomS3Client, HtmlThumbNailer htmlThumbnailer, BookDownloadStartingEvent bookDownloadStartingEvent)
 {
     this._parseClient          = bloomParseClient;
     this._s3Client             = bloomS3Client;
     _htmlThumbnailer           = htmlThumbnailer;
     _bookDownloadStartingEvent = bookDownloadStartingEvent;
 }
Пример #3
0
        public Shell(Func<WorkspaceView> projectViewFactory,
												CollectionSettings collectionSettings,
												BookDownloadStartingEvent bookDownloadStartingEvent,
												LibraryClosing libraryClosingEvent,
												QueueRenameOfCollection queueRenameOfCollection,
												ControlKeyEvent controlKeyEvent)
        {
            queueRenameOfCollection.Subscribe(newName => _nameToChangeCollectionUponClosing = newName.Trim().SanitizeFilename('-'));
            _collectionSettings = collectionSettings;
            _libraryClosingEvent = libraryClosingEvent;
            _controlKeyEvent = controlKeyEvent;
            InitializeComponent();

            //bring the application to the front (will normally be behind the user's web browser)
            bookDownloadStartingEvent.Subscribe((x) =>
            {
                try
                {
                    this.Invoke((Action)this.Activate);
                }
                catch (Exception e)
                {
                    Debug.Fail("(Debug Only) Can't bring to front in the current state: " + e.Message);
                    //swallow... so we were in some state that we couldn't come to the front... that's ok.
                }
            });

            #if DEBUG
            WindowState = FormWindowState.Normal;
            //this.FormBorderStyle = FormBorderStyle.None;  //fullscreen

            Size = new Size(1024,720);
            #else
            // We only want this screen size context menu in Debug mode
            ContextMenuStrip = null;
            #endif
            _workspaceView = projectViewFactory();
            _workspaceView.CloseCurrentProject += ((x, y) =>
                                                    {
                                                        UserWantsToOpenADifferentProject = true;
                                                        Close();
                                                    });

            _workspaceView.ReopenCurrentProject += ((x, y) =>
            {
                UserWantsToOpeReopenProject = true;
                Close();
            });

            _workspaceView.BackColor =
                System.Drawing.Color.FromArgb(64,64,64);
                                        _workspaceView.Dock = System.Windows.Forms.DockStyle.Fill;

            this.Controls.Add(this._workspaceView);

            SetWindowText(null);
        }
Пример #4
0
 public BookDownload(BloomParseClient bloomParseClient, BloomS3Client bloomS3Client, BookDownloadStartingEvent bookDownloadStartingEvent)
 {
     this._s3Client             = bloomS3Client;
     _bookDownloadStartingEvent = bookDownloadStartingEvent;
 }