Bloom.Workspace.WorkspaceView.WorkspaceView C# (CSharp) Method

WorkspaceView() public method

public WorkspaceView ( Bloom.Workspace.WorkspaceModel model, Control libraryView, EditingView editingViewFactory, PublishView pdfViewFactory, CollectionSettingsDialog settingsDialogFactory, EditBookCommand editBookCommand, SendReceiveCommand sendReceiveCommand, SelectedTabAboutToChangeEvent selectedTabAboutToChangeEvent, SelectedTabChangedEvent selectedTabChangedEvent, LocalizationChangedEvent localizationChangedEvent, FeedbackDialog feedbackDialogFactory, ProblemReporterDialog problemReportDialogFactory, LocalizationManager localizationManager ) : System
model Bloom.Workspace.WorkspaceModel
libraryView System.Windows.Forms.Control
editingViewFactory Bloom.Edit.EditingView
pdfViewFactory Bloom.Publish.PublishView
settingsDialogFactory Bloom.Collection.CollectionSettingsDialog
editBookCommand EditBookCommand
sendReceiveCommand SendReceiveCommand
selectedTabAboutToChangeEvent SelectedTabAboutToChangeEvent
selectedTabChangedEvent SelectedTabChangedEvent
localizationChangedEvent LocalizationChangedEvent
feedbackDialogFactory FeedbackDialog
problemReportDialogFactory Bloom.MiscUI.ProblemReporterDialog
localizationManager LocalizationManager
return System
        public WorkspaceView(WorkspaceModel model,
							 Control libraryView,
							 EditingView.Factory editingViewFactory,
							 PublishView.Factory pdfViewFactory,
							 CollectionSettingsDialog.Factory settingsDialogFactory,
							 EditBookCommand editBookCommand,
							SendReceiveCommand sendReceiveCommand,
							 SelectedTabAboutToChangeEvent selectedTabAboutToChangeEvent,
							SelectedTabChangedEvent selectedTabChangedEvent,
							LocalizationChangedEvent localizationChangedEvent,
							 FeedbackDialog.Factory feedbackDialogFactory,
							ProblemReporterDialog.Factory problemReportDialogFactory,
							//ChorusSystem chorusSystem,
							LocalizationManager localizationManager

			)
        {
            _model = model;
            _settingsDialogFactory = settingsDialogFactory;
            _selectedTabAboutToChangeEvent = selectedTabAboutToChangeEvent;
            _selectedTabChangedEvent = selectedTabChangedEvent;
            _localizationChangedEvent = localizationChangedEvent;
            _feedbackDialogFactory = feedbackDialogFactory;
            _problemReportDialogFactory = problemReportDialogFactory;
            //_chorusSystem = chorusSystem;
            _localizationManager = localizationManager;
            _model.UpdateDisplay += new System.EventHandler(OnUpdateDisplay);
            InitializeComponent();

            _checkForNewVersionMenuItem.Visible = SIL.PlatformUtilities.Platform.IsWindows;

            _toolStrip.Renderer = new NoBorderToolStripRenderer();

            //we have a number of buttons which don't make sense for the remote (therefore vulnerable) low-end user
            //_settingsLauncherHelper.CustomSettingsControl = _toolStrip;

            _settingsLauncherHelper.ManageComponent(_settingsButton);

            //NB: the rest of these aren't really settings, but we're using that feature to simplify this menu down to what makes sense for the easily-confused user
            _settingsLauncherHelper.ManageComponent(_openCreateCollectionButton);
            _settingsLauncherHelper.ManageComponent(_keyBloomConceptsMenuItem);
            _settingsLauncherHelper.ManageComponent(_makeASuggestionMenuItem);
            _settingsLauncherHelper.ManageComponent(_webSiteMenuItem);
            _settingsLauncherHelper.ManageComponent(_showLogMenuItem);
            _settingsLauncherHelper.ManageComponent(_releaseNotesMenuItem);
            _settingsLauncherHelper.ManageComponent(_divider2);
            _settingsLauncherHelper.ManageComponent(_divider3);
            _settingsLauncherHelper.ManageComponent(_divider4);

            OnSettingsProtectionChanged(this, null);//initial setup
            SettingsProtectionSettings.Default.PropertyChanged += new System.ComponentModel.PropertyChangedEventHandler(OnSettingsProtectionChanged);

            _uiLanguageMenu.Visible = true;
            _settingsLauncherHelper.ManageComponent(_uiLanguageMenu);

            editBookCommand.Subscribe(OnEditBook);
            sendReceiveCommand.Subscribe(OnSendReceive);

            //Cursor = Cursors.AppStarting;
            Application.Idle += new EventHandler(Application_Idle);
            Text = _model.ProjectName;

            //SetupTabIcons();

            //
            // _collectionView
            //
            this._collectionView = (LibraryView) libraryView;
            this._collectionView.Dock = System.Windows.Forms.DockStyle.Fill;

            //
            // _editingView
            //
            this._editingView = editingViewFactory();
            this._editingView.Dock = System.Windows.Forms.DockStyle.Fill;

            //
            // _pdfView
            //
            this._publishView = pdfViewFactory();
            this._publishView.Dock = System.Windows.Forms.DockStyle.Fill;

            _collectionTab.Tag = _collectionView;
            _publishTab.Tag = _publishView;
            _editTab.Tag = _editingView;

            this._collectionTab.Text = _collectionView.CollectionTabLabel;

            SetTabVisibility(_publishTab, false);
            SetTabVisibility(_editTab, false);

            //			if (Program.StartUpWithFirstOrNewVersionBehavior)
            //			{
            //				_tabStrip.SelectedTab = _infoTab;
            //				SelectPage(_infoView);
            //			}
            //			else
            //			{
                _tabStrip.SelectedTab = _collectionTab;
                SelectPage(_collectionView);
            //			}

            if (SIL.PlatformUtilities.Platform.IsMono)
            {
                // Without this adjustment, we lose some controls on smaller resolutions.
                AdjustToolPanelLocation(true);
                // in mono auto-size causes the height of the tab strip to be too short
                _tabStrip.AutoSize = false;
            }

            SetupUILanguageMenu();
            _viewInitialized = false;
        }