public LibraryListView(LibraryModel model, BookSelection bookSelection, SelectedTabChangedEvent selectedTabChangedEvent, LocalizationChangedEvent localizationChangedEvent,
                               HistoryAndNotesDialog.Factory historyAndNotesDialogFactory, BookTransfer bookTransferrer)
        {
            _model         = model;
            _bookSelection = bookSelection;
            localizationChangedEvent.Subscribe(unused => LoadSourceCollectionButtons());
            _historyAndNotesDialogFactory = historyAndNotesDialogFactory;
            _bookTransferrer          = bookTransferrer;
            _buttonsNeedingSlowUpdate = new ConcurrentQueue <Button>();
            selectedTabChangedEvent.Subscribe(OnSelectedTabChanged);
            InitializeComponent();
            _primaryCollectionFlow.HorizontalScroll.Visible = false;

            _primaryCollectionFlow.Controls.Clear();
            _primaryCollectionFlow.HorizontalScroll.Visible = false;
            _sourceBooksFlow.Controls.Clear();
            _sourceBooksFlow.HorizontalScroll.Visible = false;

            if (!_model.ShowSourceCollections)
            {
                splitContainer1.Panel2Collapsed = true;
            }

            _headerFont         = new Font(SystemFonts.DialogFont.FontFamily, (float)10.0, FontStyle.Bold);
            _editableBookFont   = new Font(SystemFonts.DialogFont.FontFamily, (float)9.0);          //, FontStyle.Bold);
            _collectionBookFont = new Font(SystemFonts.DialogFont.FontFamily, (float)9.0);

            //enhance: move to model
            bookSelection.SelectionChanged += new EventHandler(OnBookSelectionChanged);

            _settingsProtectionHelper.ManageComponent(_openFolderOnDisk);

            _showHistoryMenu.Visible = _showNotesMenu.Visible = Settings.Default.ShowSendReceive;

            if (Settings.Default.ShowExperimentalCommands)
            {
                _settingsProtectionHelper.ManageComponent(_exportToXMLForInDesignToolStripMenuItem);                //we are restriting it because it opens a folder from which the user could do damage
            }
            _exportToXMLForInDesignToolStripMenuItem.Visible = Settings.Default.ShowExperimentalCommands;
        }
예제 #2
0
        public LibraryListView(LibraryModel model, BookSelection bookSelection, SelectedTabChangedEvent selectedTabChangedEvent,
			HistoryAndNotesDialog.Factory historyAndNotesDialogFactory)
        {
            _model = model;
            _bookSelection = bookSelection;
            _historyAndNotesDialogFactory = historyAndNotesDialogFactory;
            _buttonsNeedingSlowUpdate = new ConcurrentQueue<Button>();
            selectedTabChangedEvent.Subscribe(OnSelectedTabChanged);
            InitializeComponent();
            _primaryCollectionFlow.HorizontalScroll.Visible = false;

            _primaryCollectionFlow.Controls.Clear();
            _primaryCollectionFlow.HorizontalScroll.Visible = false;
            _sourceBooksFlow.Controls.Clear();
            _sourceBooksFlow.HorizontalScroll.Visible = false;

            if (!_model.ShowSourceCollections)
            {
                splitContainer1.Panel2Collapsed = true;
            }

            _headerFont = new Font(SystemFonts.DialogFont.FontFamily, (float)10.0, FontStyle.Bold);
            _editableBookFont = new Font(SystemFonts.DialogFont.FontFamily, (float)9.0);//, FontStyle.Bold);
            _collectionBookFont = new Font(SystemFonts.DialogFont.FontFamily, (float)9.0);

            //enhance: move to model
            bookSelection.SelectionChanged += new EventHandler(OnBookSelectionChanged);

            _settingsProtectionHelper.ManageComponent(_openFolderOnDisk);

            _showHistoryMenu.Visible = _showNotesMenu.Visible = Settings.Default.ShowSendReceive;

            if(Settings.Default.ShowExperimentalCommands)
                _settingsProtectionHelper.ManageComponent(_exportToXMLForInDesignToolStripMenuItem);//we are restriting it because it opens a folder from which the user could do damage
            _exportToXMLForInDesignToolStripMenuItem.Visible = Settings.Default.ShowExperimentalCommands;
        }