Bloom.CollectionTab.LibraryView.LibraryView C# (CSharp) Method

LibraryView() public method

public LibraryView ( LibraryModel model, LibraryListView libraryListViewFactory, LibraryBookView templateBookViewFactory, SelectedTabChangedEvent selectedTabChangedEvent, SendReceiveCommand sendReceiveCommand ) : System
model LibraryModel
libraryListViewFactory LibraryListView
templateBookViewFactory LibraryBookView
selectedTabChangedEvent SelectedTabChangedEvent
sendReceiveCommand SendReceiveCommand
return System
        public LibraryView(LibraryModel model, LibraryListView.Factory libraryListViewFactory,
			LibraryBookView.Factory templateBookViewFactory,
			SelectedTabChangedEvent selectedTabChangedEvent,
			SendReceiveCommand sendReceiveCommand)
        {
            _model = model;
            InitializeComponent();

            _toolStrip.Renderer = new NoBorderToolStripRenderer();

            _collectionListView = libraryListViewFactory();
            _collectionListView.Dock = DockStyle.Fill;
            splitContainer1.Panel1.Controls.Add(_collectionListView);

            _bookView = templateBookViewFactory();
            _bookView.Dock = DockStyle.Fill;
            splitContainer1.Panel2.Controls.Add(_bookView);

            splitContainer1.SplitterDistance = _collectionListView.PreferredWidth;
            _makeBloomPackButton.Visible = model.IsShellProject;
            _sendReceiveButton.Visible = Settings.Default.ShowSendReceive;

            if (sendReceiveCommand != null)
            {
            #if Chorus
                _sendReceiveButton.Click += (x, y) => sendReceiveCommand.Raise(this);
                _sendReceiveButton.Enabled = !SendReceiver.SendReceiveDisabled;
            #endif
            }
            else
                _sendReceiveButton.Enabled = false;

            if (SIL.PlatformUtilities.Platform.IsMono)
            {
                BackgroundColorsForLinux();
            }

            selectedTabChangedEvent.Subscribe(c=>
                                                {
                                                    if (c.To == this)
                                                    {
                                                        Logger.WriteEvent("Entered Collections Tab");
                                                    }
                                                });
        }